Agent Skills › software-mansion/argent › argent-android-emulator-setup

argent-android-emulator-setup

GitHub

配置Android模拟器环境,包括查找设备、启动AVD及连接Metro服务。支持非默认ADB服务器场景,自动注入命令前缀以解决Agent本地执行adb时的环境问题,确保UI交互工具能正确识别设备序列号。

packages/skills/skills/argent-android-emulator-setup/SKILL.md software-mansion/argent

触发场景

启动新的Android会话 需要引导或重启Android模拟器 获取Android设备序列号 在UI交互任务前准备环境

安装

npx skills add software-mansion/argent --skill argent-android-emulator-setup -g -y
更多选项

非标准路径

npx skills add https://github.com/software-mansion/argent/tree/main/packages/skills/skills/argent-android-emulator-setup -g -y

不安装直接使用

npx skills use software-mansion/argent@argent-android-emulator-setup

指定 Agent (Claude Code)

npx skills add software-mansion/argent --skill argent-android-emulator-setup -a claude-code -g -y

安装 repo 全部 skill

npx skills add software-mansion/argent --all -g -y

预览 repo 内 skill

npx skills add software-mansion/argent --list

SKILL.md

Frontmatter
{
    "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

The Android SDK (platform tools and emulator) and an AVD, created in Android Studio or with avdmanager create avd. If list-devices returns no Android devices and no avds, either no AVD exists or Argent can't find the SDK. Then run argent config set android.sdkRoot <sdk-path> and call list-devices again after a minute: a failed SDK lookup is cached that long. Exporting ANDROID_HOME in your shell doesn't reach the tool-server that is already running.

2. Setup

  1. Find a ready device: call list-devices. Filter for entries with platform: "android". Ready devices (state: "device") come first. If the user named a device, use it. Otherwise pick the first kind: "emulator" that fits the task. Take a physical phone (kind: "device") only when the user asks for one. If the result has a hint about the adb server, prefix every adb command that you run yourself, as the hint shows.
  2. Boot if needed: if no such emulator is ready, call boot-device with avdName: <name> from the same call's avds list. avds doesn't mark TV images: for a TV task, pick the AVD by its name.

3. Using the device

Pass the Android serial as udid to the same interaction tools as on iOS. See argent-device-interact for interaction tooling and the Android notes at the bottom of that skill. If a React Native app can't reach Metro, see argent-metro-debugger §1.

4. Notes

  • Android TV / leanback AVDs boot through this exact flow, but list-devices tags them runtimeKind: "tv" and they are focus-driven: use the argent-tv-interact skill, not the gesture tools.
  • 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.

版本历史

  • b965c94 当前 2026-11-07 15:13
  • 617db8d 2026-11-02 18:47

    新增list-devices对非默认ADB服务器的提示机制,指导Agent在自定义shell中运行adb时添加必要的环境变量前缀,避免设备找不到问题。

  • f0e04a6 2026-10-19 02:08

    将工具描述和规则中的 em dash 替换为标点符号,统一文本格式。

  • 3c1f2ae 2026-09-22 07:44

    优化指令描述,简化并整合了与metro-debugger相关的说明,消除冗余。

  • bc04c3b 2026-07-06 19:58

同 Skill 集合

packages/skills/skills/argent-create-e2e/SKILL.md
packages/skills/skills/argent-create-flow/SKILL.md
packages/skills/skills/argent-device-interact/SKILL.md
packages/skills/skills/argent-ios-device-interact/SKILL.md
packages/skills/skills/argent-ios-device-setup/SKILL.md
packages/skills/skills/argent-ios-simulator-setup/SKILL.md
packages/skills/skills/argent-lens/SKILL.md
packages/skills/skills/argent-metro-debugger/SKILL.md
packages/skills/skills/argent-native-profiler/SKILL.md
packages/skills/skills/argent-react-native-app-workflow/SKILL.md
packages/skills/skills/argent-react-native-optimization/SKILL.md
packages/skills/skills/argent-react-native-profiler/SKILL.md
packages/skills/skills/argent-screen-recording/SKILL.md
packages/skills/skills/argent-screenshot-diff/SKILL.md
packages/skills/skills/argent-test-ui-flow/SKILL.md
packages/skills/skills/argent-tv-interact/SKILL.md
packages/skills/skills/argent-qa-e2e/SKILL.md
packages/skills/skills/argent-qa-flows/SKILL.md
packages/skills/skills/argent-settings-permissions/SKILL.md

元信息

文件数
0
版本
b965c94
Hash
fedaa2be
收录时间
2026-07-06 19:58

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-11-10 08:44
浙ICP备14020137号-1