clawpaw-android-control

Android 手机自动化控制技能。支持 Node(Gateway)和 HTTP 两种连接方式,提供点击、滑动、输入、截图、布局获取、应用打开等操作。 (需 Java 11+、Android 10+ 手机,安装 ClawPaw App 并开启无障碍服务)

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 "clawpaw-android-control" with this command: npx skills add klscool/clawpaw-android-control

ClawPaw Android 手机控制

📖 执行前必读

📱 环境要求

手机端

  • Android 10+(推荐 Android 11+)
  • 安装 ClawPaw App
  • 开启无障碍服务(必需)
  • 部分功能需授权额外权限(见 权限说明

主机端

  • Node.js 18+(运行 Gateway)
  • Python 3.8+(运行 HTTP 脚本)
  • 网络连通(同 WiFi 或 Tailscale)

路径说明:本文档中的 <skill_dir> 是占位符,代表本 skill 的实际存放路径(如 ~/.openclaw/skills/clawpaw-android-control)。使用时请替换为实际路径。

执行任何具体任务前,请先查阅操作指南索引:

<skill_dir>/references/INDEX.md

该索引包含:

  • ✅ 所有支持的操作场景
  • ✅ 对应指南文件位置
  • ✅ 快速决策流程
  • ✅ 支持的应用列表

通用流程

  1. 确认任务场景(如"评论互动"、"搜索地点")
  2. 在 INDEX.md 中找到对应指南
  3. 读取指南后执行任务
  4. 优先使用获取布局的方法执行任务

方式一:Node(Gateway)

手机通过 WebSocket 连接 Gateway,通过 OpenClaw nodes 工具调用。

前提:手机端 App 显示「已连接 Gateway」


🎯 原生 Action(优先使用)

以下原生 action 直接用 nodes action=<action> 调用,无需 invoke,有参数验证和统一返回格式:

Action说明参数示例
device_status设备状态(电量、屏幕、WiFi、位置)nodes device_status --node <id>
device_info设备信息(型号、厂商、Android 版本)nodes device_info --node <id>
device_health设备健康(内存、电池详情)仅 Nodenodes device_health --node <id>
device_permissions权限状态 仅 Nodenodes device_permissions --node <id>
location_get获取位置nodes location_get --node <id>
notifications_list通知列表nodes notifications_list --node <id>
photos_latest最新照片(返回图片)nodes photos_latest --node <id>
status列出所有节点nodes status
describe节点详情--node <id>nodes describe --node <id>
notify发送通知--title, --bodynodes notify --node <id> --title "标题" --body "内容"

其他所有命令用 invoke 方式 ↓


🔧 Invoke 命令(非原生)

格式

openclaw nodes invoke --node <NODE_ID> --command <命令> --params '<JSON>'

参数规则

  • 无参数命令:--params '{}'
  • 有参数:JSON 格式,键名与下表一致
  • 带文字:传 text/title/body 等字段

无障碍 / 界面操作(需开启无障碍服务)

命令参数说明示例
clickx, y点击坐标{"x":500,"y":1000}
swipestart_x, start_y, end_x, end_y, duration(可选)滑动{"start_x":720,"start_y":2500,"end_x":720,"end_y":500}
input_textx, y, text点击后输入(需 ClawPaw 输入法){"x":300,"y":800,"text":"内容"}
input_text_directx, y, text无障碍直接输入(无需输入法){"x":300,"y":800,"text":"内容"}
long_pressx, y长按 700ms{"x":500,"y":1000}
two_finger_swipe_samestart_x, start_y, end_x, end_y两指同向滑动(放大){"start_x":400,"start_y":1200,"end_x":400,"end_y":400}
two_finger_swipe_oppositestart_x, start_y, end_x, end_y两指反向滑动(缩放){"start_x":300,"start_y":800,"end_x":600,"end_y":800}
back返回键{}
get_layout获取界面布局 XML{}
screenshot截图(Base64){}
open_schemaschemauri按包名或 schema 打开应用{"schema":"com.android.chrome"}

设备状态(无需无障碍)

命令参数返回
get_battery电量百分比 0-100
get_wifi_nameWiFi SSID
get_screen_stateon / off
get_state完整状态(定位+WiFi+屏幕+电量+分辨率)

硬件控制

命令参数说明
vibrateduration_ms(可选,默认 200)震动
camera_rear后置拍照(异步)
camera_front前置拍照(异步)
screen_on点亮屏幕

通知管理(需通知监听权限)

命令参数说明
notification.showtitle, textbody推送本地通知
notifications.pushtitle, body同上(别名)
system.notifytitle, body系统通知
notifications.actions ⚠️action, key操作通知(dismiss/open/reply)仅 Node

数据访问(需相应权限)

命令参数说明
contacts.listlimit(可选,默认 500)联系人列表
contacts.searchquery, limit搜索联系人
photos.latestlimit(可选,默认 50)最近照片
calendar.listlimit(可选,默认 100)日历事件
calendar.eventslimit同上(别名)

音量控制

命令参数说明
volume.get获取音量
volume.setstream, volume设置音量(stream: media/ring

文件操作(需存储权限)

命令参数说明
file.read_textpath读取 UTF-8 文本
file.read_base64path读取二进制文件

传感器与运动

命令参数说明
sensors.steps步数
sensors.light光照 lux
sensors.info传感器列表
motion.pedometer ⚠️startISO, endISO计步(ISO8601 时间)仅 Node
motion.activity ⚠️活动识别(步行/静止等)仅 Node

蓝牙/WiFi

命令参数说明
bluetooth.list已配对设备
wifi.infoWiFi 状态
wifi.enableenabled开关 WiFi(true/false)

短信/电话(需相应权限)

命令参数说明
sms.listlimit收件箱短信
sms.sendaddress/to, body/text发送短信
phone.dialnumber/phone打开拨号界面
phone.callnumber/phone直接拨打电话

铃声与勿扰

命令参数说明
ringer.get铃声模式(normal/silent/vibrate)
ringer.setmode设置铃声模式
dnd.get勿扰状态
dnd.setenabled设置勿扰(true=仅闹钟)

⚠️ 注意事项

  1. 无障碍服务:界面操作类命令需要开启 ClawPaw 无障碍服务

  2. 权限授权

    • 部分功能需要用户手动授权(通知、联系人、照片等)
    • 具体授权路径见 README_PERMISSIONS.md
  3. 网络连通

    • Gateway 模式:手机需连接到同一 Gateway
    • HTTP 模式:手机与主机需网络互通(同 WiFi 或 Tailscale)
  4. 命令命名

    • 原生 action 用下划线device_status
    • invoke 命令用点号device.statusvolume.set
  5. 返回布局:无障碍命令默认返回布局,可加 return_layout_after: false 关闭


🎯 快速开始

1. 手机端安装 ClawPaw App

  1. 下载 ClawPaw App
  2. 安装到 Android 手机(Android 10+)
  3. 开启无障碍服务:
    设置 → 辅助功能 → 已下载的服务 → ClawPaw Accessibility Service → 开启
    
  4. (可选)按需授予权限:位置、通知、联系人、照片等

2. 主机端配置

方式一:Gateway(WebSocket)

# 确认 Gateway 已运行
openclaw gateway status

# 添加节点(ClawPaw App 连接到 Gateway 后自动注册)
openclaw nodes status

方式二:本地 HTTP

# 确认手机和主机网络连通(同 WiFi 或 Tailscale)
# 手机端 ClawPaw App 端口:8765(默认)

# 使用 Python 脚本
pip3 install requests pyyaml
cd ~/.openclaw/skills/clawpaw-android-control/scripts
python3 clawpaw_controller.py device_info

3. 测试命令

# 查看设备信息(Gateway)
openclaw nodes device_info --node <NODE_ID>

# 获取状态(Gateway)
openclaw nodes device_status --node <NODE_ID>

# 获取最新照片(Gateway)
openclaw nodes photos_latest --node <NODE_ID>

# HTTP 方式测试
python3 clawpaw_controller.py device_info

⚠️ 权限说明

ClawPaw 使用 24 项权限,分为三类:

类别权限数说明
基础权限9 项安装即授予,必需
用户授权14 项手动授权,可选
特殊权限2 项特殊授权,可选

详细说明:见 README_PERMISSIONS.md

功能必需权限示例命令
点击/滑动/输入BIND_ACCESSIBILITY_SERVICEclick, swipe, input_text
定位ACCESS_FINE_LOCATIONlocation_get
通知POST_NOTIFICATIONSnotifications_list
联系人READ_CONTACTScontacts.list
照片READ_MEDIA_IMAGESphotos_latest
短信READ_SMS + SEND_SMSsms.list, sms.send
电话CALL_PHONEphone.dial, phone.call
文件读取READ_EXTERNAL_STORAGEfile.read_text

[61 more lines in file. Use offset=170 to continue.]

手机端 HTTP 服务(默认端口 8765),通过 Python 脚本调用。

前提:手机和主机网络互通(同 WiFi 或 Tailscale)

配置

# config.yaml
network_type: local  # local / tailscale / wifi
host: 127.0.0.1      # local 模式不需要
port: 8765
timeout: 10

# 百炼 API 配置(视觉分析需要)
dashscope_api_key: sk-xxx
dashscope_model: qwen3.5-plus

脚本调用

脚本位置<skill_dir>/scripts/clawpaw_controller.py

# 基础操作
python3 clawpaw_controller.py click 500 1000
python3 clawpaw_controller.py swipe 500 1500 500 500
python3 clawpaw_controller.py input_text_direct 300 800 "内容"
python3 clawpaw_controller.py back

# 状态查询
python3 clawpaw_controller.py get_battery
python3 clawpaw_controller.py get_wifi_name
python3 clawpaw_controller.py device_info

# 视觉分析(HTTP 独有)
python3 clawpaw_controller.py analyze "找到搜索框并返回坐标"
python3 clawpaw_controller.py analyze "找到评论入口" --no-save

完整命令列表见脚本帮助:python3 clawpaw_controller.py --help


快速参考

需求推荐方式命令
查设备状态原生 actiondevice_status
查设备信息原生 actiondevice_info
获取位置原生 actionlocation_get
获取通知原生 actionnotifications_list
获取照片原生 actionphotos_latest
点击/滑动/输入invokeclick/swipe/input_text
打开应用invokeopen_schema
截图/布局invokescreenshot/get_layout

更新时间:2026-03-13

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.

General

Wechat Mp Writer

WeChat Official Account (公众号) content writer with article formatting, headline optimization, and engagement tips. Use when you need to write WeChat articles,...

Registry SourceRecently Updated
General

OpenClaw EverMemory Installer

Use this skill when installing, upgrading, verifying, or publishing the EverMemory OpenClaw plugin and its companion skill, including local path install, npm...

Registry SourceRecently Updated
General

Ip Advisor

知识产权顾问。专利、版权、商业秘密、注册流程、保护策略。IP advisor for patents, copyrights, trade secrets. 知识产权、专利、版权。

Registry SourceRecently Updated
1950ckchzh
General

炒股大师模拟器

炒股大师模拟器 | 股市模拟交易练习 | A股/港股/美股投资学习 | 化身文主任/股神老徐/炒股养家/孙宇晨等各位大师学习投资思路 | 多智能体股票讨论群

Registry SourceRecently Updated