← Back to Skills Marketplace
dr-xiaoming

ADB Android Control

by Dr-xiaoming · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
434
Downloads
0
Stars
4
Active Installs
1
Versions
Install in OpenClaw
/install adb-android
Description
Control Android devices via ADB (Android Debug Bridge) from a Mac. Use when: remotely operating an Android phone (tap, swipe, type, screenshot, screen record...
README (SKILL.md)

ADB Android Control (macOS)

Control Android devices from a Mac via ADB over USB or Wi-Fi.

Prerequisites

Install on macOS:

brew install android-platform-tools
# Verify
adb version

Optional but recommended — scrcpy for screen mirroring:

brew install scrcpy

Device Connection

USB

  1. Enable Developer Options on Android: Settings → About Phone → tap Build Number 7 times
  2. Enable USB Debugging in Developer Options
  3. Connect USB cable, approve the RSA key prompt on phone
  4. Verify: adb devices should show device as device (not unauthorized)

Wireless (Wi-Fi) — Android 11+

# On phone: Developer Options → Wireless Debugging → enable → Pair with code
adb pair \x3Cphone-ip>:\x3Cpair-port>    # Enter the 6-digit code
adb connect \x3Cphone-ip>:\x3Cconnect-port>
adb devices   # Should show connected

Wireless (Legacy, Android 10 and below)

# Connect via USB first, then:
adb tcpip 5555
adb connect \x3Cphone-ip>:5555
# Disconnect USB

Core Commands

Device Info

adb devices -l                     # List with details
adb shell getprop ro.product.model # Device model
adb shell getprop ro.build.version.release  # Android version
adb shell dumpsys battery          # Battery info
adb shell wm size                  # Screen resolution

App Management

adb install app.apk               # Install
adb install -r app.apk            # Reinstall keeping data
adb uninstall com.example.app     # Uninstall
adb shell pm list packages         # All packages
adb shell pm list packages -3      # Third-party only
adb shell am start -n com.example.app/.MainActivity  # Launch app
adb shell am force-stop com.example.app              # Force stop
adb shell pm clear com.example.app                   # Clear app data

File Transfer

adb push local_file /sdcard/       # Mac → Phone
adb pull /sdcard/file.jpg ./       # Phone → Mac
adb shell ls /sdcard/              # List files

Screen Interaction (UI Automation)

adb shell input tap 500 800        # Tap at (x,y)
adb shell input swipe 500 1500 500 500 300  # Swipe (x1,y1,x2,y2,durationMs)
adb shell input text "hello"       # Type text (no spaces — use %s for space)
adb shell input keyevent 66        # Press Enter
adb shell input keyevent 4         # Press Back
adb shell input keyevent 3         # Press Home
adb shell input keyevent 26        # Power button
adb shell input keyevent 187       # Recent apps

Common keyevent codes: See references/keyevent-codes.md

Screenshot & Recording

adb shell screencap /sdcard/screen.png && adb pull /sdcard/screen.png ./
adb shell screenrecord /sdcard/video.mp4   # Record (Ctrl+C to stop, max 3min)
adb shell screenrecord --time-limit 10 /sdcard/video.mp4  # 10 seconds
adb pull /sdcard/video.mp4 ./

Logcat

adb logcat                         # Full log stream
adb logcat -d                      # Dump and exit
adb logcat *:E                     # Errors only
adb logcat -s "MyTag"              # Filter by tag
adb logcat --pid=$(adb shell pidof com.example.app)  # App-specific
adb logcat -c                      # Clear log buffer

Shell & System

adb shell                          # Interactive shell
adb shell whoami                   # Current user
adb shell settings get system screen_brightness  # Get brightness
adb shell settings put system screen_brightness 128  # Set brightness (0-255)
adb shell svc wifi enable          # Enable Wi-Fi
adb shell svc wifi disable         # Disable Wi-Fi
adb shell dumpsys activity top     # Current foreground activity
adb shell am broadcast -a android.intent.action.AIRPLANE_MODE  # Toggle airplane
adb reboot                         # Reboot device

Clipboard

adb shell am broadcast -a clipper.set -e text "content to copy"  # Requires Clipper app
# Alternative for Android 10+:
adb shell input text "paste this"

Screen Mirroring with scrcpy

scrcpy                             # Mirror with default settings
scrcpy --max-size 1024             # Limit resolution
scrcpy --bit-rate 2M               # Limit bitrate
scrcpy --record file.mp4           # Mirror + record
scrcpy --no-audio                  # Video only
scrcpy --turn-screen-off           # Mirror but keep phone screen off
scrcpy --stay-awake                # Prevent sleep while connected
scrcpy --window-title "MyPhone"    # Custom window title
scrcpy --crop 1080:1920:0:0        # Crop region (w:h:x:y)

Wireless scrcpy (after adb connect):

scrcpy --tcpip=\x3Cphone-ip>:\x3Cport>

Multi-Device

When multiple devices are connected, specify the target:

adb -s \x3Cserial> shell ...          # By serial number
adb -s \x3Cip>:\x3Cport> shell ...       # By IP (wireless)

Get serial: adb devices — first column is the serial.

Automation Patterns

Take screenshot → analyze → tap

# 1. Screenshot
adb shell screencap /sdcard/screen.png && adb pull /sdcard/screen.png ./screen.png
# 2. Analyze image (use vision model or image tool)
# 3. Tap target coordinates
adb shell input tap \x3Cx> \x3Cy>

Batch install APKs

for apk in *.apk; do adb install -r "$apk"; done

Open URL in browser

adb shell am start -a android.intent.action.VIEW -d "https://example.com"

Send SMS (requires default SMS app handling)

adb shell am start -a android.intent.action.SENDTO -d "sms:+1234567890" --es sms_body "Hello"

Troubleshooting

Issue Fix
unauthorized in adb devices Approve RSA prompt on phone; revoke & re-approve in Developer Options
offline Reconnect USB; adb kill-server && adb start-server
Wireless disconnect Re-pair: adb pair or reconnect: adb connect
no permissions On Linux: add udev rules; on Mac: usually not an issue
Slow wireless Use 5GHz Wi-Fi; keep phone and Mac on same network
scrcpy black screen Update scrcpy; try --codec h264; check USB debugging enabled

Node Execution (for OpenClaw on cloud servers)

When the agent runs on a cloud server (not directly on the Mac), execute ADB commands on the Mac node:

Use exec with host="node" and node="\x3Cmac-node-name>" to run adb commands on the Mac
that has the Android phone connected via USB.

This is the typical setup: the Android phone is USB-connected to the Mac, and the agent orchestrates from the cloud.

Usage Guidance
This skill is coherent and appears to be what it says: a cookbook of adb/scrcpy commands for macOS. Before installing/using it, be aware that adb commands grant full control of any connected Android device (file access via adb pull, app install/uninstall, screenshots, recording, sending intents, rebooting, etc.). Only use it with devices you own or have explicit permission to control. Because the skill is instruction-only, verify what commands the agent will run before allowing them, and prefer manual confirmation for any destructive or privacy-sensitive actions (pulling files, installing/uninstalling apps, broadcasting intents). If you need higher assurance, ask the publisher for a source/homepage or restrict autonomous agent invocation so commands require your approval.
Capability Analysis
Type: OpenClaw Skill Name: adb-android Version: 1.0.0 The skill provides a comprehensive and legitimate set of instructions for controlling Android devices via ADB (Android Debug Bridge) and scrcpy on macOS. It includes standard commands for app management, file transfers, and UI automation (SKILL.md) along with a reference for keyevent codes (references/keyevent-codes.md). No evidence of malicious intent, data exfiltration, or prompt injection was found.
Capability Assessment
Purpose & Capability
Name/description match the SKILL.md content. All required actions (installing android-platform-tools and optionally scrcpy, using adb commands) are directly relevant to controlling Android devices. No unrelated credentials, binaries, or config paths are requested.
Instruction Scope
Runtime instructions stay within ADB/scrcpy usage: device connection, shell commands, file transfer, screenshots, screen recording, app management, logcat, and UI automation. The instructions do include powerful operations (adb pull, install/uninstall, shell, broadcasts) that can access or modify device data — this is expected for a control tool but is potentially sensitive in practice.
Install Mechanism
Instruction-only skill with no install spec or code to fetch/execute. It recommends using Homebrew to install standard packages (android-platform-tools, scrcpy), which is a common, low-risk approach.
Credentials
No environment variables, credentials, or config paths are requested. The skill does not ask for unrelated secrets or system-level tokens.
Persistence & Privilege
always is false and the skill is user-invocable. It does not request permanent or cross-skill configuration or elevated persistence. (Agent autonomous invocation remains enabled by default, but that is normal and not combined with other red flags here.)
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install adb-android
  3. After installation, invoke the skill by name or use /adb-android
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release: comprehensive ADB skill for controlling Android devices from macOS, including USB/wireless connection, UI automation, screen mirroring (scrcpy), file transfer, app management, and keyevent reference.
Metadata
Slug adb-android
Version 1.0.0
License MIT-0
All-time Installs 4
Active Installs 4
Total Versions 1
Frequently Asked Questions

What is ADB Android Control?

Control Android devices via ADB (Android Debug Bridge) from a Mac. Use when: remotely operating an Android phone (tap, swipe, type, screenshot, screen record... It is an AI Agent Skill for Claude Code / OpenClaw, with 434 downloads so far.

How do I install ADB Android Control?

Run "/install adb-android" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is ADB Android Control free?

Yes, ADB Android Control is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does ADB Android Control support?

ADB Android Control is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created ADB Android Control?

It is built and maintained by Dr-xiaoming (@dr-xiaoming); the current version is v1.0.0.

💬 Comments