Headless AutoXJS bridge for Android automation.
AutoClaw lets a computer connect to an AutoXJS-enabled Android device, send scripts remotely, inspect UI, and build agent-driven mobile automation workflows without depending on the VS Code plugin UI.
- Connect AutoXJS devices through the built-in “connect to computer” flow
- Run remote AutoXJS scripts
- Save scripts to device
- Stop one script or stop all scripts
- Inspect current UI elements with AutoXJS selectors
- Capture screenshots on device
- Use a tiny local HTTP bridge for automation
.
├── README.md
├── README.zh-CN.md
├── SKILL.md
├── examples/
│ └── autox_client_template.js
├── scripts/
│ ├── protocol.md
│ ├── send_run.py
│ └── server.js
├── package.json
└── package-lock.json
- Node.js 18+
- AutoXJS on Android
- Android device and computer on the same local network
npm installIf you want to use AutoClaw as an OpenClaw skill from this repository, the simplest way is to clone it into your local skills directory.
Example:
git clone https://github.com/872226263/AutoClaw.git ~/.openclaw/workspace/skills/autoclawThen make sure your OpenClaw instance can see that skill directory.
Minimum expectation:
SKILL.mdis at the repository root- helper scripts stay under
scripts/ - example files stay under
examples/
After that, OpenClaw can load it as a normal local skill.
node scripts/server.jsDefault port:
9317
Health check:
curl http://127.0.0.1:9317/healthExpected result:
{"ok":true,"connected":false,"port":9317}If you need an AutoXJS app build to use with AutoClaw, use the community-maintained AutoX repository:
- Repository: https://github.com/aiselp/AutoX
When publishing this project, prefer pointing users to that repository for AutoXJS installation rather than bundling APK files in this repo.
On the Android side:
- Open AutoXJS
- Use the built-in connect to computer / 调试服务 / 连接电脑 flow
- Enter:
<your-computer-ip>:9317
Example:
192.168.1.10:9317
After the device connects, the bridge will log a successful handshake.
Use the helper script:
python3 scripts/send_run.py --name demo.js --code "toast('hello from AutoClaw')"You can also send a file:
python3 scripts/send_run.py --name demo.js --file ./examples/demo.jstoast("hello from AutoClaw")dialogs.alert("AutoClaw", "Hello from AutoClaw")launchApp("微信")or
app.launchPackage("com.tencent.mm")var obj = text("登录").findOne(3000);
if (obj) obj.click();setText("hello world")requestScreenCapture();
var img = captureScreen();
images.save(img, "/sdcard/autoclaw-shot.png");
log("saved screenshot: /sdcard/autoclaw-shot.png");function walk(node, depth) {
if (!node) return;
var indent = new Array(depth + 1).join(" ");
log(indent + JSON.stringify({
text: node.text(),
id: node.id(),
desc: node.desc(),
className: node.className(),
clickable: node.clickable(),
bounds: String(node.bounds())
}));
var count = node.childCount();
for (var i = 0; i < count; i++) walk(node.child(i), depth + 1);
}
walk(depth(0).findOne(2000), 0);GET /health
GET /exec?cmd=run&path=remote.js&script=toast("hello")
Supported commands:
runsavestopstopAll
- Keep the bridge on a trusted local network
- Do not expose it directly to the public internet without authentication
- Do not use it on sensitive apps without explicit human confirmation
- Review scripts before running risky actions
- Screenshots are currently saved on the phone; they are not pulled back automatically yet
- UI inspection currently returns results through device logs
- Structured result return and file pullback are future improvements
- Screenshot pullback
- Structured JSON result return
- Multi-device management
- Authentication
- Higher-level helpers for click/input/screenshot/UI dump
MIT (or your chosen license)