| 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.) |