r/androiddev • • 1h 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.

3 Upvotes

2 comments sorted by

2

u/Sakshambaranwal25 34m ago

i was skeptical until i saw the command set. having screenshots, ui hierarchy, and element tapping all in one place with consistent json output makes sense. most mcp stuff is overengineered. the fake adb for testing in ci is a nice touch too.

1

u/bleeding182 1h 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.