argent-android-emulator-setup
software-mansion/argent
Set up and connect to Android emulators for UI automation and testing.
What is argent-android-emulator-setup?
Configures Android emulator instances and establishes adb connections for automated interaction. Use this at the start of any Android testing session, when booting a new emulator, or before performing UI tasks on Android devices.
- List available Android devices and emulators with their connection state
- Boot Android Virtual Devices (AVDs) with automatic hot/cold boot selection
- Establish adb reverse tunneling for Metro (React Native) development
- Detect Android TV (leanback) devices and route them to appropriate interaction tools
- Provide device serial identifiers for downstream UI interaction tasks
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; not needed for existing devices)
- At least one Android Virtual Device (AVD) created via Android Studio or avdmanager
How to use argent-android-emulator-setup
- 1.Call list-devices to discover available Android devices and AVDs
- 2.Select a ready device (state: 'device') by its serial, or note an AVD name to boot
- 3.If no device is ready, call boot-device with the AVD name; the tool auto-selects hot or cold boot
- 4.For React Native: run 'adb -s <serial> reverse tcp:8081 tcp:8081' to enable Metro access from device
- 5.Pass the device serial as 'udid' to interaction tools like gesture-tap, describe, or launch-app
Use cases
- Starting a new Android automation session by listing devices and selecting one
- Booting an emulator AVD when no device is currently running
- Setting up Metro reverse proxy for React Native app testing on emulator
- Detecting whether a device is a phone or Android TV to choose correct interaction methods
- Preparing device state before running gesture or app interaction commands
- Mobile app developers testing on Android emulators
- QA engineers automating Android UI tests
- React Native developers running apps on emulators
- Test automation engineers setting up device farms
argent-android-emulator-setup FAQ
Hot boot (from snapshot) typically takes ~30 seconds; cold boot takes 2–10 minutes. The tool automatically probes and uses the faster path when available.
Android TV (leanback) devices are focus-driven, not touch-driven. Use describe/tv-remote/keyboard instead of gesture-tap/gesture-swipe. The tool tags them with runtimeKind: 'tv'.
Run 'adb -s <serial> emu kill' for clean shutdown. Avoid pkill -9 or kill -9, which can corrupt the userdata image and cause long recovery hangs on next boot.
No. Dispatch is automatic based on the serial format. Android serials and iOS UDIDs are not interchangeable, but you don't need to tell the tools which is which.
Android's describe lacks an accessibility-service equivalent like iOS has, so the returned tree is shallower. It still covers most tap targets for UI automation.
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.
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
- Android TV / leanback AVDs boot through this exact flow (same
boot-device+avdName), but they are focus-driven, not touch-driven — do not usegesture-tap/gesture-swipeon them.list-devicestags a leanback device withruntimeKind: "tv"(detected via the system feature list, not the serial — a TV AVD's serial looks just like a phone's). When you seeruntimeKind: "tv", drive it with the focus-driven tools (describe/tv-remote/keyboard) and theargent-tv-interactskill (it covers Android TV as well as Apple TV, including the full TV setup flow). - 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-create-flow
Create, record, edit, replay, or repair reusable Argent flow YAML files for repeatable device interactions.

argent-device-interact
Control iOS simulators, Android emulators, and Chromium apps with unified gesture and interaction tools.

argent-ios-device-interact
Control a physical iPhone through argent for automated testing and interaction.

argent-ios-device-setup
Set up a cabled physical iPhone for argent automation testing.

argent-ios-simulator-setup
Set up and boot iOS simulators, verify connection, and obtain UDIDs for simulator interaction tasks.

argent-lens
Propose and compare multiple visual design variants for UI elements with human selection.