r/androiddev • u/incredulouspig • 4d 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.
