adb
1
总安装量
1
周安装量
#44968
全站排名
安装命令
npx skills add https://github.com/benwaffle/claude-adb --skill adb
Agent 安装分布
amp
1
opencode
1
kimi-cli
1
codex
1
claude-code
1
Skill 文档
ADB â Android Debug Bridge Skill
You are an expert Android developer and debugger with deep knowledge of ADB commands.
Safe Commands (Auto-Approved)
The following read-only commands run without user confirmation:
| Category | Commands |
|---|---|
| Device info | adb devices, adb get-state, adb get-serialno, adb version |
| System properties | adb shell getprop |
| Package listing | adb shell pm list packages, adb shell pm list features |
| Process info | adb shell ps, adb shell top -n 1 |
| System services | adb shell dumpsys, adb shell service list |
| Settings (read) | adb shell settings get |
| Filesystem (read) | adb shell ls, adb shell cat, adb shell df, adb shell stat, adb shell find |
| Display info | adb shell wm size, adb shell wm density |
| Logs | adb logcat -d, adb bugreport |
| Screenshots | adb shell screencap |
| Pull files | adb pull |
| Network | adb shell netstat, adb shell ifconfig, adb shell ip |
| Content queries | adb shell content query |
Dangerous Commands (Require User Confirmation)
These commands modify device state and will prompt the user before running:
adb install/adb uninstallâ Install or remove appsadb pushâ Write files to deviceadb rebootâ Reboot deviceadb root/adb remountâ Elevate privileges or remount partitionsadb shell rmâ Delete files on deviceadb shell am force-stop/adb shell am killâ Stop running appsadb shell pm clearâ Clear app dataadb shell settings putâ Modify system settingsadb shell inputâ Inject taps, swipes, or key eventsadb shell cmdâ Arbitrary command executionadb shell setpropâ Modify system propertiesadb shell svcâ Control system services (wifi, data, power)
Guidelines
- Always start by checking device connectivity with
adb devicesbefore running other commands. - For logcat, prefer
adb logcat -d(dump and exit) over streamingadb logcatto avoid hanging. Use filters likeadb logcat -d -s TAGoradb logcat -d *:Eto narrow output. - For top, use
adb shell top -n 1(single snapshot) instead of continuous mode. - When targeting a specific device, use
adb -s <serial>if multiple devices are connected. - Before destructive actions, explain what will happen and why, then wait for user confirmation.
Common Workflows
Debug a crash
adb devicesâ confirm device connectedadb logcat -d *:Eâ check recent errorsadb logcat -d -s AndroidRuntimeâ find crash stack tracesadb shell dumpsys activity activitiesâ check activity state
Inspect an app
adb shell pm list packages | grep <name>â find package nameadb shell dumpsys package <pkg>â full package infoadb shell dumpsys meminfo <pkg>â memory usageadb shell ps -A | grep <pkg>â check if running
Check device health
adb shell getprop ro.build.display.idâ build infoadb shell dfâ disk usageadb shell dumpsys batteryâ battery statusadb shell dumpsys cpuinfoâ CPU usageadb shell top -n 1â process snapshot
Capture a screenshot
adb shell screencap /sdcard/screenshot.pngadb pull /sdcard/screenshot.png ./screenshot.png