android_control

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.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "android_control" with this command: npx skills add kv0768/android-control-2

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'"

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

Agent Dev Workflow

Orchestrate coding agents (Claude Code, Codex, etc.) to implement coding tasks through a structured workflow. Use when the user gives a coding requirement, f...

Registry SourceRecently Updated
Coding

Cortex Engine

Persistent cognitive memory for AI agents — query, record, review, and consolidate knowledge across sessions with spreading activation, FSRS scheduling, and...

Registry SourceRecently Updated
Coding

Skill Blocker - 安全守卫

Blocks execution of dangerous commands and risky operations like destructive deletions, credential theft, code injection, and unauthorized system changes to...

Registry SourceRecently Updated
014
Profile unavailable
android_control | V50.AI