android_control
FreeNo executable scriptsNot checkedControl an Android device via command-line tools (uiautomator, screencap, input, am). Automatically attempts non-root execution first and falls back to root…
by modbender★ 21 GitHub starsAbout this skill
Android Control Skill
Control an Android phone directly from Clawdbot using built-in Android CLI tools.
The skill always tries normal (non-root) commands first; if they fail, it automatically retries with root mode (su) when available.
Features
- Get UI hierarchy snapshot via
uiautomator dump - Capture screen using
screencap - Simulate taps, swipes, and input events via
input - Launch apps using
am start - Auto retry with root if non-root fails
Setup
Most Android ROMs include uiautomator, input, screencap, and am.
To enable root fallback, install Magisk or run:
su
Usage
Get UI Snapshot (uiautomator dump)
# Try non-root
uiautomator dump /sdcard/ui_dump.xml 2>/dev/null \
&& cat /sdcard/ui_dump.xml \
|| (
# Fallback to root
su -c "uiautomator dump /sdcard/ui_dump.xml" && su -c "cat /sdcard/ui_dump.xml"
)
Take Screenshot (PNG, base64 encoded)
TMP="/sdcard/ai_screen.png"
# Try non-root
screencap -p "$TMP" 2>/dev/null \
&& base64 "$TMP" \
|| (
# Root fallback
su -c "screencap -p $TMP"
su -c "base64 $TMP"
)
Tap on Screen
# Example: tap at (540, 1600)
input tap 540 1600 2>/dev/null \
|| su -c "input tap 540 1600"
Swipe on Screen
# Example: swipe from (500, 1600) to (500, 600) over 300ms
input swipe 500 1600 500 600 300 2>/dev/null \
|| su -c "input swipe 500 1600 500 600 300"
Launch an App
# Example: launch Android Settings
am start -n com.android.settings/.Settings 2>/dev/null \
|| su -c "am start -n com.android.settings/.Settings"
Send Text Input
# Example: send text "Hello"
input text "Hello" 2>/dev/null \
|| su -c "input text 'Hello'"
Install android_control in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the android_control skill do?
Control an Android device via command-line tools (uiautomator, screencap, input, am). Automatically attempts non-root execution first and falls back to root if necessary.
How do I install the android_control skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the android_control skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
by Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
by Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
by Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
by Anthropic