--- description: Android emulator/device automation via ADB — screenshots, UI dump, gestures, APK install, CeCe validation capture alwaysApply: false --- # Android ADB Automation Prefer the local command layer (symlink in this repo): ```bash ./tools/android ... --json ``` Upstream skill pack: `/Users/jack/tools/android-adb-skill/` Command contract: `tools/android-adb-docs/command-contract.md` Task skills: `~/.claude/skills/android-*/SKILL.md`(已 symlink) ## Environment ```bash export ANDROID_HOME=/opt/homebrew/share/android-commandlinetools export ANDROID_SDK_ROOT="$ANDROID_HOME" export PATH="$ANDROID_HOME/emulator:$ANDROID_HOME/platform-tools:$ANDROID_HOME/cmdline-tools/latest/bin:$PATH" ``` AVD name: `YuXinGu_API34` ```bash emulator -avd YuXinGu_API34 -netdelay none -netspeed full & adb wait-for-device ./tools/android device list --json ``` ## CeCe / 愈心谷校验采集 按 `.ai/product/feature-spec/cece-frontend-re/complete-design/99-emulator-validation.md`: - 证据目录:`.tmp/cece-validation/YYYYMMDD/V-xxx/` - 截图:`./tools/android screenshot --out .tmp/cece-validation/.../screen.png --json` - 点击:先 `ui dump` / `ui find`,**禁止**凭截图像素猜坐标 ## Defaults - Prefer `./tools/android ... --json` over raw `adb` - Pass `--device ` when multiple devices - Verify with `ui dump`, `wait element`, or `screenshot`