360 Secure SkillHub
360 安全技能中心

adb controller

该 Skill 提供 run_adb.py 脚本,把用户请求转换为 ADB 命令在 Android 设备上执行,随后截图输出图片路径并按要求把截图发送给用户。目标设备/服务器地址来自宿主配置中的 adbServer 字段,支持传入任意标准 ADB 参数。

fengyang0317
fengyang0317
热度 75.36
最近更新 2026-05-18 12:13:07
分类:自动化依赖:代码执行 / 读写文件应用场景:自动化脚本 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add adb-controller
Metadata
name
adb-controller
description
Control an Android device via ADB. Use when the user asks to control an Android device, tap, swipe, input text, or perform actions via adb. Automatically uses the adbServer configured in openclaw.json and takes screenshots.

ADB Controller

This skill allows you to execute ADB (Android Debug Bridge) commands on a connected Android device and automatically retrieve a screenshot of the result.

Configuration

The user can configure the target ADB device/server in their openclaw.json (this is automatically read by the script):

{
  "skills": {
    "entries": {
      "adb-controller": {
        "adbServer": "192.168.1.100:5555" // or device serial
      }
    }
  }
}

Usage

To run an ADB command, execute the provided Python script:

python3 ~/.openclaw/workspace/skills/adb-controller/scripts/run_adb.py shell input tap x y

You can pass any standard ADB arguments to the script. For example:

  • python3 .../run_adb.py shell input text "hello"
  • python3 .../run_adb.py shell input keyevent 26 (Power button)
  • python3 .../run_adb.py shell swipe 500 1000 500 500

Workflow (Mandatory)

  1. Understand the user's intent and determine the correct ADB command.
  2. Execute the user's requested action using the run_adb.py script via the exec tool.
  3. The script will output the path to a newly captured screenshot.
  4. Send the Image: You MUST use the message tool (with action="send" and media="<path-to-screenshot>") to send the resulting screenshot to the user, allowing them to see the outcome of the action. Do not just output the file path.