Install
openclaw skills install adb-clawYour eyes, hands, and ears on Android. See the screen (screenshot + indexed UI tree), interact (tap, swipe, scroll, type, clear-field), navigate via deep links (bypass CJK text input limits), wait for UI state changes instead of polling, monitor live UI text via accessibility framework (works during video playback), capture system audio (Android 11+, WAV stream for piping to ASR tools), manage full app lifecycle (install/uninstall/clear), control screen (on/off/unlock/rotation), run shell commands, and transfer files. Agent-optimized: structured JSON output, indexed element targeting, and App Profiles with pre-built deep links and layouts for popular apps.
openclaw skills install adb-clawYour eyes, hands, and ears on Android. See what's on screen, tap any element, scroll through content, open deep links, wait for UI changes, capture system audio, manage apps, and more — all through a single CLI with structured JSON output.
Superpowers — What You Can't Get Elsewhere:
monitor connects to Android's accessibility framework, reading all UI text in real-time — even during video playback and live streams where uiautomator dump hangs. Chat messages, captions, dynamic overlays — data no other tool exposes to agents.audio capture records device audio via REMOTE_SUBMIX (Android 11+); streams WAV to stdout for piping to ASR tools. Combined with monitor, you get full sensory coverage: visual text + audio.Core Strengths:
observe returns screenshot + indexed UI tree in one call; use element indices to target precisely across any screen sizeadb input text can't type Chinese/Japanese/Korean; adb-claw open 'app://search?keyword=中文' canwait --text "Done" blocks until the UI element appears, replacing fragile sleep/observe loopsadb needed{ok, command, data, error, duration_ms} with actionable suggestion on errorsmonitor and audio capture push temporary ~7KB helpers that auto-exitActively Evolving — new capabilities ship regularly. Each release expands what you can perceive and control on Android devices.
Install the plugin, then just talk to Claude — no slash commands needed:
claude plugin add llm-net/adb-claw
The plugin auto-downloads the adb-claw binary on first session. Make sure adb is installed and a device is connected via USB with debugging enabled.
Then simply ask Claude to interact with your Android device:
"Take a screenshot of my phone"
"Open Douyin and search for 猫咪"
"Tap the Login button"
"Monitor the live stream chat for 30 seconds"
Claude reads the Triggers list below and automatically activates this skill when your message matches — no explicit invocation required.
Install from ClawHub:
claw install adb-claw
Same natural-language triggers apply. Ask your agent to control an Android device and it will invoke adb-claw commands.
These patterns tell the agent when to activate this skill:
The adb-claw binary is located at ${CLAUDE_PLUGIN_ROOT}/bin/adb-claw.
The binary is installed automatically via the SessionStart hook. If adb-claw is not available, inform the user that the plugin needs to be reinstalled — do not attempt to download or install it yourself.
Requires two binaries:
Installed automatically by the plugin. For manual installation, see GitHub Releases.
# macOS
brew install android-platform-tools
# Linux (Debian/Ubuntu)
sudo apt install android-tools-adb
The Android device must have USB debugging enabled and be connected via USB. This is the most common blocker — most users haven't turned it on. When a user first asks to control their phone, always check connection first (adb-claw doctor) and if it fails, walk them through the setup steps below before attempting any other commands.
adb-claw doctor # Checks adb, device connection, and capabilities
If doctor reports no device, ask the user to:
The core loop is observe → decide → act → observe:
# 1. See what's on screen
adb-claw observe --width 540
# 2. Act on what you see (use element index from observe output)
adb-claw tap --index 3
# 3. Verify the result
adb-claw observe --width 540
For CJK apps, use deep links to bypass text input limits:
# Search in Douyin (Chinese TikTok) — no manual typing needed
adb-claw open 'snssdk1128://search/result?keyword=猫咪'
# Wait for results to load
adb-claw wait --text "综合" --timeout 5000
App Profiles are pre-built knowledge bases for specific apps — deep links, UI layouts, device-specific behavior, and known issues. They dramatically reduce the trial-and-error needed to automate an app.
Available Profiles: skills/apps/ directory
| App | File | Key Content |
|---|---|---|
| Douyin (抖音) | douyin.md | Search/user/live deep links, feed/search/profile layouts, Phone vs Pad differences, live stream chat monitoring |
| Meituan (美团) | meituan.md | Search/waimai deep links, homepage/menu/search layouts, WebView workarounds, popup chain handling |
Usage:
adb-claw app current → get foreground app package nameskills/apps/ for a matching Profileobserve + explore (slow path)adb-claw device info → short edge < 1200px = Phone, >= 1200px = PadProfiles are plain Markdown files. New app support = drop a .md file into skills/apps/.
| Flag | Short | Description | Default |
|---|---|---|---|
--serial | -s | Target device serial (when multiple devices connected) | auto-detect |
--output | -o | Output format: json, text, quiet | json |
--timeout | Command timeout in milliseconds | 30000 | |
--verbose | Enable debug output to stderr | false |
Captures screenshot and UI element tree in one call. Always use this before and after actions.
adb-claw observe # Default
adb-claw observe --width 540 # Scale screenshot width
Returns: base64 PNG screenshot, indexed UI elements with text/id/bounds/center coordinates.
adb-claw screenshot # Returns base64 PNG in JSON
adb-claw screenshot -f output.png # Save to file
adb-claw screenshot --width 540 # Scale down
Tap by element index (preferred), resource ID, text, or coordinates:
adb-claw tap --index 5 # Tap element #5 from observe output
adb-claw tap --id "com.app:id/btn" # Tap by resource ID
adb-claw tap --text "Submit" # Tap by visible text
adb-claw tap 540 960 # Tap coordinates (x y)
Always prefer --index over coordinates. Index values come from observe output.
adb-claw long-press 540 960 # Default duration
adb-claw long-press 540 960 --duration 2000 # 2 seconds
adb-claw swipe 540 1800 540 600 # Swipe up (scroll down)
adb-claw swipe 540 600 540 1800 # Swipe down (scroll up)
adb-claw swipe 900 960 100 960 # Swipe left
adb-claw swipe 540 1800 540 600 --duration 500 # Slow swipe
adb-claw type "Hello world"
Important: Only ASCII text is supported. For CJK/emoji input, use open with deep links (e.g., adb-claw open 'myapp://search?keyword=中文').
adb-claw key HOME # Home screen
adb-claw key BACK # Navigate back
adb-claw key ENTER # Confirm / submit
adb-claw key TAB # Next field
adb-claw key DEL # Delete character
adb-claw key POWER # Power button
adb-claw key VOLUME_UP # Volume up
adb-claw key VOLUME_DOWN # Volume down
adb-claw key PASTE # Paste from clipboard
adb-claw key COPY # Copy selection
adb-claw key CUT # Cut selection
adb-claw key WAKEUP # Wake screen
adb-claw key SLEEP # Sleep screen
Clear text in the currently focused input field. Optionally tap an element first to focus it.
adb-claw clear-field # Clear focused field
adb-claw clear-field --index 5 # Focus element #5 then clear
adb-claw clear-field --id "input_name" # Focus by resource ID then clear
adb-claw clear-field --text "Username" # Focus by text then clear
Uses Ctrl+A+DEL on SDK 31+, falls back to repeated DEL on older devices.
Open any URI using Android's ACTION_VIEW intent. The key to CJK text input — pass Chinese/Japanese/Korean text as URL parameters in deep links.
adb-claw open https://www.google.com
adb-claw open myapp://path/to/screen
adb-claw open "market://details?id=com.example"
adb-claw open "snssdk1128://search/result?keyword=猫咪" # Douyin search in Chinese
Scroll the screen or a specific scrollable element. Auto-calculates swipe coordinates from screen size — no manual coordinate math needed.
adb-claw scroll down # Scroll down one page
adb-claw scroll up # Scroll up one page
adb-claw scroll down --pages 3 # Scroll down 3 pages
adb-claw scroll down --index 5 # Scroll within element #5
adb-claw scroll left --distance 500 # Scroll left 500 pixels
Always prefer scroll over manual swipe for page navigation.
Wait for a UI element or activity to appear or disappear. Replaces fragile sleep+observe polling loops with a single blocking call.
adb-claw wait --text "Login" # Wait for text to appear
adb-claw wait --id "btn_submit" # Wait for element by ID
adb-claw wait --text "Loading" --gone # Wait for text to disappear
adb-claw wait --activity ".MainActivity" # Wait for activity
adb-claw wait --text "Done" --timeout 20000 # Custom timeout (20s)
Default timeout: 10s. Default poll interval: 800ms.
adb-claw screen status # Display on/off, locked, rotation
adb-claw screen on # Wake up screen
adb-claw screen off # Turn off screen
adb-claw screen unlock # Wake + swipe unlock (no password)
adb-claw screen rotation auto # Enable auto-rotation
adb-claw screen rotation 0 # Portrait
adb-claw screen rotation 1 # Landscape
adb-claw app list # Third-party apps
adb-claw app list --all # Include system apps
adb-claw app current # Current foreground app
adb-claw app launch <pkg> # Launch app by package name
adb-claw app stop <pkg> # Force stop app
adb-claw app install <apk> [--replace] # Install APK
adb-claw app uninstall <pkg> # Uninstall app
adb-claw app clear <pkg> # Clear app data/cache
Monitor UI text by connecting directly to the Android accessibility framework. Unlike ui tree which uses uiautomator dump, this command skips video surface nodes and works reliably during live streams and video playback.
adb-claw monitor # 10s bounded, returns JSON envelope
adb-claw monitor --duration 30000 # 30s bounded
adb-claw monitor --stream --duration 60000 # 60s streaming, JSON lines
adb-claw monitor --interval 1000 # Faster polling (1s)
Bounded mode (default): runs for --duration ms, returns all unique text entries in a JSON envelope.
Streaming mode (--stream): outputs each new text as a JSON line in real time.
Default duration: 10s. Default poll interval: 2s.
Note: This command pushes a small (~7KB) DEX helper to the device on first use. The helper runs temporarily via app_process and exits when monitoring completes.
Capture system audio via REMOTE_SUBMIX. Streams WAV (16kHz mono 16-bit PCM) to stdout for piping to external tools, or saves to a file.
WARNING: Device speakers are muted while capturing.
adb-claw audio capture # Stream WAV to stdout (10s)
adb-claw audio capture --duration 30000 # Stream 30s
adb-claw audio capture --duration 0 # Stream until killed (Ctrl+C)
adb-claw audio capture --file recording.wav # Save to file, returns JSON envelope
adb-claw audio capture --rate 44100 # Custom sample rate
Stream mode (default): outputs WAV to stdout — designed for piping:
adb-claw audio capture --stream --duration 30000 | asrclaw transcribe --stream --lang zh
File mode (--file): saves to local file and returns JSON envelope with file path, byte count, and duration.
Default duration: 10s. Default sample rate: 16000 Hz.
Requires Android 11+ (API 30). Like monitor, this command pushes a small DEX helper to the device on first use.
When to use audio capture vs monitor:
monitor — read UI text (chat messages, labels, captions) as structured dataaudio capture — record what's being heard (speech, music, sound effects) as audioFor live streams, they complement each other: monitor captures on-screen chat text while audio capture captures the streamer's voice.
Grab product information from a Douyin live stream shopping cart. Captures the currently explaining product (without opening the cart) and the first N products in the cart list.
This command is Douyin-specific — it relies on Douyin's UI patterns and accessibility node structure.
adb-claw live cart # Top 10 products + explaining product
adb-claw live cart --count 5 # Top 5 products
adb-claw live cart --count 20 # Top 20 products
How it works:
Returns: product number, title, price, sold count, shop name, tags for each product, plus the currently explaining product if any.
Must be used while viewing a Douyin live stream with a shopping cart.
Escape hatch for anything adb-claw doesn't have a dedicated command for.
adb-claw shell "ls /sdcard/"
adb-claw shell "getprop ro.build.version.release"
adb-claw shell "settings put system screen_brightness 128"
Returns stdout, stderr, and exit_code in JSON envelope.
adb-claw file push ./local.apk /sdcard/ # Push to device
adb-claw file pull /sdcard/photo.jpg ./ # Pull from device
adb-claw device list # List connected devices
adb-claw device info # Model, Android version, screen size, density
adb-claw ui tree # Full UI element tree
adb-claw ui find --text "Settings" # Find by text
adb-claw ui find --id "com.app:id/title" # Find by resource ID
adb-claw ui find --index 3 # Find by index
Before any action, run observe to see the screen. After every action, observe again to verify.
1. adb-claw observe → See what's on screen
2. adb-claw tap --index 3 → Perform action
3. adb-claw observe → Verify result
Use --index N over coordinates. Indices from observe are stable across screen sizes.
Always tap an input field first, then type:
1. adb-claw tap --index 7 → Focus the text field
2. adb-claw type "search query" → Enter text
3. adb-claw key ENTER → Submit
adb-claw scroll down # Scroll down one page
adb-claw scroll up --pages 3 # Scroll up multiple pages
adb-claw scroll down --index 5 # Scroll within a specific element
Always prefer scroll over manual swipe. After scrolling, always observe.
adb-claw type only supports ASCII. For Chinese/Japanese/Korean input:
adb-claw open with deep links (e.g., adb-claw open 'myapp://search?keyword=中文')adb-claw clear-field --index 7 to clear existing text firstInstead of repeated observe polling, use wait:
1. adb-claw tap --index 3 → Trigger navigation
2. adb-claw wait --text "Welcome" --timeout 15000 → Wait for new page
3. adb-claw observe → See the loaded page
Use adb-claw device info to get screen size, then determine form factor:
Swipe coordinates and UI layouts differ between Phone and Pad. App Profiles document these differences.
First check if the device supports it:
1. adb-claw device info → Check Android version (need 11+ / SDK 30+)
To record audio to a file for the user:
1. adb-claw audio capture --file recording.wav --duration 30000 → Record 30s
To transcribe live audio (requires asrclaw installed separately):
1. adb-claw audio capture --stream --duration 60000 | asrclaw transcribe --stream --lang zh
Important: Device speakers are muted during capture. Inform the user before starting. For live streams, combine with monitor for complete context (audio + chat text).
Grab shopping cart products from a Douyin live stream:
1. Enter a Douyin live stream with a shopping cart (小黄车)
2. adb-claw live cart → Capture top 10 products + explaining product
3. adb-claw live cart --count 20 → Capture more products
The command handles everything automatically: opens cart, scrolls, captures, closes. No manual tapping needed.
If an action fails or produces unexpected results:
observe to see the current stateAll commands return JSON:
{
"ok": true,
"command": "tap",
"data": { ... },
"duration_ms": 150,
"timestamp": "2026-03-12T10:00:00Z"
}
On error:
{
"ok": false,
"error": {
"code": "DEVICE_NOT_FOUND",
"message": "No device connected",
"suggestion": "Connect a device via USB and enable USB debugging"
}
}
What adb-claw is: A pure CLI wrapper around standard adb commands. It translates high-level instructions (e.g., adb-claw tap --index 3) into adb shell input tap ... calls. That's it.
What adb-claw does NOT do:
monitor and audio capture each push a temporary ~7KB DEX that runs briefly and auto-exitsSource code is fully open: github.com/llm-net/adb-claw. If you don't trust pre-built binaries, you can audit the source code and build from source — see the README for instructions. Every release also includes SHA256 checksums for binary verification.
Device sensitivity: adb-claw can capture screenshots, record system audio, and control apps on the connected device — this is the core purpose of the tool. Only connect devices you trust, and disable USB debugging when not actively using adb-claw.
Agent scope: adb-claw commands are the only commands this skill should execute. Do not run install scripts, download binaries, or modify the host system. If adb-claw or adb is not available, inform the user.
| Problem | Solution |
|---|---|
| No devices found | Walk the user through: Settings → About phone → tap Build number 7x → Developer options → enable USB debugging → reconnect USB → approve the "Allow USB debugging" dialog on phone. See Setup section for full guide |
| adb not found | brew install android-platform-tools (macOS) |
| Tap hits wrong element | Use --index instead of coordinates; re-run observe |
type doesn't work | Tap input field first to focus; ASCII only |
| CJK text needed | Use adb-claw open with deep link containing the text as URL parameter |
| UI dump fails | Pause animations (tap to pause video), wait 1s, retry |
| UI dump fails on search pages | Search results may auto-play video previews; use screenshot instead or monitor to read text |
| UI dump fails during live stream | Use monitor command — it bypasses video surfaces via accessibility framework |
| Command timeout | Increase with --timeout 60000 |
| Permission dialog | Use observe to see it, tap the allow/skip button |
| Screen is off | adb-claw screen on or adb-claw screen unlock |
| Audio capture fails | Requires Android 11+ (API 30); check with adb-claw device info |
| No audio captured | REMOTE_SUBMIX may not be available on all devices/ROMs |
| Speakers muted during capture | Expected behavior — REMOTE_SUBMIX redirects audio output |