| name | android-emulator |
| description | Manage Android Virtual Devices and required system images via the Android CLI (`android emulator` + `android sdk install`). Use when the user wants to create, list, start, or stop an emulator; install a system image needed for an emulator; or recover from "no devices connected". Triggers include "์๋ฎฌ๋ ์ดํฐ ๋ง๋ค์ด์ค", "์๋ฎฌ ์ผ์ค", "AVD ์์ฑ", "system image ์ค์น", "์๋ฎฌ ์ข
๋ฃ", "์๋ฎฌ๋ ์ดํฐ ๋ชฉ๋ก", "Pixel ์๋ฎฌ". Do NOT use this skill to deploy apps โ `android-deploy` handles that. |
android-emulator
End-to-end emulator management: install the necessary system image, create the AVD with the right profile, boot it cold, wait until it's actually ready, and stop it cleanly when done.
Configuration
{
"androidCli": {
"defaultProfile": "medium_phone",
"systemImage": "system-images/android-34/google_apis/x86_64",
"sdkChannel": "stable"
}
}
| Field | Purpose |
|---|
androidCli.defaultProfile | Profile passed to android emulator create --profile=. Defaults to medium_phone when unset. |
androidCli.systemImage | System image package to ensure is installed before creating the AVD. |
androidCli.sdkChannel | stable, beta, or canary. Drives the --beta / --canary flag on android sdk install. |
If unset, ask once on first creation and save.
Platform support
โ ๏ธ Windows: android emulator is currently disabled on Windows. Detect via uname / OS env var first; if Windows, abort and instruct the user to:
- Use the Studio AVD Manager UI, or
- Use
avdmanager + emulator from the SDK directly.
Do not attempt android emulator commands on Windows.
Workflow
Create + boot from scratch
android emulator list
android sdk list 'system-images/android-'
android sdk install <systemImage>
android emulator create --list-profiles
android emulator create --profile=<defaultProfile>
android emulator start <avd-name>
adb wait-for-device
adb shell 'while [ "$(getprop sys.boot_completed)" != "1" ]; do sleep 1; done'
After step 4, it's safe to hand off to android-deploy.
Start an existing AVD
android emulator list
android emulator start <name>
adb wait-for-device shell 'while [ "$(getprop sys.boot_completed)" != "1" ]; do sleep 1; done'
Stop
adb devices
android emulator stop <serial>
android emulator stop takes the serial (e.g., emulator-5554), not the AVD name โ easy to mix up.
Profile selection
Run android emulator create --list-profiles to see what's actually available on the user's machine. Common profiles include medium_phone, pixel_8, pixel_tablet, wear_round, tv_4k. Don't hardcode names โ they evolve with the CLI.
If the user just says "make an emulator", default to androidCli.defaultProfile from config, or medium_phone if absent.
System image selection
System image packages follow system-images/android-<api>/<variant>/<abi>:
<api> โ API level. Default to the latest stable API the project actually targets (read from compileSdk in app/build.gradle.kts).
<variant> โ google_apis (Play services without Play Store), google_apis_playstore (with Play Store, signed builds only), aosp (no Google services).
<abi> โ x86_64 on x86 hosts, arm64-v8a on Apple Silicon.
For Apple Silicon, prefer arm64-v8a images for performance. x86_64 images run under emulation and are noticeably slower.
Operating rules
- Always wait for boot before deploying.
adb wait-for-device returns when the daemon is up, not when Android has finished booting. The sys.boot_completed poll is the correct gate.
- Match ABI to host architecture. Apple Silicon โ
arm64-v8a. Cross-arch images work but are slow.
- Don't pile up emulators. If the user's "make an emulator" intent overlaps with an existing one, ask before creating duplicates.
- Stop with serial, create with name. This is the consistent footgun โ
start <name>, stop <serial>.
- Skip on Windows. Detect early and route to
avdmanager + Studio.
- Prefer
google_apis over aosp unless the user specifically needs a Google-services-free environment โ most app code expects Play services to be present.
Anti-patterns
- โ Running
android run --apks=โฆ immediately after emulator start without waiting for sys.boot_completed=1. The install fires before package manager is ready and either fails or hangs.
- โ Installing
x86_64 system images on Apple Silicon "for compatibility". They run translated and are dramatically slower than native arm64-v8a.
- โ Using
google_apis_playstore for unsigned debug builds โ sideloading is restricted on Play Store images.
- โ Trying
android emulator on Windows. Known issue, will fail.
- โ Calling
android emulator stop <avd-name> (the AVD name) instead of <serial> โ silent no-op.
- โ Skipping
--list-profiles and hardcoding a profile name that the user's CLI version doesn't ship.
Error recovery
| Error | Cause | Fix |
|---|
No system image found for ABI | Image not installed | android sdk list 'system-images/' then android sdk install |
Emulator failed to launch | Hypervisor (HAXM/Hyper-V) misconfigured | Check emulator -accel-check from raw SDK; surface to user โ outside this skill's scope |
adb wait-for-device hangs > 60s | Emulator stuck on boot animation | Stop the emulator, recreate AVD; consider lower API level |
cannot find avd <name> | AVD with that name doesn't exist | android emulator list, use the actual name |
| Out of disk space mid-boot | Default disk too small | Stop, delete AVD, recreate with bigger profile (pixel_8 etc.) |