SKILL.md--- name: android-cli description: Provides instructions for installing and using the `android` CLI. The `android` command-line tool is a critical tool for Android development and helps you create new Android projects, install APKs onto devices and emulators and launch and run apps on them, manage and interact with Android virtual devices (including screenshots and UI inspection), manage Android SDK components, inspect built artifacts (APK, AAB, JAR, AAR) for build and optimization details, render Compose previews, look up official Android documentation, and discover and install official Android skills. license: Complete terms in LICENSE.txt metadata: author: Google LLC last-updated: '2026-11-14' keywords: - android-cli - sdk - emulator - skills - docs - knowledge base - project creation - screenshots - apk analysis - compose preview --- This skill provides instructions for using the `android` CLI tool. The tool includes various commands for creating projects, running applications, interacting with devices, and managing the CLI environment. ## Installation If the android tool is not in the path, install it. To install run the following command: - Linux x86-64: curl -fsSL https://dl.google.com/android/cli/latest/linux_x86_64/install.sh \| bash - Linux ARM64: curl -fsSL https://dl.google.com/android/cli/latest/linux_arm64/install.sh \| bash - Mac Arm: curl -fsSL https://dl.google.com/android/cli/latest/darwin_arm64/install.sh \| bash - Mac Intel: curl -fsSL https://dl.google.com/android/cli/latest/darwin_x86_64/install.sh \| bash - Windows: curl -fsSL https://dl.google.com/android/cli/latest/windows_x86_64/install.cmd -o "%TEMP%\\i.cmd" \&\& "%TEMP%\\i.cmd" ## SDK management To manage the installation of Android SDKs and tools, use the `sdk` command. For example: - `android sdk install <package>[@<version>]...`: Install specific packages. Multiple packages can be specified, separated by spaces. `<version>` defaults to latest. For example: `android sdk install platforms/android-30@2 platforms/android-34` - `android sdk update [<pkg-name>]`: Update a specific package or all packages to the latest version. - `android sdk remove <pkg-name>`: Remove a package from the local SDK. - `android sdk list --all`: List installed and available SDK packages. ## Project creation Create projects from templates using the `create` command. For example: `android create empty-activity --name="My App" --output=./my-app` ## Interacting with Android devices Use the `android layout` command to inspect the UI layout of an Android application in JSON format. Use the `android screen` command to visually inspect the UI and obtain bounding coordinates for visual regions. `android layout` dumps the UI as JSON. `android screen capture -o <file path>` saves a PNG. Both auto-select the device when only one is connected; with more than one, pass `--device=<serial>` (use `adb devices`