android-cli

Manages Android SDKs, emulators, devices, and documentation through the android command-line tool.

Updated May 21, 2025
One-click install
npx skills add https://github.com/albertmartorell1975/MeteoMartoCompose --skill android-cli-albertmartorell1975
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: android-cli
Source: https://github.com/albertmartorell1975/MeteoMartoCompose/tree/main/.agents/skills/android-cli
Command: npx skills add https://github.com/albertmartorell1975/MeteoMartoCompose --skill android-cli-albertmartorell1975

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Android development requires juggling SDK packages, emulators, connected devices, UI inspection, and documentation lookups, which normally means switching between many separate tools. This Skill consolidates those tasks into a single android CLI workflow that an AI agent can execute directly. ## Core Features & Use Cases - SDK and Emulator Management: Install, update, and remove SDK packages, and create, start, stop, or delete Android Virtual Devices (AVDs). - Device Interaction and UI Inspection: Capture screenshots, dump UI layout trees as JSON, and drive devices with adb input commands for taps, swipes, and text entry. - Project Creation and App Deployment: Generate new Android projects from templates and deploy APKs to devices or emulators. - Documentation Search and Journey Testing: Query the official Android Knowledge Base for API guidance and execute XML-defined journey tests that verify app behavior step by step. - Use Case: While building a Jetpack Compose feature, use the CLI to launch an emulator, deploy the debug APK, inspect the layout tree to locate a button, tap it, and capture a screenshot to verify the result. ## Quick Start Ask the agent to install the android CLI, list available SDK packages, and create a new empty-activity project named My App.

Frequently Asked Questions about android-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I install the android CLI tool?▼

Install the android CLI by running the platform-specific curl command from Google's download server, such as the linux_x86_64 or darwin_arm64 install script. After installation, the `android` command becomes available in your path.

How do I inspect the UI layout of an Android app from the command line?▼

Run `android layout` to get a flat JSON list of UI elements with text, resource IDs, bounds, and interaction states. Use `android layout --diff` to see only elements that changed since the last call, which keeps output small.

How do I create and start an Android emulator from the CLI?▼

Use `android emulator create` to make a new virtual device and `android emulator start` to launch it; the start command returns once the emulator is fully booted. You can list and remove devices with the list and remove subcommands.

What is a journey test in Android app testing?▼

A journey is an XML-specified test containing sequential action elements that describe UI interactions and verifications. Each action is evaluated in order, and the journey fails if any action cannot be performed or an expectation is not met.

Why does android layout fail on some screens?▼

The layout command can fail when the app displays a WebView or an active animation. In those cases, use `android screen capture --annotate` to get a labeled screenshot and visually inspect the PNG instead.

Can I search official Android documentation from the command line?▼

Yes, the `android docs search` command queries the Android Knowledge Base for authoritative documentation. Provide keywords to retrieve articles with API examples, migration guides, and best practices.