← 返回 Skills 市场
kv0768

Android Control

作者 kv0768 · GitHub ↗ · v0.1.1
cross-platform ⚠ suspicious
694
总下载
1
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install android-control-2
功能描述
Control an Android device via command-line tools (uiautomator, screencap, input, am). Automatically attempts non-root execution first and falls back to root...
使用说明 (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'"
安全使用建议
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.
功能分析
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.
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install android-control-2
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /android-control-2 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
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.
元数据
Slug android-control-2
版本 0.1.1
许可证
累计安装 0
当前安装数 0
历史版本数 2
常见问题

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... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 694 次。

如何安装 Android Control?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install android-control-2」即可一键安装,无需额外配置。

Android Control 是免费的吗?

是的,Android Control 完全免费(开源免费),可自由下载、安装和使用。

Android Control 支持哪些平台?

Android Control 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Android Control?

由 kv0768(@kv0768)开发并维护,当前版本 v0.1.1。

💬 留言讨论