Skip to content

ADB Connection

Verified

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.

2,531 downloads
$ Add to .claude/skills/

About This Skill

# Android Automation

Control and automate Android devices using ADB, uiautomator, and screencap.

Connecting Devices

USB Connection 1. Enable **Developer Options** and **USB Debugging** on the device. 2. Connect via USB and verify with `adb devices`.

Wireless Connection (Android 11+) 1. Enable **Wireless Debugging** in Developer Options. 2. **Pairing**: Find the IP, port, and pairing code in the "Pair device with pairing code" popup. `adb pair <ip>:<pairing_port> <pairing_code>` 3. **Connecting**: Use the IP and port shown on the main Wireless Debugging screen. `adb connect <ip>:<connection_port>` 4. 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 `%\s` for 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 84` to 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.

Use Cases

  • Automate Android device interactions via ADB for testing and development workflows
  • Control Android devices remotely over USB or wireless connections for debugging
  • Capture screenshots, record screen activity, and extract UI hierarchies for QA testing
  • Automate repetitive app testing sequences using uiautomator commands
  • Install, uninstall, and manage apps on connected Android devices programmatically

Pros & Cons

Pros

  • +Comprehensive ADB coverage — device connection, UI automation, screenshots, and app management
  • +Supports both USB and wireless (Android 11+) connections for flexible device access
  • +Uses standard Android tools (ADB, uiautomator, screencap) with no custom dependencies

Cons

  • -Requires USB debugging enabled and developer options configured on each device
  • -ADB commands can be dangerous — factory reset, data wipe, and system modifications are possible
  • -No built-in test framework — automation sequences must be scripted manually

FAQ

What does ADB Connection do?
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.
What platforms support ADB Connection?
ADB Connection is available on Claude Code, OpenClaw.
What are the use cases for ADB Connection?
Automate Android device interactions via ADB for testing and development workflows. Control Android devices remotely over USB or wireless connections for debugging. Capture screenshots, record screen activity, and extract UI hierarchies for QA testing.

100+ free AI tools

Writing, PDF, image, and developer tools — all in your browser.

Next Step

Use the skill detail page to evaluate fit and install steps. For a direct browser workflow, move into a focused tool route instead of staying in broader support surfaces.