android-adb
Installation
SKILL.md
Android ADB
Execute ADB commands via natural language or direct command input, with multi-device support, safety guardrails, and sandboxed ADB installation.
Workflow
- List devices: Directly run
adb devices -l. If the command fails (command not found), go to ADB Resolution to find or install adb, then retry. - Select device: If multiple devices connected, list them and ask user to choose. Prepend
-s <serial>to all subsequent commands. - Translate request to ADB command(s): Map the user's intent to appropriate ADB commands. See references/adb-commands.md for the full command reference.
- Safety check: If the command is destructive (see Dangerous Operations), show the command and ask for confirmation before executing.
- Execute and report: Run the command, parse output, and present results clearly.
ADB Resolution
When adb is not found, resolve using scripts/adb_env.sh which checks in order: system PATH → common SDK paths (~/Library/Android/sdk/, ~/Android/Sdk/) → sandbox local (<skill_dir>/tools/platform-tools/adb).
If none found, ask the user: "ADB 未安装,是否需要我帮你安装到 skill 本地目录?(不影响系统配置)"
If agreed, run bash <skill_dir>/scripts/install_adb.sh (no sudo, no PATH modification, uninstall via rm -rf <skill_dir>/tools/).