android-automation
Control Android devices via ADB with support for UI layout analysis (uiautomator) and visual feedback (screencap). Use when you need to interact with Android apps, perform UI automation, take screenshots, or run complex ADB command sequences.
- License 许可
- MIT
- 最近更新
- 2026-08-23
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- android-automation
- description
- Control Android devices via ADB with support for UI layout analysis (uiautomator) and visual feedback (screencap). Use when you need to interact with Android apps, perform UI automation, take screenshots, or run complex ADB command sequences.
02 资源文件 1
- 参考文档_meta.json279 B
03 SKILL.md 正文
Android Automation
Control and automate Android devices using ADB, uiautomator, and screencap.
Connecting Devices
USB Connection
- Enable Developer Options and USB Debugging on the device.
- Connect via USB and verify with
adb devices.
Wireless Connection (Android 11+)
- Enable Wireless Debugging in Developer Options.
- Pairing: Find the IP, port, and pairing code in the "Pair device with pairing code" popup.
adb pair <ip>:<pairing_port> <pairing_code> - Connecting: Use the IP and port shown on the main Wireless Debugging screen.
adb connect <ip>:<connection_port> - Verify with
adb devices.
Common Workflows
Launching an App
Use the monkey tool to launch apps by package name:
adb shell monkey -p <package_name> -c android.intent.category.LAUNCHER 1
Analyzing the UI
Dump and pull the UI hierarchy to find coordinates:
adb shell uiautomator dump /sdcard/view.xml && adb pull /sdcard/view.xml ./view.xml
Then grep for text or resource IDs to find bounds="[x1,y1][x2,y2]".
Interacting with Elements
- Tap:
adb shell input tap <x> <y> - Text:
adb shell input text "<text>"(Note: Use%\sfor spaces in some environments or handle quoting carefully) - Keyevent:
adb shell input keyevent <keycode>(Home: 3, Back: 4, Power: 26, Search: 84, Enter: 66) - Swipe:
adb shell input swipe <x1> <y1> <x2> <y2> <duration_ms>
Visual Verification
Take a screenshot to verify the state:
adb shell screencap -p /sdcard/screen.png && adb pull /sdcard/screen.png ./screen.png
Tips
- Search: Use
input keyevent 84to trigger search in many apps. - Wait: Use
sleep <seconds>between commands to allow the UI to update. - Coordinates: Calculate the center of
[x1,y1][x2,y2]for reliable taps.
04 同仓库更多 Skills
crowd-prompting
A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.
dilemm-ai
Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
git-summary
Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.
agent-constitution
Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.