
Argent Android Emulator Setup
Boot or attach an Android emulator via Argent MCP and get a device serial before any mobile UI automation.
Overview
Argent Android emulator setup is an agent skill for the Build phase that connects your agent to an Android emulator or device through Argent MCP, adb, and optional Metro reverse before UI work.
Install
npx skills add https://github.com/software-mansion/argent --skill argent-android-emulator-setupWhat is this skill?
- Uses `list-devices` then picks the first ready Android `serial` unless the user specifies one.
- `boot-device` chooses hot vs cold boot with snapshot restore and kills the process on failure for a clean retry.
- Documents React Native Metro via `adb reverse tcp:8081 tcp:8081` after the device is up.
- Prerequisites checklist: `adb`, `emulator`, and an AVD from Android Studio or `avdmanager`.
- Intended handoff into Argent UI flow testing once a serial is stable.
- Hot-boot path is documented as typically ~30s; cold boot 2–10 minutes.
- Three-step setup: list-devices, boot-device if needed, Metro reverse on tcp:8081.
Adoption & trust: 1.9k installs on skills.sh; 1.2k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You want to run Argent-driven Android UI tasks but have no verified device serial, emulator boot path, or Metro reachability from the virtual device.
Who is it for?
Indie mobile devs using Claude Code or Cursor with Argent MCP who automate Android or React Native UI checks locally.
Skip if: Teams that only test on CI device farms without local emulators, or iOS-only workflows—use argent-ios-simulator-setup instead.
When should I use this skill?
Starting a new session on Android, booting an emulator, getting a device serial, or before any UI interaction task.
What do I get? / Deliverables
You get a ready Android `serial`, a clean boot state on retries, and host-to-device Metro routing so the next step can invoke argent-test-ui-flow safely.
- Selected Android device serial (e.g. emulator-5554)
- Booted emulator with failed-process cleanup on errors
- Metro reverse tunnel when testing React Native
Recommended Skills
Journey fit
Emulator setup is build-time tooling that wires your agent to a real Android target through MCP and adb. Listing devices, cold/hot boot, and Metro port reverse are integration steps between the host SDK and the app under test.
How it compares
Use this local MCP bootstrap instead of manual adb/emulator shell juggling in chat.
Common Questions / FAQ
Who is argent-android-emulator-setup for?
Solo and small-team mobile builders who use Argent MCP tools and need a repeatable Android emulator or device connection before automated UI interaction.
When should I use argent-android-emulator-setup?
At the start of an Android session, when booting an AVD, when resolving a device serial, or immediately before argent-test-ui-flow—during Build integrations and again in Ship testing when you re-verify on emulator.
Is argent-android-emulator-setup safe to install?
Review the Security Audits panel on this Prism page and your org policy before granting shell and device-control permissions implied by adb and emulator tooling.
Workflow Chain
Then invoke: argent test ui flow
SKILL.md
READMESKILL.md - Argent Android Emulator Setup
## 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 1. **Find a ready device** — call `list-devices`. Filter for entries with `platform: "android"`. Ready devices (`state: "device"`) come first. Pick the first `serial` (e.g. `emulator-5554`) unless the user specified one. 2. **Boot if needed** — if nothing Android is ready, call `boot-device` with `avdName: <name>` from the same call's `avds` list. The tool transparently picks hot vs cold boot: it probes the AVD's `default_boot` snapshot, 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. 3. **Metro (for React Native)** — once a device is up, run `adb -s <serial> reverse tcp:8081 tcp:8081` so the device can reach Metro on your host. Repeat if the device restarts. See the `argent-metro-debugger` skill. ## 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. - `describe` on Android returns a shallower tree than iOS (no accessibility-service equivalent), but covers most tap-target discovery. - `reinstall-app` on Android always installs with `-g` so first-launch runtime permissions are pre-granted. - To stop the emulator, run `adb -s <serial> emu kill` from a shell (clean shutdown). Never `pkill -9`/`kill -9` qemu — a hard kill leaves the userdata image dirty, after which cold boots can hang for many minutes doing recovery (runaway writes, `boot_completed` never flips). If an image gets into that state, boot once with `-wipe-data` to reset it.