Android CLI command reference

The android command-line tool provides commands for scaffolding projects, running apps, managing virtual devices, inspecting UI layouts, and integrating with Android Studio.

Summary of commands

Command Description
analyze Analyzes the file(s) (AAB, APK, JAR, AAR) at the given location(s) and reports back all available details.
auth Authentication commands. Log in to and out of Google services for Android CLI.
build Build android artifacts.
completion Installs shell autocomplete configuration for Android CLI in the current user profile.
create Creates a new Android project from available templates. You can specify the project name, output directory, minSdk value, and dry-run execution.
describe Analyzes an Android project to generate descriptive metadata. This command identifies and outputs the paths to JSON files that detail the project's structure, including build targets and their corresponding output artifact locations (such as APKs). This information enables other tools and commands to locate build artifacts efficiently.
device Manage Android devices. Mirror connected devices or emulators in a desktop window and manage remote physical device reservations.
docs Searches and fetches developer documentation from the official Android Knowledge Base.
emulator Manages Android Virtual Devices (AVDs). Includes commands to start, stop, list, and view details about emulators.
help Shows the help information for a specified command.
info Prints environment information including SDK location and configuration variables.
init Initializes the environment for Android CLI. Sets up required configurations, directories, and default skills.
input Interact with Android apps by performing gestures and key events on UI elements.
install Installs an Android app (one or more APKs) on a connected device or emulator without activating any components, using incremental optimizations for faster deployment than adb.
layout Returns the layout tree of an app.
preview Renders Jetpack Compose @Preview functions to PNG images and optionally exports component tree JSON files. Runs without a device or an IDE.
profiler Profiles Android apps, games, and devices.
run Deploys and launches an Android app on a connected device or emulator.
screen Captures and inspects the screen of a connected Android device or emulator.
sdk Manages the Android SDK installation. Includes commands to install, update, remove, and list available and installed SDK packages.
signals Queries app stability and field telemetry from Crashlytics.
skills Manages Android CLI skills. Includes commands to install, remove, list, and search for skills by keyword.
studio Connects Android CLI to a running Android Studio instance to analyze files, find declarations and usages, render Compose previews, and look up library versions.
update Updates Android CLI to the latest version.