Skill flagged — suspicious patterns detected

ClawHub Security flagged this skill as suspicious. Review the scan results before using.

Android GUI Automation

v3.0.0

Automate Android apps via Termux using uiautomator2 or Tasker for clicks, swipes, screenshots, text extraction, price tracking, and scheduled tasks.

0· 44· 3 versions· 0 current· 0 all-time· Updated 2h ago· MIT-0
bySMS@smseow001

Android GUI Automation

让 MiniMax(或其他 MCP Client)通过 MCP 协议直接调用 uiautomator2,像真人一样控制 Android 手机屏幕。

架构

MiniMax API (MCP Client)
    ↓ MCP 调用
uiautomator2-mcp (在 Termux 里跑)
    ↓ uiautomator2
Android 手机屏幕 ← USB/无线 ADB

核心优势:

  • MiniMax 直接理解用户意图
  • MCP Tools 自动暴露所有手机操作能力
  • 45 个现成工具,包括 tap_sequence(复合步骤序列)
  • 不需要写死步骤,AI 自己拆解任务

第一步:Termux 安装

pkg install python python-pip
pip install uiautomator2 uiautomator2-mcp pillow requests schedule
python -m uiautomator2 init

第二步:启动 MCP Server

# 方式A: 直接运行(stdio 模式,AI 通过 stdin/stdout 调用)
uiautomator2-mcp

# 方式B: SSH 远程调用(从其他机器连接手机)
ssh user@phone-ip 'cd /path/to/project && uiautomator2-mcp'

第三步:MiniMax MCP 配置

在 MiniMax MCP 配置里添加:

{
  "mcpServers": {
    "android": {
      "command": "ssh",
      "args": ["user@phone-ip", "uiautomator2-mcp"]
    }
  }
}

45 个可用 MCP Tools

连接 & 设备

Tool说明
list_devices列出 ADB 可见的所有设备
connect连接设备(IP:5555 或自动发现)
device_info获取机型/屏幕/系统版本
current_app获取当前前台 APP

点击 & 滑动

Tool说明
tap点击坐标
double_tap双击坐标
long_tap长按坐标
multi_tap多次点击
swipe滑动(两点之间)
drag拖拽
press_key按键(home/back/enter/power)

输入

Tool说明
input_text输入文字
set_element_text设置元素文字

元素定位

Tool说明
find_element查找元素(text/resourceID/class/xpath)
tap_element查找并点击元素
double_tap_element查找并双击元素
element_exists检查元素是否存在
wait_element等待元素出现

⭐ 复合操作(最强大)

Tool说明
tap_sequence一次执行多步操作序列
// tap_sequence 示例:淘宝搜索 iPhone
{
  "action": "tap_sequence",
  "steps": [
    {"action": "tap_element", "text": "搜索"},
    {"action": "wait", "timeout": 2},
    {"action": "input_text", "text": "iPhone 16 256GB"},
    {"action": "press_key", "key": "enter"},
    {"action": "wait", "timeout": 3},
    {"action": "screenshot", "save_path": "/sdcard/result.png"}
  ]
}

截图 & UI 分析

Tool说明
screenshot截图(可返回 base64 给 AI 分析)
dump_hierarchy获取 XML 界面结构
get_ui_tree获取 JSON 格式完整 UI 树

APP 管理

Tool说明
app_start启动 APP
app_stop停止 APP
app_install安装 APK
app_clear清空 APP 数据
app_info获取 APP 信息

设备控制

Tool说明
screen_on亮屏
screen_off灭屏
unlock解锁
open_notification打开通知栏
get_clipboard读剪贴板
set_clipboard写剪贴板

文件 & Shell

Tool说明
push_file推文件到手机
pull_file从手机拉文件
shell在手机上执行 shell

日志

Tool说明
get_logs读取 logcat 日志
clear_logs清空日志

使用示例

示例1:淘宝搜索商品

用户: "帮我去淘宝搜 iPhone 16 多少钱"

MiniMax MCP 调用:
1. tap_sequence([
     {action:"tap_element", text:"搜索"},
     {action:"input_text", text:"iPhone 16 256GB"},
     {action:"press_key", key:"enter"},
     {action:"wait", timeout:3}
   ])
2. screenshot(inline=true)  →  AI 视觉读价格

示例2:小红书发笔记

用户: "帮我发一条小红书,内容是今天发现超好用的AI工具"

MiniMax MCP 调用:
tap_sequence([
  {action:"tap_element", text:"发布"},
  {action:"wait", timeout:2},
  {action:"tap_element", text:"选择照片"},
  {action:"wait", timeout:1},
  {action:"tap", x:540, y:960},  // 选第一张
  {action:"tap_element", text:"完成"},
  {action:"wait", timeout:1},
  {action:"input_text", text:"今天发现一个超好用的AI工具!#AI工具"},
  {action:"tap_element", text:"发布"},
  {action:"wait", timeout:3}
])

示例3:多平台比价

用户: "帮我对比 iPhone 16 在淘宝、拼多多、京东的价格"

MiniMax 循环调用3次:
for platform in [taobao, pinduoduo, jd]:
  1. app_start(package=platform)
  2. tap_sequence([搜索 → 输入iPhone16 → 等待结果])
  3. screenshot(inline=true) → AI 读价格
汇总 → 生成对比 → 发 Telegram

APP 包名速查

APP包名搜索比价发帖
淘宝com.taobao.taobao
拼多多com.xunmeng.pinduoduo
小红书com.xingin.xhs
抖音com.ss.android.ugc.aweme⚠️
京东com.jingdong.app.mall
微信com.tencent.mm

定时任务 & 通知

# crontab 定时执行(Termux 里)
0 9,20 * * * python3 price_monitor.py >> ~/logs/price.log 2>&1
# price_monitor.py — 用 MCP call 包装
import subprocess, json

def mcp_call(tool, **kwargs):
    req = {"jsonrpc":"2.0","method":"tools/call",
           "params":{"name":tool,"arguments":kwargs},"id":1}
    proc = subprocess.Popen(
        ["ssh", "phone-ip", "uiautomator2-mcp"],
        stdin=subprocess.PIPE, stdout=subprocess.PIPE, text=True
    )
    out, _ = proc.communicate(input=json.dumps(req)+"\n")
    return json.loads(out)

已知限制

场景支持
标准 UI APP
游戏/Unity APP
银行加固 APP⚠️
滑动验证码⚠️ 需打码平台
人脸验证

参考

Version tags

latestvk97beznrwtj4b7k5pv1fn1s6ch85snhf