android-adb-controller
Control Android devices via ADB with support for UI layout analysis (uiautomator) and visual feedback (screencap). Use when you need to interact with Android apps, perform UI automation, take screenshots, or run complex ADB command sequences.
Permissions
Risk Assessment
This skill requests 3 of 4 possible permissions. Elevated scope — ensure each permission is justified. Consider running in a sandbox.
SKILL.md
Control and automate Android devices using ADB, uiautomator, and screencap.
Connecting Devices
USB Connection
- Enable Developer Options and USB Debugging on the device.
- Connect via USB and verify with
adb devices.
Wireless Connection (Android 11+)
- Enable Wireless Debugging in Developer Options.
- Pairing: Find the IP, port, and pairing code in the "Pair device with pairing code" popup.
adb pair <ip>:<pairing_port> <pairing_code> - Connecting: Use the IP and port shown on the main Wireless Debugging screen.
adb connect <ip>:<connection_port> - Verify with
adb devices.
Common Workflows
Launching an App
Use the monkey tool to launch apps by package name:
adb shell monkey -p <package_name> -c android.intent.category.LAUNCHER 1
Analyzing the UI
Dump and pull the UI hierarchy to find coordinates:
adb shell uiautomator dump /sdcard/view.xml && adb pull /sdcard/view.xml ./view.xml
Then grep for text or resource IDs to find bounds="[x1,y1][x2,y2]".
Interacting with Elements
- Tap:
adb shell input tap <x> <y> - Text:
adb shell input text "<text>"(Note: Use%\sfor spaces in some environments or handle quoting carefully) - Keyevent:
adb shell input keyevent <keycode>(Home: 3, Back: 4, Power: 26, Search: 84, Enter: 66) - Swipe:
adb shell input swipe <x1> <y1> <x2> <y2> <duration_ms>
Visual Verification
Take a screenshot to verify the state:
adb shell screencap -p /sdcard/screen.png && adb pull /sdcard/screen.png ./screen.png
Tips
- Search: Use
input keyevent 84to trigger search in many apps. - Wait: Use
sleep <seconds>between commands to allow the UI to update. - Coordinates: Calculate the center of
[x1,y1][x2,y2]for reliable taps.
Why You Need android-adb-controller
Testing and automating Android devices usually means memorizing ADB commands, writing bash scripts, and juggling device connections. Android ADB Controller lets your OpenClaw agent control Android devices through ADB with full support for UI layout analysis via uiautomator and visual feedback via screencap.
With 425 downloads, this skill covers everything from basic device management to complex UI automation sequences. It supports USB and wireless connections (including Android 11+ wireless debugging), UI element interaction by finding and tapping elements from layout dumps, screenshot capture for visual verification, and complex multi-step automation flows.
If you work with Android devices — whether for app testing, device management, or automation — this skill turns your OpenClaw agent into a powerful Android automation tool.
Common Use Cases
- Automate Android app testing with UI interaction and screenshot verification
- Control Android devices wirelessly for hands-free automation
- Extract UI layouts with uiautomator for element-based interaction
- Run complex ADB command sequences for device management
- Take and analyze screenshots for visual regression testing
Frequently Asked Questions
Do I need a rooted device?
No. ADB works with standard developer mode enabled. You just need to turn on USB Debugging (or Wireless Debugging for Android 11+) in Developer Options.
Can it control multiple devices simultaneously?
Yes. ADB supports multiple connected devices, and the skill can target specific devices by serial number for multi-device automation workflows.
Why does it need file write access?
It writes screenshots and UI dumps to disk for analysis. These files are used for visual feedback and element-based interaction.