argent-android-emulator-setup
software-mansion/argent
Set up and boot Android emulators, connect via adb, and prepare for UI automation.
What is argent-android-emulator-setup?
Configures Android emulator environments using argent MCP tools. Use this at the start of an Android testing session to list available devices, boot an emulator if needed, and establish the connection required for subsequent interaction tasks.
- List available Android devices and emulators with their connection state
- Boot Android Virtual Devices (AVDs) with automatic hot/cold boot selection
- Verify Android SDK Platform Tools and emulator installation
- Set up Metro reverse proxy for React Native debugging
- Provide device serial for use with interaction tools
How to install argent-android-emulator-setup
npx skills add https://github.com/software-mansion/argent --skill argent-android-emulator-setup- Android SDK Platform Tools (adb) on PATH
- Android Emulator on PATH (if booting AVDs; adb alone sufficient for existing devices)
- At least one AVD created via Android Studio or avdmanager
How to use argent-android-emulator-setup
- 1.Call list-devices and filter for platform: 'android' entries
- 2.Select the first ready device (state: 'device') or note its serial
- 3.If no Android device is ready, call boot-device with an avdName from the list-devices response
- 4.Wait for boot to complete (hot boot ~30s, cold boot 2–10 min)
- 5.Run adb reverse tcp:8081 tcp:8081 if using React Native Metro
- 6.Pass the device serial as udid to interaction tools (gesture-tap, describe, screenshot, etc.)
Use cases
- Starting a new Android automation session and selecting an emulator
- Booting a stopped AVD before running UI tests
- Verifying adb connectivity and device readiness before interaction tasks
- Setting up Metro debugging for React Native apps on emulator
- Recovering from emulator crashes by ensuring clean state on next boot
- Mobile QA engineers testing Android apps
- React Native developers debugging on emulator
- Automation engineers setting up CI/CD for Android testing
- Mobile app developers iterating on emulator-based workflows
argent-android-emulator-setup FAQ
The boot-device tool automatically probes the AVD's default_boot snapshot and uses hot boot (~30s) if available. If the snapshot is unavailable or fails, it falls back to cold boot (2–10 min). You do not need to specify which.
Never use pkill -9 or kill -9 on qemu; hard kills leave the userdata image dirty and cause long recovery hangs. Use adb -s <serial> emu kill for clean shutdown. If stuck, boot once with -wipe-data to reset the image.
No. Device dispatch is automatic based on serial format (Android serials vs iOS UDIDs). Pass the serial as udid and the tools route correctly.
Android lacks an accessibility-service equivalent to iOS, so the returned tree is less detailed. However, it still covers most tap targets needed for interaction.
Only for React Native apps. Run adb -s <serial> reverse tcp:8081 tcp:8081 once the device is up so the app can reach Metro on your host. Repeat if the device restarts.
Full instructions (SKILL.md)
Source of truth, from software-mansion/argent.
name: argent-android-emulator-setup description: Set up and connect to an Android emulator using argent MCP tools. Use when starting a new session on Android, booting an emulator, getting a device serial, or before any UI interaction task.
1. Prerequisites
- Android SDK Platform Tools on PATH — provides
adb. - Android Emulator on PATH — needed to boot AVDs. If you will only use an already-running emulator or a physical device, adb alone is sufficient.
- An AVD created via Android Studio or
avdmanager create avd.
Verify with adb version and emulator -list-avds.
2. Setup
- Find a ready device — call
list-devices. Filter for entries withplatform: "android". Ready devices (state: "device") come first. Pick the firstserial(e.g.emulator-5554) unless the user specified one. - Boot if needed — if nothing Android is ready, call
boot-devicewithavdName: <name>from the same call'savdslist. The tool transparently picks hot vs cold boot: it probes the AVD'sdefault_bootsnapshot, restores it under a tight deadline when usable, and falls back to a full cold boot otherwise. Hot path is typically ~30s; cold path takes 2–10 min. On any stage failure the tool kills the emulator process it started so your next call starts from a clean state. - Metro (for React Native) — once a device is up, run
adb -s <serial> reverse tcp:8081 tcp:8081so the device can reach Metro on your host. Repeat if the device restarts. See theargent-metro-debuggerskill.
3. Using the device
Pass the Android serial as udid to the unified interaction tools — gesture-tap, gesture-swipe, describe, screenshot, launch-app, keyboard, etc. Dispatch is automatic based on the id shape. See argent-device-interact for platform-neutral interaction tooling and the Android-specific gotchas section at the bottom of that skill.
4. Notes
- Serials are the adb device id. iOS UDIDs and Android serials are not interchangeable, but you do NOT need to tell the tools which platform — dispatch is automatic.
describeon Android returns a shallower tree than iOS (no accessibility-service equivalent), but covers most tap-target discovery.reinstall-appon Android always installs with-gso first-launch runtime permissions are pre-granted.- To stop the emulator, run
adb -s <serial> emu killfrom a shell (clean shutdown). Neverpkill -9/kill -9qemu — a hard kill leaves the userdata image dirty, after which cold boots can hang for many minutes doing recovery (runaway writes,boot_completednever flips). If an image gets into that state, boot once with-wipe-datato reset it.
Related skills
More from software-mansion/argent and the wider catalog.
argent-device-interact
Interact with iOS simulators, Android emulators, and Chromium apps using unified gesture and UI automation tools.
argent-react-native-app-workflow
Step-by-step workflows for developing and debugging React Native apps on iOS and Android emulators.
argent-ios-simulator-setup
Set up and connect to iOS simulators using argent MCP tools for automated testing and interaction.
argent-test-ui-flow
Autonomously test iOS/Android app UI flows with interact-screenshot-verify loops using argent MCP tools.
argent-react-native-profiler
Profile React Native Hermes apps to measure re-render and CPU performance with argent profiler tools.
argent-metro-debugger
Debug React Native (Metro) and Chromium apps via Chrome DevTools Protocol with component inspection and console access.