agentleFS
leaf76leaf76/agent-skills/adb-android-app-ops/SKILL.md

adb-android-app-ops

Skill0 starsChanged 3 months agoMITView on GitHub

Operate and monitor Android apps/devices via adb (Android Debug Bridge): list/select devices, install/uninstall APKs, start/stop/clear apps, send intents/deep links, simulate input (tap/swipe/text/keyevent), capture screenshots/screen recordings, dump UI hierarchy, and collect diagnostics (logcat crash/ANR, dumpsys meminfo/cpu/activity). Use when a task needs adb commands or repeatable adb automation from the terminal.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use adb to monitor and control Android apps from the terminal, with a preference for bounded, non-hanging commands.

    line 10
  2. Very specific:

    Use the bundled scripts/adb_app.py wrapper for repeatable operations and optional JSON output.

    line 11
  3. Very specific:

    Prefer bounded commands that return (avoid indefinite adb logcat streams):

    line 47
  4. Very specific:

    If a device shows up as unauthorized, re-approve USB debugging on the device/emulator.

    line 82
  5. Very specific:

    If multiple devices/emulators are attached, always set --serial or ANDROID_SERIAL to avoid acting on the wrong device.

    line 91

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Adb Android App Ops

Overview

Use adb to monitor and control Android apps from the terminal, with a preference for bounded, non-hanging commands. Use the bundled scripts/adb_app.py wrapper for repeatable operations and optional JSON output.

Quick Start

List connected devices:

python3 scripts/adb_app.py devices
python3 scripts/adb_app.py devices --json

Select a device (recommended whenever more than one device/emulator is attached):

export ANDROID_SERIAL="emulator-5554"
python3 scripts/adb_app.py --serial "emulator-5554" current-activity

Find the app package name (raw adb, since this depends on your naming convention):

adb shell pm list packages | rg -i "keyword"

Launch, collect logs, and capture artifacts:

python3 scripts/adb_app.py start --package "com.example.app"
python3 scripts/adb_app.py logcat-dump --package "com.example.app" --since 2m
python3 scripts/adb_app.py logcat-dump --buffer crash --since 10m
python3 scripts/adb_app.py screenshot --out "./screenshot.png"
python3 scripts/adb_app.py uidump --out "./uidump.xml"

Monitoring / Diagnostics

Prefer bounded commands that return (avoid indefinite adb logcat streams):

python3 scripts/adb_app.py logcat-follow --seconds 15 --package "com.example.app"
python3 scripts/adb_app.py meminfo --package "com.example.app"
python3 scripts/adb_app.py cpuinfo
python3 scripts/adb_app.py current-activity

App Control

App lifecycle:

python3 scripts/adb_app.py stop --package "com.example.app"
python3 scripts/adb_app.py clear --package "com.example.app" --yes

Deep links / intents:

python3 scripts/adb_app.py deeplink --url "myapp://path?x=1" --package "com.example.app"

Input simulation:

python3 scripts/adb_app.py tap --x 300 --y 800
python3 scripts/adb_app.py swipe --x1 100 --y1 800 --x2 100 --y2 200 --duration-ms 250
python3 scripts/adb_app.py text --text "hello world"
python3 scripts/adb_app.py keyevent --key "KEYCODE_BACK"

Troubleshooting (adb)

If a device shows up as unauthorized, re-approve USB debugging on the device/emulator.

Restart adb server:

adb kill-server
adb start-server

If multiple devices/emulators are attached, always set --serial or ANDROID_SERIAL to avoid acting on the wrong device.

References

  • references/adb-cheatsheet.md

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.