r/androiddev • u/incredulouspig • 2d ago
Android ADB Skill: let AI coding agents drive an Android device or emulator, no MCP server needed
I made a small open-source toolkit that lets AI coding agents (Claude Code, Codex, Cursor, Copilot and others) control an Android device or emulator through adb.
It has two parts: - ./tools/android, a single Python script with a stable command set: screenshots, UI hierarchy dumps, finding and tapping elements, swipes and scrolls, waiting for an element, installing and launching APKs, and reading logcat. Every command supports --json, so the agent gets structured output instead of parsing free text. - Short skill files for common tasks like navigating to a screen, running a test flow, or debugging a crash. They call the script instead of raw adb.
Why not an MCP server? I started with one and found that the useful part was the command design, not the server. A plain script has no extra process to run, keeps adb details like device selection, text escaping and UI parsing in one place, and is easy to test. The test suite uses a fake adb, so CI doesn't need a device.
Example prompts: /android open Settings and navigate to Privacy /android-test log in with user@example.com and verify the home screen /android-debug crashes in com.example.app after tapping Settings
To set it up, copy the tools, skills and docs folders into your app's repo, plus the instructions file for your agent. You need adb and python3. MIT licensed.
https://github.com/amit-nayar/android-adb-skill
Feedback and PRs welcome, especially from people using it in a real build, install and verify loop.
4
u/bleeding182 2d ago
I was expecting some random, low-quality repo with 500+ lines SKILLs in it, but I was pleasantly surprised. This actually seems sensible.
For anyone wondering: No, you don't need this or any similar skills. Current Models are good enough to do all of this on their own already, without skills or similar. This is a neat package that might optimize/streamline things, though.
I would still aggregate the skills into a single, bigger one, since an agent needing one of those skills usually needs some of the others as well. Your wording is already very compact, so an aggregate skill might actually save more tokens by avoiding individual skill descriptions and overheads.
24
u/Alexious_sh 2d ago
Check out the official Android CLI: https://github.com/android/skills/blob/main/devtools/android-cli/SKILL.md
14
u/B3nedikt 2d ago
I am still not convinced that these skills actually make claude better with adb.
Is it really working better for you then just have claude use adb without a skill?
1
u/ohaiibuzzle 1d ago
I have no idea why you would need this, 99% of the time I just say "there's a device over adb" and the model just go with it.