android-cli
What it does
This skill guides installing and using the android command line tool. It helps with creating Android projects, installing apps on devices, managing emulators and managing SDK components. It is for Android developers who work from a terminal.
When to use it
- ✓When you want to create a new Android project from the command line.
- ✓When you need to install an APK on a device or emulator and launch it.
- ✓When you want to install or update Android SDK packages from a terminal.
Skill link
https://github.com/android/skills/blob/main/devtools/android-cli/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Install the android command line tool and set up the SDK packages I need for this project.”
5 new skills a week. 1 minute to read.
How it works
The skill first checks whether the android tool is on your path, and installs it if it is not. It then gives the commands for SDK management, project creation and device tasks.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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-34android 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 to list serials).
UI Dump
android layout returns a JSON tree of the UI elements on screen.
Each JSON object represents a UI element in the Android app. The following properties may be present:
text- any literal text the element containsresource-id- the Android resource id used to refer to the elementcontent-desc- a description of a UI element for use by accessibility toolsinteractions- the set of user interactions the element supports. May contain one or more of:CHECKABLE,CLICKABLE,FOCUSABLE,SCROLLABLE,LONG-CLICKABLE,PASSWORDstate- the set of states the element is in. May contain one or more ofCHECKED,FOCUSED,SELECTEDbounds- the screen coordinates of the bounding rectangle of the element, in the format[min X,min Y][max X, max Y]center- the screen coordinates of the center of the element, in the format[x,y]off-screen- if true, the element is in the UI hierarchy but not within the bounds of the screen; it may require scrolling to view.hidden- if true, the element is in the UI hierarchy but not visible or interactive on screen.
Use layout as a primary means of examining an Android app.
By default, layout only returns elements that have content or are interactive:
- elements with non-empty
textorcontent-descproperties - elements with non-empty
interactionsorstateTo return all elements, use the--fullflag
If layout continues to fail, use android screen capture --annotate to inspect the app.
Screenshot
android screen capture -o <file path> (or --output=<file path>) saves a PNG of the current device screen to <file path>.
Use screen capture as a secondary means of examining an Android app
Examples:
- Understanding the content of an on-screen image
- Looking at a
WebView(web content does not always appear in the ui dump) - Trying to find a UI element by its visual appearance
IMPORTANT : Always VISUALLY examine the PNG image returned from any android screen command BEFORE doing anything else.
Annotated Screenshot
android screen capture --annotate -o <file path> (or -a -o <file path>)
android screen resolve --screenshot <path> --string <string>
The --annotate command adds numerical labels and bounding boxes around UI elements. Use this command to locate UI elements that cannot
be located in the layout output.
To refer to these labels in i
FAQ
Which systems can install it?
The skill lists installers for Linux, Mac and Windows, with versions for Intel and ARM processors where they apply.
Can it manage emulators?
Yes. The tool can manage Android virtual devices, including taking screenshots and inspecting the screen.
How do I update SDK packages?
Use the android sdk update command, which updates one package or all of them to the latest version.
Details
Original description by the author
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, look up official Android documentation, and discover and install official Android skills.
repo: android/skills
Popularity
- GitHub stars
- 10k
- Ranking position
- #11915
- License
- Apache-2.0
- Updated
- 10/29/2026
Comments
- …
More skills from this repository
agp-9-upgrade
10kHelps your agent upgrade an Android app to Android Gradle Plugin 9 and work through its breaking changes. Not for multiplatform projects.
camerax
10kHelps your agent build Android camera features with CameraX, including video recording, hardware controls, ML Kit and Media3 effects.
android-for-cars-parked-apps
10kHelps your agent adapt an Android video, game or browser app to run as a parked app on Android Auto and Android Automotive.
appfunctions
10kHelps your agent find key workflows in an Android app and expose them as AppFunctions that AI agents and voice commands can run.
Similar skills
android-clean-architecture
280kMakes your agent organize Android projects efficiently. It structures the code to make maintenance and new feature development easier.
compose-multiplatform-patterns
280kHelps your agent use Compose Multiplatform and Jetpack Compose patterns in KMP projects, covering state, navigation, theming, and performance.
dart-flutter-patterns
280kMakes your agent write code for Dart and Flutter apps. It uses modern patterns to create robust and manageable apps.