← Back to Skills Marketplace
kv0768

Android Control

by kv0768 · GitHub ↗ · v0.1.1
cross-platform ⚠ suspicious
694
Downloads
1
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install android-control-2
Description
Control an Android device via command-line tools (uiautomator, screencap, input, am). Automatically attempts non-root execution first and falls back to root...
README (SKILL.md)

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'"
Usage Guidance
This skill is coherent for controlling an Android device, but review these items before enabling it: 1) Clarify execution context: ensure the agent will execute these commands on an intended Android device (for example via 'adb shell' or a controlled device session), not on your local host. 2) Root fallback: the skill will call su and run commands as root if non-root fails — confirm you want the agent to have that ability and require explicit user consent before root actions. 3) Missing utilities: SKILL.md uses cat and base64 but they are not declared; verify those tools exist on the target device or adjust instructions. 4) Sensitive outputs: UI dumps and screenshots can expose personal data — restrict usage to trusted devices and require explicit permission. 5) Test in a safe environment first (a disposable device or emulator) and consider adding explicit prompts/confirmation in the SKILL.md before any destructive or root-level commands are executed.
Capability Analysis
Type: OpenClaw Skill Name: android-control-2 Version: 0.1.1 The skill is classified as suspicious due to its explicit design to perform high-privilege operations, including root access via `su`, on a connected Android device. It directly executes powerful Android shell commands (`uiautomator`, `screencap`, `input`, `am`) for device control. While the stated purpose is legitimate, these capabilities introduce a significant attack surface; if the OpenClaw agent does not rigorously sanitize user-provided inputs before constructing and executing these commands, it could lead to shell injection or other unauthorized actions on the Android device. There is no evidence of intentional malicious behavior like data exfiltration or backdoors within the skill bundle itself, nor are there prompt injection attempts against the OpenClaw agent on the host system.
Capability Assessment
Purpose & Capability
Name/description align with the instructions: the SKILL.md drives uiautomator, screencap, input, and am and explicitly supports a su fallback. The metadata lists the expected Android binaries (uiautomator, input, am, screencap) as optional, which is proportionate to the described capability.
Instruction Scope
The SKILL.md assumes it runs in an environment that already has Android CLI tools available but does not specify HOW to reach the Android device (adb shell, direct device execution, ssh, etc.). It runs commands that read device files (/sdcard/ui_dump.xml) and produce screenshots, and it will retry under su (root). It also uses utilities not listed in metadata (cat, base64) — these may not exist on all Android shells or could be resolved to host utilities if run on the wrong machine. The lack of explicit connection/context instructions raises a real risk that these commands could be executed on an unintended host or without required safeguards.
Install Mechanism
Instruction-only skill with no install spec or downloaded artifacts. This minimizes install-time risk since nothing is written to disk by an installer.
Credentials
The skill requests no environment variables or credentials, which is proportionate. However, it does instruct escalation to root (su) on the target device — necessary for some device operations but also a sensitive capability.
Persistence & Privilege
always is false and the skill is not force-included. The skill permits running root-mode commands on whatever shell the agent uses; autonomous invocation combined with connectivity to an Android device could allow the agent to perform sensitive actions (screenshots, UI dumps, installing or launching apps) without additional confirmation. This is expected for a remote-control skill but is worth guarding with confirmations and explicit targeting.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install android-control-2
  3. After installation, invoke the skill by name or use /android-control-2
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.1.1
- Documentation cleanup: removed redundant section dividers and condensed instructions for easier reading. - No changes to functionality or features.
v0.1.0
- Initial release of android_control skill. - Control Android devices using built-in command-line tools: uiautomator, screencap, input, and am. - Automatically uses non-root commands first, then falls back to root (su) if necessary. - Supports taking UI snapshots, capturing screenshots, simulating taps and swipes, launching apps, and sending text input. - Includes setup instructions, usage examples, and troubleshooting tips for various Android ROMs.
Metadata
Slug android-control-2
Version 0.1.1
License
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 694 downloads so far.

How do I install Android Control?

Run "/install android-control-2" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Android Control free?

Yes, Android Control is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Android Control support?

Android Control is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Android Control?

It is built and maintained by kv0768 (@kv0768); the current version is v0.1.1.

💬 Comments