一键导入
android-adb
Android device control via ADB - screenshots, UI interaction, app management, file transfer, and backup/restore using adb and uiautomator
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Android device control via ADB - screenshots, UI interaction, app management, file transfer, and backup/restore using adb and uiautomator
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Web search, context extraction, and AI answers via Brave Search API (bx CLI). Use when you need to search the web, look up documentation, research errors, check latest releases, find discussions, or get AI-synthesized answers with citations.
Playwright CLI for browser automation, code generation, screenshots, tracing, and test running via npx playwright
Brave browser via Flatpak - launching, remote debugging via CDP, profile management, and Flatpak sandbox considerations
Niri Wayland compositor control via IPC - window management, workspace operations, output configuration, and compositor automation
Podman operations, Containerfile/Dockerfile creation, rootless containers, image building, and container security
Managing Distrobox development containers, portable environments, host integration, and application export
| name | android-adb |
| description | Android device control via ADB - screenshots, UI interaction, app management, file transfer, and backup/restore using adb and uiautomator |
Use this skill when interacting with Android devices over USB via ADB — taking screenshots, navigating UI, transferring files, managing apps, or performing backups.
Activate this skill when the user mentions:
adb (from android-tools package)sudo pacman -S android-tools (Arch/CachyOS)-s <serial> to target a specific device# List connected devices
adb devices
# Target a specific device
adb -s <serial> <command>
# Get device serial numbers only
adb devices | grep -v "List" | awk '{print $1}'
# Restart ADB server
adb kill-server && adb start-server
# Connect over TCP/IP (e.g. over Tailscale)
adb connect <ip>:5555
adb tcpip 5555 # switch device to TCP mode first (requires USB)
Screenshots can be taken and pulled to the local machine. The agent CAN VIEW these screenshots using the Read tool.
# Take screenshot and pull to local machine
adb -s <serial> shell screencap -p /sdcard/screen.png
adb -s <serial> pull /sdcard/screen.png /tmp/screen.png
# One-liner
adb shell screencap -p /sdcard/screen.png && adb pull /sdcard/screen.png /tmp/screen.png
Important: After pulling, use the read tool on the local path to view the screenshot. Image coordinates in the displayed image may be scaled — multiply by the scale factor shown to get actual device coordinates.
# Tap at coordinates (use screenshot to find coordinates)
adb shell input tap <x> <y>
# Long press
adb shell input swipe <x> <y> <x> <y> 1000
# Swipe
adb shell input swipe <x1> <y1> <x2> <y2> [duration_ms]
# Type text
adb shell input text "hello world"
# Key events
adb shell input keyevent 4 # Back
adb shell input keyevent 3 # Home
adb shell input keyevent 187 # Recents
adb shell input keyevent 26 # Power
Use uiautomator dump to understand what's on screen without seeing it:
# Dump UI to file and pull
adb shell uiautomator dump /sdcard/ui.xml
adb pull /sdcard/ui.xml /tmp/ui.xml
cat /tmp/ui.xml | grep -o 'text="[^"]*"\|bounds="[^"]*"' | paste - -
Parse bounds format [x1,y1][x2,y2] to find tap center:
# Launch app by package name
adb shell monkey -p <package> -c android.intent.category.LAUNCHER 1
# Launch specific activity
adb shell am start -n <package>/<activity>
# Open URL
adb shell am start -a android.intent.action.VIEW -d "https://example.com"
# List installed user apps
adb shell pm list packages -3
# List all packages
adb shell pm list packages
# Install APK
adb install app.apk
adb install -r app.apk # reinstall, keep data
# Uninstall
adb uninstall <package>
# Clear app data
adb shell pm clear <package>
# Get app version
adb shell dumpsys package <package> | grep versionName
# Push file to device
adb push local_file.txt /sdcard/
# Pull file from device
adb pull /sdcard/file.txt ./
# Pull entire directory
adb pull /sdcard/DCIM/ ./DCIM/
# List directory
adb shell ls /sdcard/
# Backup specific app data (no APK)
adb backup -noapk <package> -f backup.ab
# Backup multiple apps
adb backup -noapk <pkg1> <pkg2> -f backup.ab
# Full backup
adb backup -all -f full_backup.ab
# Restore
adb restore backup.ab
Note: User must confirm backup/restore on device screen. adb backup is deprecated but still functional as of Android 16.
# Backup SMS database
adb backup -noapk com.android.providers.telephony -f sms_backup.ab
# Restore SMS to another device
adb -s <target_serial> restore sms_backup.ab
# Interactive shell
adb shell
# Run single command
adb shell <command>
# Device info
adb shell getprop ro.product.model
adb shell getprop ro.build.version.release
adb shell getprop ro.build.version.sdk
# Storage info
adb shell df -h
# Running processes
adb shell ps -A | grep <name>
# Stream logs
adb logcat
# Filter by tag
adb logcat -s MyTag
# Filter by priority
adb logcat *:E # errors only
# Clear log buffer
adb logcat -c
adb shell screenrecord /sdcard/record.mp4
# Ctrl+C to stop, then:
adb pull /sdcard/record.mp4 ./
comm -23 \
<(adb -s <serial1> shell pm list packages -3 | sed 's/package://' | sort) \
<(adb -s <serial2> shell pm list packages -3 | sed 's/package://' | sort)
# On source phone (plugged in via USB)
adb -s <source> backup -noapk com.android.providers.telephony -f sms_backup.ab
# Confirm on device screen
# Switch USB to target phone
adb -s <target> restore sms_backup.ab
# Confirm on device screen
adb backup for some system apps — user apps work fineadb shell run-as <package> may not work without app being debuggable