scripting-adb-for-ci

Orchestrate Android Debug Bridge operations in CI with exit codes and cleanup.

Updated Jul 20, 2026
One-click install
npx skills add https://github.com/trancee/MeshLink-template --skill scripting-adb-for-ci-trancee
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scripting-adb-for-ci
Source: https://github.com/trancee/MeshLink-template/tree/main/.agents/skills/android-testing-skills/adb/automation/scripting-adb-for-ci
Command: npx skills add https://github.com/trancee/MeshLink-template --skill scripting-adb-for-ci-trancee

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill solves the common issue of flaky Android CI pipelines where ADB commands fail silently, leak resources, or produce misleading exit codes that mask actual test failures.

Core Features & Use Cases

  • Robust CI Integration: Provides patterns for exit-code propagation, retries on transient errors, and parallel device fan-out using xargs.
  • Hermetic Test Environments: Includes idempotent setup and cleanup routines using trap to ensure clean state between test runs.
  • Use Case: If your CI job reports success despite failing tests or leaves port forwards hanging, use this skill to implement proper instrumentation status code parsing and automated cleanup.

Quick Start

Use the scripting-adb-for-ci skill to configure a robust CI pipeline that parses instrumentation status codes and cleans up device state after test execution.

Frequently Asked Questions about scripting-adb-for-ci

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent flaky ADB commands from failing my Android CI pipeline?

To prevent flaky ADB commands from failing your Android CI pipeline, implement transient error recovery and proper exit code propagation. This skill provides retry patterns and parses instrumentation status codes to ensure test failures are accurately reported.

What is the best way to parse Android instrumentation status codes in bash?

Parsing Android instrumentation status codes in bash involves extracting exit codes from test runs to distinguish between passing and failing tests. This skill implements robust instrumentation status code parsing to prevent CI jobs from reporting success despite actual test failures.

How do I run parallel ADB tests on multiple devices in a CI environment?

Running parallel ADB tests on multiple devices in a CI environment requires a parallel device fan-out strategy. This skill uses xargs to manage parallel device execution, distributing automated testing workflows across multiple connected Android devices simultaneously.

Why does my CI job leave ADB port forwards hanging after tests finish?

CI jobs leave ADB port forwards hanging after tests finish due to missing resource cleanup routines. This skill solves this by providing idempotent setup and cleanup routines using trap to ensure hermetic test isolation and clean device state between test runs.

Can I use bash trap for hermetic test environment cleanup in Android testing?

Yes, you can use bash trap for hermetic test environment cleanup in Android testing. This skill includes idempotent setup and cleanup routines that utilize trap to guarantee resource cleanup and ensure a clean state is maintained between automated test executions.

Does xargs support parallel device fan-out for ADB automation?

Yes, xargs supports parallel device fan-out for ADB automation by managing the execution of commands across multiple devices. This skill leverages xargs to orchestrate reliable parallel device execution within continuous integration environments for automated testing workflows.