Generated banner for Android Emulator QA
Generated logo for Android Emulator QA

Android Emulator QA

OpenAIOfficialCreated by OpenAIDistributed by OpenAI

  • Skill
  • Review and audit
  • Software development
  • Apache-2.0
  • Low risk
  • Has scripts

From the author

Use when validating Android feature flows in an emulator with adb-driven launch, input, UI-tree inspection, screenshots, and logcat capture.
— the description by OpenAI

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides a structured approach to performing quality assurance on Android applications within an emulator environment. It leverages the Android Debug Bridge (ADB) to programmatically control app lifecycle, simulate user interactions, inspect UI hierarchies, and capture diagnostic logs. By utilizing provided helper scripts for UI tree analysis, developers can reliably locate elements and automate complex navigation flows for testing purposes.

What it does

  • Automates app installation and launch sequences via ADB.
  • Simulates user input events including taps, swipes, and text entry.
  • Extracts and parses UI tree data to identify interactive elements.
  • Captures screenshots for visual verification of app states.
  • Streams and filters logcat output to monitor process activity and crashes.

When to use it

  • When you need to perform automated QA on specific Android feature flows.
  • When reproducing UI-related bugs that require precise navigation.
  • When you need to verify UI element presence and state via XML dumps.
  • When gathering diagnostic logs or screenshots during a test session.

Advantages

  • Reduces manual testing effort by automating repetitive navigation.
  • Provides precise control over input events to ensure consistent test execution.
  • Enables programmatic inspection of the UI hierarchy for reliable element targeting.
  • Facilitates efficient debugging through targeted logcat capture.

Usage examples

“How do I find the coordinates for the Settings button in my app?”
The agent will dump the UI tree to an XML file, use the provided helper script to parse the bounds, and return the center coordinates for the tap command.
“Capture the logs for my app process and save them to a file.”
The agent will identify the process ID for your package and execute a logcat command to stream and save the relevant logs to a specified file.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/openai/android-emulator-qa/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip android-emulator-qa.zip -d .agents/skills

Documentation by OpenAI

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

  1. List emulators and pick a serial:

    • adb devices

  2. Build and install the target variant:

    • ./gradlew :<module>:install<BuildVariant> --console=plain --quiet

    • If unsure about task names: ./gradlew tasks --all | rg install

  3. 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>

  4. 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.

  1. Dump the UI tree to a step-specific file:

    • adb -s <serial> exec-out uiautomator dump /dev/tty > /tmp/ui-settings.xml

  2. 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"

  3. If the node is missing and there are scrollable elements:

    • swipe, re-dump, and re-search at least once before concluding the target is missing.

  4. 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.

  1. Dump full UI tree:

    • adb -s <serial> exec-out uiautomator dump /dev/tty > /tmp/ui-full.xml

  2. Generate summary:

    • python3 <path-to-skill>/scripts/ui_tree_summarize.py /tmp/ui-full.xml /tmp/ui-summary.txt

  3. Review /tmp/ui-summary.txt to choose likely targets, then compute exact bounds from full XML.

Logs (logcat)

  1. Clear logs:

    • adb -s <serial> logcat -c

  2. Stream app process logs:

    • Resolve pid: adb -s <serial> shell pidof -s <package>

    • Stream: adb -s <serial> logcat --pid <pid>

  3. Crash buffer only:

    • adb -s <serial> logcat -b crash

  4. 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>

Files

Requirements and compatibility

Written for: OpenAI Codex

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs Python, Needs Node.js

Security

What our scanner noticed· Low risk

  • Scripts that your agent may run

This skill includes scripts that your agent may run. Read them before you use it.

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
OpenAI
Publisher
OpenAI (Official)
Distributed by
OpenAI
Source
openai/plugins · plugins/test-android-apps/skills/android-emulator-qa · commit d420d13
Licence
Apache License 2.0 (redistribution allowed)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by OpenAI.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download android-emulator-qa.zip