scripting-adb-for-ci

Installation
SKILL.md

Scripting adb For CI — Bash Idioms, Exit Codes, Fan-out

This skill is the connective tissue that turns the other ADB skills into a CI pipeline: exit-code propagation, retries, timeouts, parallel device fan-out, port forwarding, idempotent setup, capture-on-failure, and Test Orchestrator wiring. Each section cross-links to the skill that owns the underlying primitive.

When to use this skill

  • A CI job invokes adb shell am instrument and "passes" even when tests fail — it gates on $?, but am instrument always exits 0; the real status lives in INSTRUMENTATION_STATUS_CODE lines on stdout (and -w is needed just to get that stdout at all).
  • The team has multiple physical devices on a single agent and wants to run sharded tests in parallel.
  • adb forward and adb reverse are confused — most teams have at least one bug from the opposite argument order.
  • Transient error: device not found / error: closed failures are not retried; the job fails on the first hiccup.
  • A script lacks cleanup so leaked port forwards or modified settings put global ... survive into the next run.
  • The team wires Test Orchestrator with androidTestImplementation — the build silently fails to install the orchestrator APK.

When NOT to use this skill

  • The single primitive (logcat, screencap, pull, push, settings, input, am instrument) is not yet understood. Read the relevant sibling skill first.
  • The CI itself (Gradle plugin, Firebase Test Lab cloud config). Use FTL's own docs for that layer.
  • Compose / instrumentation test mechanics. Use ../../../compose/synchronization/synchronizing-with-idle/SKILL.md and friends.
Installs
39
GitHub Stars
319
First Seen
May 16, 2026
scripting-adb-for-ci — skydoves/android-testing-skills