What problem does it solve?
This Skill solves flaky and misleading Android test CI pipelines caused by unreliable adb scripting, incorrect pass/fail detection, and missing cleanup between runs.
Core Features & Use Cases
- Correct CI pass/fail parsing for
am instrument: ensures you do not trust $? from am instrument and instead parse INSTRUMENTATION_STATUS_CODE lines to distinguish -1/-2 failures from -3/-4 skips.
- Reliable device orchestration: supports sharded execution (
--num-shards / --shard-index via -e) and parallel fan-out across multiple devices while keeping setup/installation serialized.
- Fewer infrastructure incidents: adds bounded retries for transient
adb transport errors with adb kill-server/adb start-server, enforces host-side timeouts with timeout (not adb -t), and performs idempotent setup plus trap-based cleanup (port forwards, animation scales, pm clear/force-stop/uninstall).
- Better failure forensics: captures
screencap and logcat -d on failure to make debugging actionable.
- Test Orchestrator wiring: installs and uses Android Test Orchestrator via
androidTestUtil("androidx.test:orchestrator:1.6.1") (not androidTestImplementation) for hermetic per-test execution.
Quick Start
Use the scripting-adb-for-ci skill to run your instrumented tests in CI while safely parsing results and collecting artifacts on failure.