android-emulator-qa
Use when validating Android feature flows in an emulator with adb-driven launch, input, UI-tree inspection, screenshots, and logcat capture.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-22
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- android-emulator-qa
- description
- Use when validating Android feature flows in an emulator with adb-driven launch, input, UI-tree inspection, screenshots, and logcat capture.
02 资源文件 4
- 参考文档agents/openai.yaml408 B
- 许可证LICENSE.txt10.5 KB
- 脚本scripts/ui_pick.py1.8 KB
- 脚本scripts/ui_tree_summarize.py3.2 KB
03 SKILL.md 正文
Android Emulator QA
Validate Android app flows in an emulator using adb for launch, input, UI-tree inspection, screenshots, and logs.
When to use
- QA a feature flow in an Android emulator.
- Reproduce UI bugs by driving navigation with adb input events.
- Capture screenshots and logcat output while testing.
Quick start
- List emulators and pick a serial:
adb devices
- Build and install the target variant:
./gradlew :<module>:install<BuildVariant> --console=plain --quiet- If unsure about task names:
./gradlew tasks --all | rg install
- Launch the app:
- Resolve activity:
adb -s <serial> shell cmd package resolve-activity --brief <package> - Start app:
adb -s <serial> shell am start -n <package>/<activity>
- Resolve activity:
- Capture a screenshot for visual verification:
adb -s <serial> exec-out screencap -p > /tmp/emu.png
adb control commands
- Tap (use UI tree-derived coordinates):
adb -s <serial> shell input tap <x> <y>
- Swipe:
adb -s <serial> shell input swipe <x1> <y1> <x2> <y2>- Avoid edges (start ~150-200 px from left/right) to reduce accidental back gestures.
- Text:
adb -s <serial> shell input text "hello"
- Back:
adb -s <serial> shell input keyevent 4
- UI tree dump:
adb -s <serial> exec-out uiautomator dump /dev/tty
Coordinate picking (UI tree only)
Always compute tap coordinates from the UI tree, not screenshots.
- Dump the UI tree to a step-specific file:
adb -s <serial> exec-out uiautomator dump /dev/tty > /tmp/ui-settings.xml
- Find the target node and derive center coordinates (
x y) from bounds:- Bounds format:
bounds="[x1,y1][x2,y2]" - Helper script:
python3 <path-to-skill>/scripts/ui_pick.py /tmp/ui-settings.xml "Settings"
- Bounds format:
- If the node is missing and there are
scrollableelements:- swipe, re-dump, and re-search at least once before concluding the target is missing.
- Tap the center:
adb -s <serial> shell input tap <x> <y>
UI tree skeleton (helper)
Use this helper to create a compact, readable overview before inspecting full XML.
- Dump full UI tree:
adb -s <serial> exec-out uiautomator dump /dev/tty > /tmp/ui-full.xml
- Generate summary:
python3 <path-to-skill>/scripts/ui_tree_summarize.py /tmp/ui-full.xml /tmp/ui-summary.txt
- Review
/tmp/ui-summary.txtto choose likely targets, then compute exact bounds from full XML.
Logs (logcat)
- Clear logs:
adb -s <serial> logcat -c
- Stream app process logs:
- Resolve pid:
adb -s <serial> shell pidof -s <package> - Stream:
adb -s <serial> logcat --pid <pid>
- Resolve pid:
- Crash buffer only:
adb -s <serial> logcat -b crash
- Save logs:
adb -s <serial> logcat -d > /tmp/logcat.txt
Package shortcuts
- List installed packages:
adb -s <serial> shell pm list packages
- Filter to your namespace:
adb -s <serial> shell pm list packages | rg <company_or_app_id>
- Confirm the activity resolves before launching:
adb -s <serial> shell cmd package resolve-activity --brief <package>
04 同仓库更多 Skills
skill-installer
Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos).
skill-creator
Create or update a Codex skill with appropriately scoped instructions and any needed supporting resources.
review-agent
Perform a read-only, defect-first review of a specified code change and return every actionable finding. Use when another agent delegates review of uncommitted changes, a base-branch diff, a commit, or custom review instructions.
plugin-creator
Create and scaffold plugin directories for Codex with a required `.codex-plugin/plugin.json`, optional plugin folders/files, valid manifest defaults, and personal-marketplace entries by default. Use when Codex needs to create a new personal plugin, add optional plugin structure, generate or update marketplace entries for plugin ordering and availability metadata, or update an existing local plugin during development with the CLI-driven cachebuster and reinstall flow.
openai-docs
Use for Codex models/pricing, scheduled tasks, skills, settings, setup, troubleshooting, customization, automations, and self-knowledge—including 'you,' 'your,' 'this app,' or 'this coding agent' when they refer to Codex—and for OpenAI APIs/products and ChatGPT Work. Also use for model choice/migration, prompting, SDKs, Responses, Realtime, agents, evals, and Chat/Work/Codex comparisons. Do not use for generic app/software tasks that merely mention Codex.
imagegen
Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output should be a bitmap asset rather than repo-native code or vector. Do not use when the task is better handled by editing existing SVG/vector/code-native assets, extending an established icon or logo system, or building the visual directly in HTML/CSS/canvas.