fluxxion82/android-emulator-skill
Overview
This skill provides production-ready Python scripts to build, test, and automate Android apps using accessibility-driven, semantic UI navigation instead of pixel coordinates. It manages emulator lifecycle, Gradle builds, accessibility audits, visual diffs, and device interactions with compact, machine-readable output. The toolset is optimized for AI agents and CI/CD pipelines with JSON and verbose modes.
How this skill works
Scripts use ADB, emulator/avdmanager, and UI hierarchy dumps to inspect the accessibility tree and interact with elements by text, type, or resource ID. Actions return token-efficient summaries or full JSON payloads for easy parsing, and support headless emulators, real devices, batch operations, and structured debugging snapshots. Built-in features include Gradle integration, accessibility audits, log filtering, and automated test recording.
When to use it
- Automating UI interactions and acceptance tests without relying on screen coordinates
- Provisioning, booting, erasing, or deleting emulators in CI/CD pipelines
- Running Gradle builds and parsing test failures in minimal, machine-friendly output
- Auditing accessibility (WCAG) and generating JSON/Markdown reports
- Capturing full debug snapshots (screenshots, UI hierarchy, logs) for incident triage
Best practices
- Prefer semantic lookups (text/type/id) to make tests resilient to layout changes
- Use --json in CI to produce structured artifacts for downstream parsers
- Create ephemeral AVDs in CI with create → boot → test → delete to avoid state leakage
- Combine accessibility audits with visual diffs to catch functional and presentation regressions
- Run log_monitor with app-specific filters to reduce noise and speed triage
Example use cases
- CI pipeline: create AVD, boot headless, build project, run UI tests, capture artifacts, then delete AVD
- Manual QA: launch app, map screen to list interactive elements, tap buttons and enter text using navigator
- Accessibility sweep: run accessibility_audit across screens and export JSON report for engineering
- Debugging: capture app_state snapshot and stream filtered logcat to reproduce and diagnose failures
- Automated test documentation: record test steps with screenshots and UI hierarchy to generate reproducible reports
FAQ
Yes. All scripts support real devices via ADB serial detection and the same semantic interaction methods.
How do I integrate with CI?
Create and boot AVDs programmatically, run build_and_test with --json, collect artifacts, then shutdown and delete AVDs as part of the pipeline.