Android SDK Command-line Tools

Google LLC · Manage Android SDK packages and command-line development utilities without installing the full Android Studio IDE.

Cask開發工具Apple 晶片 · Intel
主頁
來自 homebrew/cask
近 30 天安裝
47,012
App榜第 5
近一年安裝
30.9萬
365 天累計
最新版本
15859902
10月7日 · 10月7日
下載大小
156MB
arm64 / x86_64 · zip
更新節奏
不定期
近 30 天 1 個版本

Android SDK Command-line Tools 是一款開發工具類 Mac 軟體。開發者是 Google LLC。

基本資訊

晶片
Apple 晶片 · Intel
開發者
Google LLC
安裝命令
brew install --cask android-commandlinetools
Homebrew
可以安裝,由 Homebrew 更新
其他名稱
android-commandlinetools

以上資訊最早核查於 。檢視各項來源

介紹

Android SDK Command-line Tools is Google's standalone collection of SDK-management and development utilities for Android developers and build engineers. It is useful for scripted SDK setup and machines that do not need Android Studio's graphical IDE. It is distinct from Platform-Tools (adb and fastboot), Build-Tools, and the Android Emulator, which are separate SDK packages.

Capabilities

  • List, install, update, and remove SDK packages with sdkmanager.
  • Select exact SDK package versions and stable or preview update channels for reproducible automation.
  • Review and accept applicable SDK package licenses with sdkmanager --licenses.
  • Use included development utilities such as avdmanager, lint, apkanalyzer, and retrace as documented for the selected tool release.

Current guidance Google's current sdkmanager guide marks sdkmanager deprecated and recommends the Android CLI's android sdk commands. This describes that utility's upstream status; the currently listed Homebrew cask itself is not marked deprecated. Existing scripts should check Google's migration guidance rather than assuming the newer Android CLI is included in this cask.

Install and configure On Mac, install with brew install --cask android-commandlinetools. Homebrew records the default SDK root as $HOMEBREW_PREFIX/share/android-commandlinetools and explicitly requires Java, suggesting the Temurin cask as a way to provide it. Configure a compatible JDK and JAVA_HOME for your selected tool release. Use sdkmanager --version and sdkmanager --list to inspect the installed tools and available packages. Select the SDK packages you actually need; downloading this toolkit alone does not install every Android platform, build tool, emulator, or device tool.

Systems, dependencies, and coexistence Google distributes Windows, Linux, and macOS archives. The listed build 15859902 has separate official Mac ARM64 and x86-64 downloads; this catalog's default Apple Silicon download is the ARM64 archive. The Homebrew snapshot lists Intel and Apple Silicon Mac platforms, but its platform list is packaging metadata rather than a standalone vendor minimum. The official command-line-tools page does not specify a current independent macOS, memory, disk-space, or minimum JDK requirement for this exact build. Java is a confirmed dependency even though Homebrew's formula-dependency field is empty. No explicit conflicting cask is listed. If you already use Android Studio's SDK Manager, point scripts at the intended SDK root and avoid confusing separate SDK installations.

Access, costs, and licensing Local SDK utilities do not require a paid subscription or Google sign-in for ordinary local package management. Downloads require network access, adequate space for the selected packages, and acceptance of the applicable Android SDK License Agreement. Individual open-source components retain their own licenses; publishing to Google Play is a separate service and account process. Android is a trademark of Google LLC.

Official references

