一键导入
android-use
Control Android devices via ADB. Use when user asks to tap, swipe, type, launch apps, take screenshots, or automate Android device interactions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Control Android devices via ADB. Use when user asks to tap, swipe, type, launch apps, take screenshots, or automate Android device interactions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | android-use |
| description | Control Android devices via ADB. Use when user asks to tap, swipe, type, launch apps, take screenshots, or automate Android device interactions. |
| version | 0.1.0 |
| author | iurysza |
| license | MIT |
| keywords | ["android","adb","device-control","automation"] |
| category | automation |
| tech-stack | ["Bun","ADB"] |
| allowed-tools | Bash(android-use:*) |
CLI for Android device control via ADB. Requires device connected with USB debugging enabled.
Before using this skill:
adb version should work)When this skill is not installed, agents should:
Run installer (recommended):
curl -fsSL https://raw.githubusercontent.com/iurysza/android-use/main/install.sh | bash
Installed structure:
~/.config/opencode/skill/android-use/SKILL.md~/.config/opencode/skill/android-use/scripts/android-use~/.config/opencode/skill/android-use/references/~/.config/opencode/skill/android-use/assets/~/.config/opencode/skill/android-use/repo/Verify installation:
~/.config/opencode/skill/android-use/scripts/android-use check-device
android-use check-device # List connected devices
android-use get-screen # Get UI hierarchy (compact JSON)
android-use tap 540 960 # Tap at coordinates
android-use type-text "Hello" # Type text
android-use key HOME # Press key
android-use screenshot ./screen.png # Capture screen
STEP 1: Check device
android-use check-device
STEP 2: Get screen state
android-use get-screen
text, contentDesc, resourceIdcenter field for coordinates (e.g., "center": [540, 289])/tmp/.ai-artifacts/skills/android-use/screen.jsonSTEP 3: Execute action
android-use tap <center_x> <center_y>android-use tap <field_x> <field_y> then android-use type-text "text"android-use swipe <x1> <y1> <x2> <y2> [duration_ms]android-use key <KEY_NAME> (HOME, BACK, ENTER, etc.)STEP 4: Verify and repeat
get-screen again to verify state change| Command | Args | Description |
|---|---|---|
check-device | [serial] | List/verify connected devices |
wake | [serial] | Wake device + dismiss lock |
get-screen | [serial] | Dump UI accessibility tree (compact JSON) |
screenshot | [path] [serial] | Capture screen image |
| Command | Args | Description |
|---|---|---|
tap | <x> <y> [serial] | Tap at coordinates |
type-text | <text> [serial] | Type text string |
swipe | <x1> <y1> <x2> <y2> [ms] [serial] | Swipe gesture |
key | <keycode|name> [serial] | Press key |
| Command | Args | Description |
|---|---|---|
launch-app | <package> [serial] | Launch app by package name |
install-apk | <path> [serial] | Install APK file |
| Option | Description |
|---|---|
-s, --serial <id> | Target specific device |
--json | Output as JSON |
--verbose | Verbose logging |
--timeout <ms> | Timeout (default: 15000) |
--adb-path <path> | Path to ADB binary |
--full | Full XML output (for get-screen) |
Use these package names with launch-app:
| App Name | Package Name |
|---|---|
| Chrome | com.android.chrome |
| Settings | com.android.settings |
| Phone / Dialer | com.android.dialer |
| Messages / SMS | com.google.android.apps.messaging |
| Camera | com.android.camera |
| Photos | com.google.android.apps.photos |
| Gmail | com.google.android.gm |
| Maps | com.google.android.apps.maps |
| YouTube | com.google.android.youtube |
| Play Store | com.android.vending |
| Calendar | com.google.android.calendar |
| Clock | com.google.android.deskclock |
| Calculator | com.google.android.calculator |
| Contacts | com.android.contacts |
| Files | com.google.android.documentsui |
com.whatsapp | |
com.instagram.android | |
com.facebook.katana | |
| Twitter / X | com.twitter.android |
| Spotify | com.spotify.music |
| Netflix | com.netflix.mediaclient |
| Telegram | org.telegram.messenger |
| Discord | com.discord |
| Slack | com.Slack |
| Zoom | us.zoom.videomeetings |
| Teams | com.microsoft.teams |
| Outlook | com.microsoft.office.outlook |
| Drive | com.google.android.apps.docs |
| Keep / Notes | com.google.android.keep |
com.reddit.frontpage | |
| Bluesky | xyz.blueskyweb.app |
Compact JSON (default):
get-screen outputs pre-calculated tap coordinates and filtered elements (99% smaller than XML):
{
"elements": [
{
"text": "Settings",
"resourceId": "com.android.settings:id/title",
"contentDesc": "",
"clickable": true,
"scrollable": false,
"focused": false,
"bounds": [42, 234, 1038, 345],
"center": [540, 289]
}
],
"clickable": [...],
"scrollable": [...],
"withText": [...],
"withContentDesc": [...]
}
Key attributes:
text - Visible textcontentDesc - Accessibility description (icons)resourceId - Element identifierclickable / scrollable - Interaction statescenter - Pre-calculated tap coordinates [x, y]bounds - Original bounds [left, top, right, bottom]Use pre-calculated center:
tap 540 289 (no manual math needed)Full XML (when needed):
get-screen --full for raw XML/tmp/.ai-artifacts/skills/android-use/screen.xmlCache location (memory-backed):
/tmp/.ai-artifacts/skills/android-use/screen.json (compact)/tmp/.ai-artifacts/skills/android-use/screen.xml (full)HOME, BACK, MENU, POWER, ENTER, TAB, DEL, ESCAPE, VOLUME_UP, VOLUME_DOWN, DPAD_UP, DPAD_DOWN, DPAD_LEFT, DPAD_RIGHT
When multiple devices connected:
check-device to see all devices with types[PHYSICAL] device[EMULATOR] device-s <serial> to ALL subsequent commandsandroid-use check-device
# Multiple devices connected (2):
# [PHYSICAL] 1A051FDF6007PA - Pixel 6
# [EMULATOR] emulator-5554 - sdk_gphone64_arm64
android-use -s 1A051FDF6007PA get-screen
android-use -s 1A051FDF6007PA tap 540 960
android-use get-screen # Get JSON with pre-calculated centers
# Search JSON for button, find center: [540, 289]
android-use tap 540 289 # Tap at center
android-use tap 540 184 # Focus field
android-use type-text "search term"
android-use key ENTER # Submit
android-use get-screen # Check if visible
android-use swipe 540 1500 540 500 # Swipe up (scroll down)
android-use get-screen # Check again
# Look for "OK", "Allow", "Accept" buttons in XML
android-use tap <button-center>
# Or dismiss with back
android-use key BACK
android-use launch-app com.android.chrome
android-use get-screen
# Find URL bar, tap it
android-use tap 540 184
android-use type-text "example.com"
android-use key ENTER
See the references/ directory for:
AGENTS_GETTING_STARTED.md - Setup and command guideAGENT_WORKFLOWS.md - End-to-end agent workflows01-taking-a-screenshot.md - Capture and verify screenshots02-opening-an-app.md - App launch and navigation03-tapping-a-button.md - Tap flow from screen JSON04-filling-a-form.md - Multi-step form input pattern05-scrolling-to-find-content.md - Scroll/search interaction loop06-handling-dialogs.md - Popup detection and dismissalUse --json for structured output:
android-use --json check-device
{
"success": true,
"exitCode": 0,
"data": { "devices": [...], "count": 1 },
"message": "Found 1 device(s)",
"trace": { ... }
}
adb kill-server && adb start-server/tmp/.ai-artifacts/skills/android-use/The compact JSON includes elements with ANY of:
text (visible labels)contentDesc (accessibility descriptions)clickable = true (interactive elements)scrollable = true (scrollable containers)This filters ~336 raw nodes → ~55 useful elements (4x smaller)
references/ folder