| name | android-cli |
| description | Reference for the AndroidSdk.Tool CLI (`android` command) - a .NET global tool for Android SDK automation. Use when: (1) Managing Android SDK packages (list, install, uninstall, download), (2) Working with AVDs/emulators (create, delete, start, list), (3) Interacting with connected devices via ADB (list devices, get properties, install/uninstall APKs), (4) Locating or configuring JDK for Android development, (5) Setting up CI/CD for Android or .NET MAUI development, (6) Reading APK manifest information, (7) Accepting SDK licenses non-interactively. |
AndroidSdk.Tool CLI Reference
The android CLI is a .NET global tool providing programmatic access to Android SDK management. Install with:
dotnet tool install -g AndroidSdk.Tool
Command Groups
| Group | Purpose |
|---|
sdk | SDK package management (list, install, download, licenses) |
avd | Android Virtual Device management (create, delete, start) |
device | Connected device operations via ADB |
jdk | JDK discovery and configuration |
apk | APK inspection tools |
Quick Start Examples
android sdk find
android sdk info
android sdk list --available
android sdk list --installed
android sdk install --package emulator
android sdk install --package "system-images;android-34;google_apis;x86_64"
android avd create --name TestDevice --sdk "system-images;android-34;google_apis;x86_64" --device pixel_6
android avd start --name TestDevice --wait-boot
android device list
android device install --package ./app.apk
Common Options
Most commands support:
-f|--format <json|xml> - Output as JSON or XML instead of table
-h|--home <path> - Specify Android SDK home path (overrides auto-detection)
Detailed Command Reference
For complete parameter details, see:
CI/CD Workflow Example
android sdk download --home /opt/android-sdk --force
android sdk accept-licenses --force
android sdk install --package "platform-tools"
android sdk install --package "emulator"
android sdk install --package "platforms;android-34"
android sdk install --package "system-images;android-34;google_apis;x86_64"
android avd create --name CI_Emulator --sdk "system-images;android-34;google_apis;x86_64" --device pixel_6 --force
android avd start --name CI_Emulator --no-window --no-audio --no-boot-anim --wait-boot --timeout 300
Setting .NET MAUI/Xamarin Preferred Paths
Configure the SDK/JDK paths that .NET Android workloads will use:
android sdk dotnet-prefer --home /path/to/android-sdk
android jdk dotnet-prefer --home /path/to/jdk