Image credit: The Android robot is reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License (https://creativecommons.org/licenses/by/3.0/).

SDK installation interface example The supplied Google documentation image shows the historical Mac Android Studio SDK Manager SDK Tools tab. The publisher guide lists Android SDK Command-Line Tools among the packages managed through this tab. This is a companion SDK installation interface, not a capture of current standalone build 15859902 or its terminal output. Displayed historical package versions are not attributed to this archive.

系統要求

macOS應用版本晶片下載來源
適用於 macOS 27, 26, 15, 14, 13, 12, 11 的版本15859902Inteldl.google.com/android/repository/commandlinetools-mac_x86_64-15859902_latest.zipSHA-256 c5a6378ab5cf7e0d5701921405115befff13e9ff7417fb588389338f8bd050f3Homebrew核查於
適用於 macOS 27, 26, 15, 14, 13, 12, 11 的版本15859902Apple 晶片dl.google.com/android/repository/commandlinetools-mac_arm64-15859902_latest.zipSHA-256 835b62a26162b229b441d1f6d4680383815a270809eb33522c0d480fa5002c4eHomebrew核查於

如何在 Mac 上安裝 Android SDK Command-line Tools

  1. 在「終端機」中執行: brew install --cask android-commandlinetools

注意事項

Default Android SDK root is $HOMEBREW_PREFIX/share/android-commandlinetools

android-commandlinetools requires Java. You can install the latest version with:
  brew install --cask temurin

不用 Homebrew 安裝

按晶片下載 Homebrew 使用的檔案: Apple 晶片Intel

SHA-256 只用來核對下載的檔案是否完整,不代表安全認證。 檢視 SHA-256 和下載網址

解除安裝 Android SDK Command-line Tools 與可選的資料清理

解除安裝命令
brew uninstall --cask android-commandlinetools

普通解除安裝會刪除應用本身,設定和快取會保留。

深度清理(可選)

解除安裝命令
brew uninstall --zap --cask android-commandlinetools

--zap 還會刪除 Homebrew 定義裡列出的設定、快取等檔案,其中可能有其他應用共用的資料,刪除後無法恢復;它也不保證沒有任何殘留。請先備份需要保留的資料;如要保留設定和快取,請不要加 --zap。

Android SDK Command-line Tools 可能留在 Mac 上的檔案(2)
檔案和資料夾
~/.android
$HOMEBREW_PREFIX/share/android-commandlinetools

以上條目來自 Homebrew 定義,核查於 ;它們只說明定義宣告會刪除什麼,不代表你的 Mac 上都有。

15859902 更新內容

新版本 · OpenNavo 編輯

這個版本沒有單獨的更新說明。

Android SDK Command-line Tools 的安全事實

這裡只列可以核驗的事實,並註明來源和日期,不是安全認證。要檢查你下載的檔案,可以用 OpenNavo 在本機掃描。

分發渠道
Homebrew
用 OpenNavo 掃描會在 OpenNavo 用戶端中開啟掃描預覽,由你決定是否開始。 瞭解安全防護

安裝細節

來源倉庫
homebrew/cask
附帶命令
apkanalyzer avdmanager d8 lint profgen r8 resourceshrinker retrace screenshot2 sdkmanager android
下載網址
https://dl.google.com/android/repository/commandlinetools-mac_arm64-15859902_latest.zip
SHA-256
835b62a26162b229b441d1f6d4680383815a270809eb33522c0d480fa5002c4e
Homebrew 定義檔案
github.com/homebrew/homebrew-cask/blob/HEAD/Casks/a/android-commandlinetools.rb
formulae.brew.sh
formulae.brew.sh/cask/android-commandlinetools
原始碼
android.googlesource.com

安裝與解除安裝內容

  • 安裝 artifact

    來源檔案: cmdline-tools

    宣告的目標位置: $HOMEBREW_PREFIX/share/android-commandlinetools/cmdline-tools/latest

    檢視完整宣告
    {
      "artifact": [
        "cmdline-tools",
        {
          "target": "$HOMEBREW_PREFIX/share/android-commandlinetools/cmdline-tools/latest"
        }
      ],
      "target": "$HOMEBREW_PREFIX/share/android-commandlinetools/cmdline-tools/latest"
    }
  • 安裝 binary

    來源檔案: $HOMEBREW_PREFIX/share/android-commandlinetools/cmdline-tools/latest/bin/apkanalyzer

    宣告的目標位置: $HOMEBREW_PREFIX/bin/apkanalyzer

    檢視完整宣告
    {
      "binary": [
        "$HOMEBREW_PREFIX/share/android-commandlinetools/cmdline-tools/latest/bin/apkanalyzer"
      ],
      "target": "$HOMEBREW_PREFIX/bin/apkanalyzer"
    }
  • 安裝 binary

    來源檔案: $HOMEBREW_PREFIX/share/android-commandlinetools/cmdline-tools/latest/bin/avdmanager

    宣告的目標位置: $HOMEBREW_PREFIX/bin/avdmanager

    檢視完整宣告
    {
      "binary": [
        "$HOMEBREW_PREFIX/share/android-commandlinetools/cmdline-tools/latest/bin/avdmanager"
      ],
      "target": "$HOMEBREW_PREFIX/bin/avdmanager"
    }
  • 安裝 binary

    來源檔案: $HOMEBREW_PREFIX/share/android-commandlinetools/cmdline-tools/latest/bin/d8

    宣告的目標位置: $HOMEBREW_PREFIX/bin/d8

    檢視完整宣告
    {
      "binary": [
        "$HOMEBREW_PREFIX/share/android-commandlinetools/cmdline-tools/latest/bin/d8"
      ],
      "target": "$HOMEBREW_PREFIX/bin/d8"
    }
  • 安裝 binary

    來源檔案: $HOMEBREW_PREFIX/share/android-commandlinetools/cmdline-tools/latest/bin/lint

    宣告的目標位置: $HOMEBREW_PREFIX/bin/lint

    檢視完整宣告
    {
      "binary": [
        "$HOMEBREW_PREFIX/share/android-commandlinetools/cmdline-tools/latest/bin/lint"
      ],
      "target": "$HOMEBREW_PREFIX/bin/lint"
    }
  • 安裝 binary

    來源檔案: $HOMEBREW_PREFIX/share/android-commandlinetools/cmdline-tools/latest/bin/profgen

    宣告的目標位置: $HOMEBREW_PREFIX/bin/profgen

    檢視完整宣告
    {
      "binary": [
        "$HOMEBREW_PREFIX/share/android-commandlinetools/cmdline-tools/latest/bin/profgen"
      ],
      "target": "$HOMEBREW_PREFIX/bin/profgen"
    }
  • 安裝 binary

    來源檔案: $HOMEBREW_PREFIX/share/android-commandlinetools/cmdline-tools/latest/bin/r8

    宣告的目標位置: $HOMEBREW_PREFIX/bin/r8

    檢視完整宣告
    {
      "binary": [
        "$HOMEBREW_PREFIX/share/android-commandlinetools/cmdline-tools/latest/bin/r8"
      ],
      "target": "$HOMEBREW_PREFIX/bin/r8"
    }
  • 安裝 binary

    來源檔案: $HOMEBREW_PREFIX/share/android-commandlinetools/cmdline-tools/latest/bin/resourceshrinker

    宣告的目標位置: $HOMEBREW_PREFIX/bin/resourceshrinker

    檢視完整宣告
    {
      "binary": [
        "$HOMEBREW_PREFIX/share/android-commandlinetools/cmdline-tools/latest/bin/resourceshrinker"
      ],
      "target": "$HOMEBREW_PREFIX/bin/resourceshrinker"
    }
  • 安裝 binary

    來源檔案: $HOMEBREW_PREFIX/share/android-commandlinetools/cmdline-tools/latest/bin/retrace

    宣告的目標位置: $HOMEBREW_PREFIX/bin/retrace

    檢視完整宣告
    {
      "binary": [
        "$HOMEBREW_PREFIX/share/android-commandlinetools/cmdline-tools/latest/bin/retrace"
      ],
      "target": "$HOMEBREW_PREFIX/bin/retrace"
    }
  • 安裝 binary

    來源檔案: $HOMEBREW_PREFIX/share/android-commandlinetools/cmdline-tools/latest/bin/screenshot2

    宣告的目標位置: $HOMEBREW_PREFIX/bin/screenshot2

    檢視完整宣告
    {
      "binary": [
        "$HOMEBREW_PREFIX/share/android-commandlinetools/cmdline-tools/latest/bin/screenshot2"
      ],
      "target": "$HOMEBREW_PREFIX/bin/screenshot2"
    }
  • 安裝 binary

    來源檔案: $HOMEBREW_PREFIX/share/android-commandlinetools/cmdline-tools/latest/bin/sdkmanager

    宣告的目標位置: $HOMEBREW_PREFIX/bin/sdkmanager

    檢視完整宣告
    {
      "binary": [
        "$HOMEBREW_PREFIX/share/android-commandlinetools/cmdline-tools/latest/bin/sdkmanager"
      ],
      "target": "$HOMEBREW_PREFIX/bin/sdkmanager"
    }
  • 安裝 binary

    來源檔案: $HOMEBREW_PREFIX/share/android-commandlinetools/cmdline-tools/latest/bin/android

    宣告的目標位置: $HOMEBREW_PREFIX/bin/android

    檢視完整宣告
    {
      "binary": [
        "$HOMEBREW_PREFIX/share/android-commandlinetools/cmdline-tools/latest/bin/android"
      ],
      "target": "$HOMEBREW_PREFIX/bin/android"
    }
  • 清理使用者資料 zap

    檢視完整宣告
    {
      "zap": [
        {
          "trash": [
            "~/.android",
            "$HOMEBREW_PREFIX/share/android-commandlinetools"
          ]
        }
      ]
    }

關於 Android SDK Command-line Tools 的常見問題

Android SDK Command-line Tools 安全嗎?

Android SDK Command-line Tools 收錄在 Homebrew 官方軟體庫中,沒有被停用。自 2026 年 9 月起,Homebrew 會停用沒有通過 macOS Gatekeeper 檢查的應用。安裝時,Homebrew 會用 SHA-256 校驗值核對來自 dl.google.com 的安裝檔。過去 30 天,它透過 Homebrew 安裝了 47,012 次。

如何在 Mac 上徹底解除安裝 Android SDK Command-line Tools?

執行 brew uninstall --cask android-commandlinetools。要連設定和快取一起刪除,執行 brew uninstall --zap --cask android-commandlinetools。--zap 還會刪除 Homebrew 定義裡列出的設定、快取等檔案,其中可能有其他應用共用的資料,刪除後無法恢復;它也不保證沒有任何殘留。請先備份需要保留的資料;如要保留設定和快取,請不要加 --zap。這會再刪除 2 處檔案和資料夾,包括 ~/.android。

Android SDK Command-line Tools 支援 Apple 晶片(M1 及更新)的 Mac 嗎?

支援。Homebrew 會為 Apple 晶片和 Intel 晶片的 Mac 分別下載不同的安裝檔。

Android SDK Command-line Tools 的設定和資料儲存在哪裡?

資料儲存在 ~/.android。這些位置來自 Homebrew 的清理清單。

Android SDK Command-line Tools 的最新版本是多少?

最新版本是 15859902,Homebrew 收錄於 7月28日。執行 brew upgrade --cask android-commandlinetools 即可更新。

安裝 Android SDK Command-line Tools 還會裝上什麼?

還會裝上 11 個命令列工具,包括 apkanalyzer、avdmanager、d8、lint和profgen。

來源

頁面上的每項資料都註明來源和核查日期;過期的資料只寫「截至」某日,不再當作當前事實。