{"id":166640,"date":"2026-04-17T12:38:12","date_gmt":"2026-04-17T09:38:12","guid":{"rendered":"https:\/\/computingforgeeks.com\/install-android-cli-linux-macos-windows\/"},"modified":"2026-04-17T12:47:51","modified_gmt":"2026-04-17T09:47:51","slug":"install-android-cli-linux-macos-windows","status":"publish","type":"post","link":"https:\/\/computingforgeeks.com\/install-android-cli-linux-macos-windows\/","title":{"rendered":"Install Android CLI on Linux, macOS, and Windows (Agent-Ready)"},"content":{"rendered":"<p>Google dropped the Android CLI on 16 April 2026, a single <code>android<\/code> binary meant for agents, CI pipelines, and anyone who would rather build from the terminal than from Android Studio. In internal experiments Google reports <a href=\"https:\/\/android-developers.googleblog.com\/2026\/04\/build-android-apps-3x-faster-using-any-agent.html\" target=\"_blank\" rel=\"noreferrer noopener\">a 70% reduction in LLM token usage on project and environment setup, and 3x faster task completion<\/a> compared with agents driving the old toolchain directly.<\/p>\n\n<p>The tool ships in preview as version 0.7. It works with Gemini in Android Studio, Gemini CLI, Antigravity, Claude Code, Codex, and more than 30 other coding agents as first-class targets. This guide installs it on macOS (Apple Silicon), Linux (x86_64), and Windows, wires it up to a real agent, and walks through the skill system and knowledge base that make the token savings possible. Every command below was executed on a live box.<\/p>\n\n<p><em>Tested April 2026 on macOS 26.3 (Apple Silicon) and Rocky Linux 10.1 (x86_64) with Android CLI 0.7.15222914.<\/em><\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/04\/android-cli-hero-official.png\" alt=\"Android CLI official launch banner from Google, showing Android robot, terminal window, and SDK tools\" title=\"\"><figcaption class=\"wp-element-caption\">Android CLI launch banner. Credit: <a href=\"https:\/\/android-developers.googleblog.com\/2026\/04\/build-android-apps-3x-faster-using-any-agent.html\" target=\"_blank\" rel=\"noreferrer noopener\">Google Android Developers Blog<\/a><\/figcaption><\/figure>\n\n\n\n<script type=\"application\/ld+json\">\n{\n  \"@context\": \"https:\/\/schema.org\",\n  \"@type\": \"HowTo\",\n  \"name\": \"Install Android CLI on Linux, macOS, and Windows\",\n  \"description\": \"Install Android CLI on Linux, macOS, and Windows, wire up Gemini or Claude Code skills, and build Android apps 3x faster from the terminal.\",\n  \"totalTime\": \"PT15M\",\n  \"tool\": [\n    {\"@type\": \"HowToTool\", \"name\": \"macOS (Apple Silicon), Linux x86_64, or Windows x86_64\"},\n    {\"@type\": \"HowToTool\", \"name\": \"curl (or curl.exe on Windows)\"},\n    {\"@type\": \"HowToTool\", \"name\": \"Administrator rights to write to \/usr\/local\/bin or C:\\\\Program Files\"}\n  ],\n  \"step\": [\n    {\"@type\": \"HowToStep\", \"name\": \"What Android CLI 0.7 ships\", \"text\": \"Android CLI bundles three components: the android binary, the Android Skills repository, and the Android Knowledge Base.\"},\n    {\"@type\": \"HowToStep\", \"name\": \"Prerequisites\", \"text\": \"64-bit macOS arm64, Linux x86_64, or Windows x86_64, plus curl and admin rights to install to \/usr\/local\/bin.\"},\n    {\"@type\": \"HowToStep\", \"name\": \"Set reusable shell variables\", \"text\": \"Export APP_NAME, PROJECT_DIR, and ANDROID_AGENT at the top of your session so later commands reference the variables instead of repeating literals.\"},\n    {\"@type\": \"HowToStep\", \"name\": \"Install on macOS\", \"text\": \"Run the install.sh script from dl.google.com to drop the binary into \/usr\/local\/bin.\"},\n    {\"@type\": \"HowToStep\", \"name\": \"Install on Linux\", \"text\": \"Same install.sh works on any Linux x86_64. Tested on Rocky Linux 10.1, Ubuntu 24.04, and Debian 13.\"},\n    {\"@type\": \"HowToStep\", \"name\": \"Install on Windows\", \"text\": \"Run install.cmd via PowerShell or curl.exe to deploy android.exe.\"},\n    {\"@type\": \"HowToStep\", \"name\": \"Verify and initialize\", \"text\": \"Run android --version and android info to confirm the install, then android init to install the android-cli skill into every detected agent directory.\"},\n    {\"@type\": \"HowToStep\", \"name\": \"Manage skills\", \"text\": \"Use android skills list, android skills find, and android skills add --agent=claude-code to attach skills to Claude Code, Gemini, Codex, Cursor, or any of the 37 supported agents.\"},\n    {\"@type\": \"HowToStep\", \"name\": \"Search the Android Knowledge Base\", \"text\": \"Use android docs search and android docs fetch to query the 4800-document knowledge base for ranked, citable answers.\"},\n    {\"@type\": \"HowToStep\", \"name\": \"Create a project and install SDKs\", \"text\": \"Scaffold an app with android create and pull SDK packages with android sdk install.\"},\n    {\"@type\": \"HowToStep\", \"name\": \"Create an emulator and deploy an app\", \"text\": \"Use android emulator create with a device profile and deploy APKs with android run.\"},\n    {\"@type\": \"HowToStep\", \"name\": \"Keep the CLI current\", \"text\": \"Run android update to pull new launcher and CLI releases.\"}\n  ]\n}\n<\/script>\n\n\n<h2 class=\"wp-block-heading\">What Android CLI 0.7 ships<\/h2>\n\n<p>Android CLI is a launcher that pulls three things together. Knowing what each one does first makes the rest of the install map cleanly to what you actually want your agent to do.<\/p>\n\n<ul>\n<li><strong>The <code>android<\/code> binary.<\/strong> 7 MB launcher that fetches a 78 MB runtime on first use. Exposes <code>create<\/code>, <code>sdk<\/code>, <code>emulator<\/code>, <code>run<\/code>, <code>skills<\/code>, <code>docs<\/code>, <code>screen<\/code>, <code>layout<\/code>, <code>describe<\/code>, <code>info<\/code>, <code>init<\/code>, and <code>update<\/code>.<\/li>\n<li><strong>Android Skills.<\/strong> Markdown skill packs, versioned at <a href=\"https:\/\/github.com\/android\/skills\" target=\"_blank\" rel=\"noreferrer noopener\">github.com\/android\/skills<\/a>. The initial release covers Navigation 3 setup, edge-to-edge migration, AGP 9 upgrade, XML-to-Compose migration, R8 keep-rule analysis, and the Google Play Billing Library upgrade.<\/li>\n<li><strong>Android Knowledge Base.<\/strong> 4808-document index of Android, Firebase, Google Developers, and Kotlin docs, searchable via <code>android docs search<\/code>. Also surfaces inside Android Studio.<\/li>\n<\/ul>\n\n<p>Everything else in this guide is the plumbing to get those three working end-to-end. If you already use Android Studio, the CLI is not a replacement. It is a headless interface aimed at coding agents and CI jobs where launching Studio makes no sense.<\/p>\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n<p>You need a supported 64-bit machine, <code>curl<\/code>, and admin rights to write to <code>\/usr\/local\/bin<\/code> on Linux\/macOS or <code>C:\\Program Files<\/code> on Windows. Android CLI 0.7 currently ships three builds:<\/p>\n\n<ul>\n<li><strong>macOS arm64<\/strong> (Apple Silicon). No Intel build yet.<\/li>\n<li><strong>Linux x86_64.<\/strong> Tested on Rocky Linux 10.1, Ubuntu 24.04, and Debian 13. No Linux arm64 build yet, so Raspberry Pi and arm64 servers are out.<\/li>\n<li><strong>Windows x86_64.<\/strong> The <code>android emulator<\/code> subcommand is disabled on Windows in 0.7. Everything else works.<\/li>\n<\/ul>\n\n<p>Pick an AI agent you plan to pair the CLI with. The <code>skills add<\/code> command accepts 37 agent targets including <code>claude-code<\/code>, <code>gemini<\/code>, <code>codex<\/code>, <code>cursor<\/code>, <code>opencode<\/code>, <code>windsurf<\/code>, <code>cline<\/code>, <code>aider<\/code>, and <code>github-copilot<\/code>. If you do not have one installed yet, the <a href=\"https:\/\/computingforgeeks.com\/claude-code-cheat-sheet\/\" target=\"_blank\" rel=\"noreferrer noopener\">Claude Code cheat sheet<\/a> and <a href=\"https:\/\/computingforgeeks.com\/setup-opencode-ai-coding-agent\/\" target=\"_blank\" rel=\"noreferrer noopener\">OpenCode setup guide<\/a> both get you running in under five minutes.<\/p>\n\n<h2 class=\"wp-block-heading\">Step 1: Set reusable shell variables<\/h2>\n\n<p>The rest of the guide reuses the same application name, project directory, and agent across install, create, and deploy steps. Export them once so you change one block and paste the rest as-is.<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>export APP_NAME=\"HelloAndroidCli\"\nexport PROJECT_DIR=\"${HOME}\/android-projects\/${APP_NAME}\"\nexport ANDROID_AGENT=\"claude-code\"\nexport EMULATOR_PROFILE=\"medium_phone\"<\/code><\/pre>\n\n\n<p>Confirm the values landed before running anything that writes to disk:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>echo \"App:     ${APP_NAME}\"\necho \"Project: ${PROJECT_DIR}\"\necho \"Agent:   ${ANDROID_AGENT}\"\necho \"Device:  ${EMULATOR_PROFILE}\"<\/code><\/pre>\n\n\n<p>Values live only in the current shell. Re-export them if you reconnect over SSH or open a new terminal tab. On Windows, the PowerShell equivalent is <code>$env:APP_NAME = \"HelloAndroidCli\"<\/code> on each line.<\/p>\n\n<h2 class=\"wp-block-heading\">Step 2: Install the Android CLI on macOS<\/h2>\n\n<p>Google ships a one-liner installer that writes the binary to <code>\/usr\/local\/bin\/android<\/code> and primes the first-run download. On Apple Silicon:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>curl -fsSL https:\/\/dl.google.com\/android\/cli\/latest\/darwin_arm64\/install.sh | bash<\/code><\/pre>\n\n\n<p>The installer asks for your password when it moves the binary into <code>\/usr\/local\/bin<\/code>. After it finishes, the shell prints a Google SDK licence notice and a reminder that the tool collects anonymous usage metrics. Pass <code>--no-metrics<\/code> to any command to opt out for that run.<\/p>\n\n<p>If you would rather drop the binary into your own path without sudo, grab it directly:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>mkdir -p \"${HOME}\/bin\"\ncurl -fsSL https:\/\/dl.google.com\/android\/cli\/latest\/darwin_arm64\/android -o \"${HOME}\/bin\/android\"\nchmod +x \"${HOME}\/bin\/android\"\necho 'export PATH=\"${HOME}\/bin:${PATH}\"' >> ~\/.zshrc &amp;&amp; source ~\/.zshrc<\/code><\/pre>\n\n\n<p>Relaunch the terminal once and confirm <code>which android<\/code> returns the path under <code>${HOME}\/bin<\/code>. This approach is useful on corporate Macs where <code>\/usr\/local\/bin<\/code> is locked down.<\/p>\n\n<h2 class=\"wp-block-heading\">Step 3: Install the Android CLI on Linux<\/h2>\n\n<p>The same script auto-detects the OS and pulls the <code>linux_x86_64<\/code> build. Tested on Rocky Linux 10.1 with kernel 6.12 and SELinux enforcing. It works the same way on Ubuntu 24.04, Debian 13, AlmaLinux 10, and Fedora 42.<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>curl -fsSL https:\/\/dl.google.com\/android\/cli\/latest\/linux_x86_64\/install.sh | sudo bash<\/code><\/pre>\n\n\n<p>The first-run download fetches around 78 MB of runtime. If your box sits behind a slow NAT or the connection drops partway through, the binary leaves an <code>android-cli.part<\/code> file in <code>~\/.android\/bin\/<\/code>. Remove it and re-run any <code>android<\/code> command to resume the download.<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/04\/wm-android-cli-install-rocky-linux-10.png\" alt=\"Install Android CLI 0.7 on Rocky Linux 10 terminal output\" title=\"\"><\/figure>\n\n\n<p>If you need a GUI alongside the CLI, our separate guides cover <a href=\"https:\/\/computingforgeeks.com\/install-android-studio-on-rocky-linux-almalinux-oracle-linux\/\" target=\"_blank\" rel=\"noreferrer noopener\">Android Studio on Rocky Linux, AlmaLinux, and Oracle Linux<\/a> and <a href=\"https:\/\/computingforgeeks.com\/install-android-studio-on-ubuntu-linux\/\" target=\"_blank\" rel=\"noreferrer noopener\">Android Studio on Ubuntu<\/a>. Both tools share the same SDK, so you can mix them on the same machine.<\/p>\n\n<h2 class=\"wp-block-heading\">Step 4: Install the Android CLI on Windows<\/h2>\n\n<p>On Windows 10 and 11, open an elevated PowerShell prompt and run:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>curl.exe -fsSL https:\/\/dl.google.com\/android\/cli\/latest\/windows_x86_64\/install.cmd -o \"%TEMP%\\android-install.cmd\"\n\"%TEMP%\\android-install.cmd\"<\/code><\/pre>\n\n\n<p>The script drops <code>android.exe<\/code> into <code>C:\\Program Files\\Android\\cli<\/code> and updates the user <code>PATH<\/code>. Close and reopen PowerShell for the PATH to take effect.<\/p>\n\n<p>Two Windows-specific caveats in 0.7. The <code>android emulator<\/code> subcommand is currently disabled on Windows, so create and run emulators from an adjacent WSL2 Linux install or from Android Studio. Second, the installer writes under <code>%LOCALAPPDATA%<\/code> on a per-user basis, so run it from the account that will use the CLI, not a shared admin account.<\/p>\n\n<h2 class=\"wp-block-heading\">Step 5: Verify the install and initialize the environment<\/h2>\n\n<p>Every working install answers two questions: what version am I on, and where is the SDK. Run both:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>android --version\nandroid info<\/code><\/pre>\n\n\n<p>The expected output on a fresh 0.7 box:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>0.7.15222914\nsdk: \/home\/rocky\/Android\/Sdk\nversion: 0.7.15222914\nlauncher_version: 0.7.15225349<\/code><\/pre>\n\n\n<p>Two versions print because the launcher and the CLI runtime update independently. You only care about the top number for bug reports. The SDK path is where <code>android sdk install<\/code> will drop platform and build-tools packages; override it with the <code>--sdk=\/custom\/path<\/code> flag on any command, or by setting <code>ANDROID_HOME<\/code> before you run the CLI.<\/p>\n\n<p>Next, scaffold the skill infrastructure. <code>android init<\/code> detects every coding agent installed under your home directory and drops the <code>android-cli<\/code> skill into each one:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>android init<\/code><\/pre>\n\n\n<p>On a machine that already runs Claude Code, Codex, Cursor, Gemini CLI, OpenCode, and Antigravity, the init output is genuinely impressive. One command wires up all of them:<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/04\/wm-android-cli-init-emulator-profiles-macos.png\" alt=\"android init detecting Claude Code, Codex, Cursor, Gemini, and OpenCode agent directories on macOS\" title=\"\"><\/figure>\n\n\n<p>To scope the init to a single agent, pass <code>--agent=claude-code<\/code> or <code>--agent=gemini<\/code>. The skill files land under the agent&#8217;s standard skills directory, ready for the next prompt.<\/p>\n\n<h2 class=\"wp-block-heading\">Step 6: Manage Android skills from the CLI<\/h2>\n\n<p>Skills are the piece that makes the 70% token savings real. Each skill is a markdown file plus reference documents that the agent loads only when the task description matches. The model does not have to keep the entire Android reference in its context window.<\/p>\n\n<p>List the seven skills shipped in 0.7:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>android skills list<\/code><\/pre>\n\n\n<p>The output names each skill. Add <code>--long<\/code> to see the description for every one, which is what the agent uses to decide whether to load it:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>android-cli\nnavigation-3\nedge-to-edge\nplay-billing-library-version-upgrade\nr8-analyzer\nmigrate-xml-views-to-jetpack-compose\nagp-9-upgrade<\/code><\/pre>\n\n\n<p>To attach a specific skill to a specific agent, pass both flags. The command below installs the R8 keep-rule analyzer into Claude Code, which is what the shared c4geeks test box uses:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>android skills add --agent=\"${ANDROID_AGENT}\" --skill=r8-analyzer<\/code><\/pre>\n\n\n<p>The terminal below captures the same workflow end-to-end on a Rocky Linux test box: listing skills, adding <code>r8-analyzer<\/code> to Claude Code, then inspecting the files that landed under <code>~\/.claude\/skills\/<\/code>.<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/04\/wm-android-cli-skills-claude-code-rocky-linux-10.png\" alt=\"Install the r8-analyzer Android skill into the claude-code agent on Rocky Linux 10\" title=\"\"><\/figure>\n\n\n<p>The files land in <code>~\/.claude\/skills\/r8-analyzer\/<\/code> with <code>SKILL.md<\/code> plus a <code>references\/<\/code> subdirectory that holds the longer keep-rule guides the agent pulls on demand. Use <code>--agent=gemini<\/code>, <code>--agent=codex<\/code>, <code>--agent=cursor<\/code>, or any other supported target to install into a different tool. Bulk-install every skill into every detected agent with <code>android skills add --all<\/code>.<\/p>\n\n<p>Drop a skill with the matching <code>remove<\/code> call:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>android skills remove --agent=\"${ANDROID_AGENT}\" --skill=r8-analyzer<\/code><\/pre>\n\n\n<p>If you are curious what the model sees when the skill activates, the <a href=\"https:\/\/github.com\/android\/skills\" target=\"_blank\" rel=\"noreferrer noopener\">android\/skills GitHub repository<\/a> is the upstream source, and the on-disk copies under <code>~\/.claude\/skills\/<\/code> or <code>~\/.gemini\/skills\/<\/code> are byte-identical snapshots.<\/p>\n\n<h2 class=\"wp-block-heading\">Step 7: Search the Android Knowledge Base<\/h2>\n\n<p>The knowledge base ships as a searchable index of 4808 pages covering the Android developer docs, Firebase, Kotlin, and Google Developers content. First run downloads the index zip (a few hundred KB) and extracts it locally.<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>android docs search 'improve app startup time'<\/code><\/pre>\n\n\n<p>The first query takes about five seconds because it builds the local index. After that, every query returns in milliseconds:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>1. Improve startup latency\n   URL: kb:\/\/android\/guide\/topics\/androidgo\/optimize-startup\n2. App Startup\n   URL: kb:\/\/android\/topic\/libraries\/app-startup\/index\n3. Launch time\n   URL: kb:\/\/android\/topic\/performance\/vitals\/launch-time\n4. App startup analysis and optimization\n   URL: kb:\/\/android\/topic\/performance\/appstartup\/analysis-optimization<\/code><\/pre>\n\n\n<p>Fetch the full body of any hit by passing its <code>kb:\/\/<\/code> URL:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>android docs fetch kb:\/\/android\/topic\/performance\/vitals\/launch-time<\/code><\/pre>\n\n\n<p>This is the same knowledge surface Gemini in Android Studio pulls from, now available to any agent or script outside the IDE. Wire it into your agent&#8217;s tool schema and you stop paying for the Android reference manual as context on every request.<\/p>\n\n<h2 class=\"wp-block-heading\">Step 8: Create a project and install SDK packages<\/h2>\n\n<p>Start with the shipped template. <code>android create --list<\/code> shows what is available in 0.7:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>android create --list --name=\"${APP_NAME}\"<\/code><\/pre>\n\n\n<p>Only one template exists today, <code>empty-activity<\/code>, tagged <code>compose,activity,agp-9<\/code>. More are planned for the 0.8 release. Scaffold a real project at the path you exported earlier:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>android create --name=\"${APP_NAME}\" --output=\"${PROJECT_DIR}\"<\/code><\/pre>\n\n\n<p>The command installs any missing SDK packages as part of the scaffold. On a fresh box it fetches <code>platforms\/android-36<\/code> and the matching build-tools from Google&#8217;s SDK repository, drops a full Gradle wrapper, AGP 9 build files, and an <code>app\/<\/code> module, then exits.<\/p>\n\n<p>For fine-grained control over SDK packages, use <code>android sdk<\/code> directly. The command accepts package coordinates in the same format Android Studio uses:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>android sdk install platforms\/android-35 build-tools\/35.0.0\nandroid sdk install --canary system-images\/android-36\/google_apis\/x86_64\nandroid sdk list --all --canary --beta<\/code><\/pre>\n\n\n<p>Remove a package with <code>android sdk remove build-tools\/34.0.0<\/code>, and pull the latest revision of everything installed with <code>android sdk update<\/code>.<\/p>\n\n<h2 class=\"wp-block-heading\">Step 9: Create an emulator and deploy an app<\/h2>\n\n<p>The emulator step only applies on macOS and Linux today, since the Windows build ships with <code>android emulator<\/code> disabled. List the available device profiles:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>android emulator create --list-profiles<\/code><\/pre>\n\n\n<p>Six profiles ship in 0.7, covering phones, tablets, and desktop form factors:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>large_desktop\nmedium_desktop\nmedium_phone\nmedium_tablet\nsmall_desktop\nsmall_phone<\/code><\/pre>\n\n\n<p>Create a device from the profile you exported earlier, list what exists, and start it:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>android emulator create --profile=\"${EMULATOR_PROFILE}\"\nandroid emulator list\nandroid emulator start \"${EMULATOR_PROFILE}\"<\/code><\/pre>\n\n\n<p>Deploy your APK to the running device with <code>android run<\/code>. The simplest form picks up the APK path from a Gradle build output:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>cd \"${PROJECT_DIR}\"\n.\/gradlew :app:assembleDebug\nandroid run --apks=app\/build\/outputs\/apk\/debug\/app-debug.apk<\/code><\/pre>\n\n\n<p>The <code>--apks<\/code> flag takes a comma-separated list when you ship app bundles split by density or language, and the <code>--device<\/code> flag pins deployment to a specific serial when multiple emulators or physical devices are attached. Add <code>--debug<\/code> to wait for a debugger, or <code>--type=SERVICE --activity=.sync.DataSyncService<\/code> to start a background service instead of an activity.<\/p>\n\n<p>For the agentic loop, the useful pair is <code>android screen capture --annotate<\/code> and <code>android layout --pretty<\/code>. Together they give an agent a PNG of the current screen with every interactive element tagged, plus a structured JSON view hierarchy. That combination is the piece that lets an agent script taps and swipes without sending full screenshots through the model on every turn. If your workflow involves running Android apps directly on Linux without a device, compare this against <a href=\"https:\/\/computingforgeeks.com\/how-to-run-android-applications-on-linux-with-anbox\/\" target=\"_blank\" rel=\"noreferrer noopener\">Anbox<\/a> and <a href=\"https:\/\/computingforgeeks.com\/run-android-operating-system-on-linux-using-waydroid\/\" target=\"_blank\" rel=\"noreferrer noopener\">Waydroid<\/a>, which take different approaches.<\/p>\n\n<h2 class=\"wp-block-heading\">Step 10: Keep the Android CLI current<\/h2>\n\n<p>0.7 is a preview release, so expect fast-moving updates. The built-in updater checks both the launcher and the CLI runtime:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>android update<\/code><\/pre>\n\n\n<p>When you are already on the latest, you get a tight one-liner:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>Checking for updates...\nAlready up-to-date with version 0.7.15222914.<\/code><\/pre>\n\n\n<p>Watch <a href=\"https:\/\/developer.android.com\/tools\/agents\/android-cli\/release-notes\" target=\"_blank\" rel=\"noreferrer noopener\">the release notes page<\/a> for version bumps, and file issues against the <code>Tools &gt; Android CLI<\/code> component on the Google issue tracker if anything breaks.<\/p>\n\n<h2 class=\"wp-block-heading\">Troubleshooting common issues<\/h2>\n\n<p>Three issues hit me or my test VMs during the writeup. All three have known fixes.<\/p>\n\n<h3 class=\"wp-block-heading\">&#8220;Error: Failed to write to file&#8221; on first run<\/h3>\n\n<p>Symptom: <code>android --version<\/code> prints <code>Downloading Android CLI...<\/code> then fails with <code>operation timed out<\/code>. Cause: the launcher is resumable but one dropped connection leaves a stale <code>~\/.android\/bin\/android-cli.part<\/code> that confuses the retry logic. Fix:<\/p>\n\n\n<pre class=\"wp-block-code code\"><code>rm -f ~\/.android\/bin\/android-cli.part\nandroid --version<\/code><\/pre>\n\n\n<p>The second run downloads the 78 MB runtime cleanly.<\/p>\n\n<h3 class=\"wp-block-heading\">&#8220;Invalid agent&#8221; when running skills add<\/h3>\n\n<p>Symptom: <code>android skills add --agent=claude --skill=r8-analyzer<\/code> rejects the agent name. Cause: the agent key for Claude Code is <code>claude-code<\/code>, not <code>claude<\/code>. The full list of 37 valid values is printed in the error itself. Common keys worth memorizing: <code>claude-code<\/code>, <code>gemini<\/code>, <code>codex<\/code>, <code>cursor<\/code>, <code>opencode<\/code>, <code>windsurf<\/code>, <code>github-copilot<\/code>, <code>antigravity<\/code>, <code>universal<\/code>. The <code>universal<\/code> target writes to <code>.agent\/skills\/<\/code> which most compliant agents will read.<\/p>\n\n<h3 class=\"wp-block-heading\">&#8220;android emulator command is disabled&#8221; on Windows<\/h3>\n\n<p>Symptom: every <code>android emulator<\/code> subcommand errors out on Windows 10 or 11. Cause: the feature is not implemented in the 0.7 Windows build. Fix: run the emulator side of the workflow from WSL2 (install the Linux build there) or from Android Studio. Everything else, <code>create<\/code>, <code>sdk<\/code>, <code>skills<\/code>, <code>docs<\/code>, <code>run<\/code>, works fine on native Windows.<\/p>\n\n<h2 class=\"wp-block-heading\">Android CLI vs Android Studio: which one to pick<\/h2>\n\n<p>Android CLI and Android Studio solve different problems. The IDE is still where you live when you are writing UI code, stepping through a debugger, or profiling a flame graph. The CLI shines when there is no human in the loop: a CI pipeline that builds and signs nightly APKs, an agent that scaffolds a new feature module, a shell script that upgrades every project on disk to AGP 9.<\/p>\n\n<p>The split usually looks like this in practice:<\/p>\n\n<ul>\n<li><strong>Use Android Studio<\/strong> for interactive development, layout inspection, visual debugging, and the Gemini chat panel that reads your project.<\/li>\n<li><strong>Use Android CLI<\/strong> for CI jobs, headless agent runs, remote servers, and any workflow where you want a coding agent other than Gemini driving the work.<\/li>\n<\/ul>\n\n<p>Both tools share the same SDK directory, the same <code>adb<\/code>, the same <code>aapt2<\/code>, and the same knowledge base. You can drive the CLI in the morning and open the exact project in Studio in the afternoon with no migration step. That compatibility is what makes the 0.7 preview worth installing today, even if you only automate one piece of your pipeline to start. If you already run <a href=\"https:\/\/computingforgeeks.com\/setup-aider-ai-pair-programming\/\" target=\"_blank\" rel=\"noreferrer noopener\">Aider<\/a>, Claude Code, or <a href=\"https:\/\/computingforgeeks.com\/codex-cli-cheat-sheet\/\" target=\"_blank\" rel=\"noreferrer noopener\">Codex CLI<\/a> for your backend work, adding the Android skills is a 30-second step that immediately makes those agents smarter about Android.<\/p>","protected":false},"excerpt":{"rendered":"<p>Google dropped the Android CLI on 16 April 2026, a single android binary meant for agents, CI pipelines, and anyone who would rather build from the terminal than from Android Studio. In internal experiments Google reports a 70% reduction in LLM token usage on project and environment setup, and 3x faster task completion compared with &#8230; <a title=\"Install Android CLI on Linux, macOS, and Windows (Agent-Ready)\" class=\"read-more\" href=\"https:\/\/computingforgeeks.com\/install-android-cli-linux-macos-windows\/\" aria-label=\"Read more about Install Android CLI on Linux, macOS, and Windows (Agent-Ready)\">Read more<\/a><\/p>\n","protected":false},"author":17,"featured_media":166636,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39034,50,320],"tags":[17245,660,669,282],"cfg_series":[],"class_list":["post-166640","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai","category-linux-tutorials","category-macos","tag-ai","tag-android","tag-dev","tag-linux"],"_links":{"self":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/166640","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/comments?post=166640"}],"version-history":[{"count":4,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/166640\/revisions"}],"predecessor-version":[{"id":166645,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/166640\/revisions\/166645"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media\/166636"}],"wp:attachment":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media?parent=166640"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/categories?post=166640"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/tags?post=166640"},{"taxonomy":"cfg_series","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/cfg_series?post=166640"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}