| name | Android ADB |
| description | Use for Android device operations via ADB on the Moto G52. Accessible via WiFi (192.168.88.155:5555) or USB through junkpile. Screenshot capture, input automation, app management, file transfer, and device control.
<example>
Context: User wants a phone screenshot
user: "take a screenshot of the moto"
</example>
<example>
Context: User wants to install an app
user: "install this APK on the phone"
</example>
|
Android ADB Operations
The Moto G52 is accessible via two methods. Prefer WiFi for simplicity.
ADB Command Patterns
WiFi ADB (Preferred)
adb connect 192.168.88.155:5555
adb -s 192.168.88.155:5555 <command>
USB via junkpile (Fallback)
ssh j "export PATH=\$PATH:/home/linuxbrew/.linuxbrew/bin && adb <command>"
Quick Reference
Screenshot
Use the script — single command, handles ADB connect + screencap + validation:
bash ${CLAUDE_PLUGIN_ROOT}/skills/android/moto-screenshot.sh /tmp/moto_screen.png
Then read the image with the Read tool to view it. Do NOT dispatch an agent for this.
bash ${CLAUDE_PLUGIN_ROOT}/skills/android/moto-screenshot.sh "/tmp/moto_$(date +%Y%m%d_%H%M%S).png"
Screen Recording
adb -s 192.168.88.155:5555 shell screenrecord --time-limit 30 /sdcard/recording.mp4
adb -s 192.168.88.155:5555 pull /sdcard/recording.mp4 /tmp/
Input Simulation
adb -s 192.168.88.155:5555 shell input tap 540 1200
adb -s 192.168.88.155:5555 shell input swipe 540 1800 540 600 300
adb -s 192.168.88.155:5555 shell input text 'hello'
adb -s 192.168.88.155:5555 shell input keyevent KEYCODE_HOME
adb -s 192.168.88.155:5555 shell input keyevent KEYCODE_BACK
adb -s 192.168.88.155:5555 shell input keyevent KEYCODE_POWER
Key Codes
| Code | Action |
|---|
KEYCODE_HOME (3) | Home button |
KEYCODE_BACK (4) | Back button |
KEYCODE_POWER (26) | Power button |
KEYCODE_VOLUME_UP (24) | Volume up |
KEYCODE_VOLUME_DOWN (25) | Volume down |
KEYCODE_ENTER (66) | Enter key |
KEYCODE_WAKEUP (224) | Wake screen |
KEYCODE_SLEEP (223) | Sleep screen |
Screen Coordinates (1080x2400)
| Location | X | Y |
|---|
| Center | 540 | 1200 |
| Top center | 540 | 200 |
| Bottom center | 540 | 2200 |
| Nav: Back | 180 | 2350 |
| Nav: Home | 540 | 2350 |
| Nav: Recent | 900 | 2350 |
App Management
adb -s 192.168.88.155:5555 shell pm list packages -3
adb -s 192.168.88.155:5555 install /path/to/app.apk
adb -s 192.168.88.155:5555 uninstall <package.name>
adb -s 192.168.88.155:5555 shell am force-stop <package.name>
adb -s 192.168.88.155:5555 shell pm clear <package.name>
adb -s 192.168.88.155:5555 shell monkey -p <package.name> 1
File Transfer
adb -s 192.168.88.155:5555 push /local/file.txt /sdcard/
adb -s 192.168.88.155:5555 pull /sdcard/file.txt /local/
Device Status
adb -s 192.168.88.155:5555 shell dumpsys battery | grep level
adb -s 192.168.88.155:5555 shell dumpsys window | grep mCurrentFocus
adb -s 192.168.88.155:5555 shell cat /proc/meminfo | head -5
adb -s 192.168.88.155:5555 shell df -h /data
Logcat
adb -s 192.168.88.155:5555 logcat *:E
adb -s 192.168.88.155:5555 logcat -d | grep -i error
adb -s 192.168.88.155:5555 logcat --pid=$(adb -s 192.168.88.155:5555 shell pidof <package>) -d
Wake and Unlock
adb -s 192.168.88.155:5555 shell input keyevent KEYCODE_WAKEUP
adb -s 192.168.88.155:5555 shell input swipe 540 2000 540 1000 300
adb -s 192.168.88.155:5555 shell 'input keyevent KEYCODE_WAKEUP && sleep 0.5 && input swipe 540 2000 540 1000 300'
Open URLs/Intents
adb -s 192.168.88.155:5555 shell am start -a android.intent.action.VIEW -d 'https://example.com'
adb -s 192.168.88.155:5555 shell am start -a android.settings.SETTINGS
adb -s 192.168.88.155:5555 shell am start -a android.intent.action.DIAL -d tel:5551234