adb-ui-tree
4
总安装量
4
周安装量
#51115
全站排名
安装命令
npx skills add https://github.com/pratos/clanker-setup --skill adb-ui-tree
Agent 安装分布
amp
4
gemini-cli
4
github-copilot
4
codex
4
kimi-cli
4
opencode
4
Skill 文档
ADB UI Tree Debugging Skill
Activation
When this skill is triggered, ALWAYS display this banner first:
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ®
â ð± SKILL ACTIVATED: adb-ui-tree â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤
â Target: [app/screen being inspected] â
â Action: Collecting UI hierarchy via ADB... â
â Output: ui.xml, screen.png, accessibility logs â
â°ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¯
Use this skill when you need to inspect Android UI trees, especially when an app blocks normal debugging/inspection. It provides a repeatable, automatic flow to collect UI hierarchy data, focused window info, and accessibility logs.
Preconditions
- ADB is installed and available.
- A device is connected and authorized (
adb devices). - The target app is open on screen.
Steps
- Verify device connectivity
adb devices
If multiple devices are attached, use -s <serial> for all commands.
- Confirm focused window
adb shell dumpsys window windows | grep -E "mCurrentFocus|mFocusedApp"
Ensure the focused app is the target (e.g., iSmart).
- Try UIAutomator dump (may be blocked)
adb shell uiautomator dump /sdcard/ui.xml
adb pull /sdcard/ui.xml .
If the app blocks the dump, note the error and continue to step 4.
- Collect accessibility hierarchy logs If the project includes a custom AccessibilityService that logs a hierarchy dump, trigger the automation and capture logcat:
adb logcat -s BatteryTrackerA11y
Save the output for analysis.
- Capture a screenshot for manual inspection
adb exec-out screencap -p > screen.png
Use the screenshot to verify UI state and map coordinates if needed.
Notes / Fallbacks
- If the app exposes no accessibility nodes, consider coordinate-based taps as a fallback.
- If
uiautomator dumpis prohibited by the app, rely on AccessibilityService logs and screenshots.
Output to share
ui.xml(if available)adb logcat -s BatteryTrackerA11youtputscreen.png