Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "arcships",
"description": "Android Use for Claude Code",
"owner": {
"name": "arcships",
"url": "https://github.com/arcships"
},
"plugins": [
{
"name": "android-use",
"source": "./",
"description": "Operate ADB-authorized Android phones and emulators over MCP"
}
]
}
38 changes: 38 additions & 0 deletions .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "android-use",
"displayName": "Android Use",
"version": "0.7.1",
"description": "通过 ADB 和 UiAutomator2 操作 Android,支持控件树、截图、中文输入、批处理和浏览器实时屏幕。",
"author": {
"name": "arcships",
"url": "https://github.com/arcships"
},
"homepage": "https://github.com/arcships/android-use#quick-start",
"repository": "https://github.com/arcships/android-use",
"license": "MIT",
"keywords": [
"android",
"adb",
"mcp",
"uiautomator2"
],
"commands": {
"screen": {
"description": "在浏览器中打开 Android 实时屏幕",
"content": "Claude Code 终端不内嵌手机画面,改用本机浏览器预览。\n\n1. 运行 `uv run --frozen --directory \"${CLAUDE_PLUGIN_ROOT}\" android-use screen`。\n2. 结果 `ok` 为 true 时,用系统默认浏览器打开返回的 `url`(macOS 用 `open`,Linux 用 `xdg-open`,Windows 用 `start`)。\n3. 该 URL 含本机私有令牌:不要写进文件、提交或发给任何外部服务,只告诉用户画面已在浏览器打开。\n4. 结果 `ok` 为 false 时,按返回的错误码说明原因,不要重试循环。\n"
}
},
"mcpServers": {
"android_use": {
"type": "stdio",
"command": "uv",
"args": [
"run",
"--frozen",
"--directory",
"${CLAUDE_PLUGIN_ROOT}",
"android-use-mcp"
]
}
}
}
2 changes: 1 addition & 1 deletion .codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "android-use",
"version": "0.7.0",
"version": "0.7.1",
"description": "通过 ADB 和 UiAutomator2 操作 Android,支持实时屏幕侧边栏、控件树、截图、中文输入和批处理。",
"skills": "./skills/",
"mcpServers": "./.mcp.json",
Expand Down
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<a href="#mcp-client-support"><img src="https://img.shields.io/badge/MCP-stdio-3DDC84" alt="Standard stdio MCP" /></a>
</p>
<p><strong>English</strong> · <a href="README.zh-CN.md">简体中文</a></p>
<p><a href="#quick-start"><strong>Use in Dim Agent →</strong></a> · <a href="https://github.com/arcships/android-use/releases/tag/v0.7.0">Download v0.7.0</a> · <a href="#enable-jev-from-the-screen">Set up Jev</a> · <a href="docs/guide.md">User guide</a> · <a href="https://github.com/arcships/android-use/issues">Report an issue</a></p>
<p><a href="#quick-start"><strong>Use in Dim Agent →</strong></a> · <a href="https://github.com/arcships/android-use/releases/tag/v0.7.1">Download v0.7.1</a> · <a href="#enable-jev-from-the-screen">Set up Jev</a> · <a href="docs/guide.md">User guide</a> · <a href="https://github.com/arcships/android-use/issues">Report an issue</a></p>
</div>

## Android tasks, inside Dim Agent
Expand Down Expand Up @@ -212,6 +212,20 @@ uv run --no-project --python 3.13 python scripts/install.py install --source . -

</details>

<details>
<summary><strong>Claude Code plugin</strong> — MCP tools and the usage skill; the live screen opens in a browser</summary>

Requires `uv`, ADB and ffmpeg on this computer. In Claude Code, run:

```text
/plugin marketplace add arcships/android-use
/plugin install android-use@arcships
```

To load a source checkout instead, start Claude Code from any project with `claude --plugin-dir /absolute/path/android-use`. `uv` creates the environment on first start and reuses it afterwards. The Claude Code terminal does not embed the phone screen: run `/android-use:screen` to open the live screen in a browser on the same computer.

</details>

<details>
<summary><strong>Standard MCP</strong> — Claude Desktop, Cursor, VS Code, and other local stdio clients</summary>

Expand Down Expand Up @@ -313,7 +327,7 @@ Development comparisons include **18 source-level trials** and **12 live Agent /

## Project status

**v0.7.0 · MIT · 481 Python tests · 24 browser tests.** Native install/upgrade/rollback acceptance passed on macOS ARM64/Intel (15 scenarios each), Linux x86_64 and Windows x86_64 (13 each). These package checks use no phone or model; earlier Android 16 physical-device and emulator acceptance remain separate. [Validation evidence →](docs/validation.md)
**v0.7.1 · MIT · 487 Python tests · 25 browser tests.** Native install/upgrade/rollback acceptance was last run for v0.7.0 and passed on macOS ARM64/Intel (15 scenarios each), Linux x86_64 and Windows x86_64 (13 each). These package checks use no phone or model; earlier Android 16 physical-device and emulator acceptance remain separate. [Validation evidence →](docs/validation.md)

Multi-touch, arbitrary gesture paths, fine-grained text selection and custom-editor input fallbacks are not implemented. A matched UI condition proves that condition; the Agent must verify business outcomes. Control and preview run locally, and tool results are handled by your chosen client/model.

Expand Down
18 changes: 16 additions & 2 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<a href="#mcp-客户端支持"><img src="https://img.shields.io/badge/MCP-stdio-3DDC84" alt="标准 stdio MCP" /></a>
</p>
<p><a href="README.md">English</a> · <strong>简体中文</strong></p>
<p><a href="#快速开始"><strong>在 Dim Agent 中使用 →</strong></a> · <a href="https://github.com/arcships/android-use/releases/tag/v0.7.0">下载 v0.7.0</a> · <a href="#在屏幕中启用-jev">配置 Jev</a> · <a href="docs/guide.zh-CN.md">使用指南</a> · <a href="https://github.com/arcships/android-use/issues">反馈问题</a></p>
<p><a href="#快速开始"><strong>在 Dim Agent 中使用 →</strong></a> · <a href="https://github.com/arcships/android-use/releases/tag/v0.7.1">下载 v0.7.1</a> · <a href="#在屏幕中启用-jev">配置 Jev</a> · <a href="docs/guide.zh-CN.md">使用指南</a> · <a href="https://github.com/arcships/android-use/issues">反馈问题</a></p>
</div>

## 在 Dim Agent 中,直接完成 Android 任务
Expand Down Expand Up @@ -208,6 +208,20 @@ uv run --no-project --python 3.13 python scripts/install.py install --source . -

</details>

<details>
<summary><strong>Claude Code 插件</strong> — MCP 工具与使用技能,实时画面在浏览器中打开</summary>

需要本机已安装 `uv`、ADB 和 ffmpeg。在 Claude Code 中运行:

```text
/plugin marketplace add arcships/android-use
/plugin install android-use@arcships
```

从源码调试时,在任意项目目录用 `claude --plugin-dir /absolute/path/android-use` 加载。首次启动由 `uv` 创建环境,之后直接复用。Claude Code 终端不内嵌手机画面:运行 `/android-use:screen`,实时画面会在同一台电脑的浏览器中打开。

</details>

<details>
<summary><strong>标准 MCP</strong> — Claude Desktop、Cursor、VS Code 及其他本地 stdio 客户端</summary>

Expand Down Expand Up @@ -311,7 +325,7 @@ v0.5.0 通过 **277 项 Python 测试、17 项界面测试**。内置 OCR 目前

## 项目状态

**v0.7.0 · MIT · 481 项 Python 测试 · 24 项浏览器测试。** 原生安装、升级和回滚在 macOS ARM64/Intel 各通过 15 项,Linux x86_64/Windows x86_64 各通过 13 项。这些包验收不操作手机、不调用模型;历史 Android 16 真机与模拟器验收分开记录。[验证记录](docs/validation.md)。
**v0.7.1 · MIT · 487 项 Python 测试 · 25 项浏览器测试。** 原生安装、升级和回滚验收最近一次针对 v0.7.0 执行,在 macOS ARM64/Intel 各通过 15 项,Linux x86_64/Windows x86_64 各通过 13 项。这些包验收不操作手机、不调用模型;历史 Android 16 真机与模拟器验收分开记录。[验证记录](docs/validation.md)。

多指手势、任意轨迹、精细文本选区及自绘编辑器输入兜底尚未实现。UI 条件满足仅证明该条件,Agent 仍需验收业务结果。控制和预览运行于本机,工具结果由你选择的客户端与模型处理。

Expand Down
6 changes: 3 additions & 3 deletions docs/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,12 @@ Choose a release ZIP or a source checkout. If you already use `android-use-local

### Install the release ZIP

Download `android-use-0.7.0-plugin.zip` and `SHA256SUMS` from [GitHub Release v0.7.0](https://github.com/arcships/android-use/releases/tag/v0.7.0). The ZIP includes the compiled UI, Python source/lockfile, stable installer, skills, bilingual docs and a local marketplace. Prepare uv, ADB, ffmpeg and the Codex CLI; dependencies are downloaded on first installation.
Download `android-use-0.7.1-plugin.zip` and `SHA256SUMS` from [GitHub Release v0.7.1](https://github.com/arcships/android-use/releases/tag/v0.7.1). The ZIP includes the compiled UI, Python source/lockfile, stable installer, skills, bilingual docs and a local marketplace. Prepare uv, ADB, ffmpeg and the Codex CLI; dependencies are downloaded on first installation.

```bash
shasum -a 256 -c SHA256SUMS # Linux: sha256sum -c SHA256SUMS
unzip android-use-0.7.0-plugin.zip -d android-use-v0.7.0
cd android-use-v0.7.0
unzip android-use-0.7.1-plugin.zip -d android-use-v0.7.1
cd android-use-v0.7.1
uv run --no-project --python 3.13 python scripts/install.py doctor
uv run --no-project --python 3.13 python scripts/install.py install --source . --codex
```
Expand Down
6 changes: 3 additions & 3 deletions docs/guide.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,12 @@ uv run android-use --serial SERIAL ready

### 安装发行包 ZIP

从 [GitHub Release v0.7.0](https://github.com/arcships/android-use/releases/tag/v0.7.0) 下载 `android-use-0.7.0-plugin.zip` 和 `SHA256SUMS`。包内包含编译好的界面、源码与锁文件、固定入口安装器、技能和双语说明;先准备 uv、ADB、ffmpeg 和 Codex CLI,首次安装需下载 Python 依赖。
从 [GitHub Release v0.7.1](https://github.com/arcships/android-use/releases/tag/v0.7.1) 下载 `android-use-0.7.1-plugin.zip` 和 `SHA256SUMS`。包内包含编译好的界面、源码与锁文件、固定入口安装器、技能和双语说明;先准备 uv、ADB、ffmpeg 和 Codex CLI,首次安装需下载 Python 依赖。

```bash
shasum -a 256 -c SHA256SUMS # Linux: sha256sum -c SHA256SUMS
unzip android-use-0.7.0-plugin.zip -d android-use-v0.7.0
cd android-use-v0.7.0
unzip android-use-0.7.1-plugin.zip -d android-use-v0.7.1
cd android-use-v0.7.1
uv run --no-project --python 3.13 python scripts/install.py doctor
uv run --no-project --python 3.13 python scripts/install.py install --source . --codex
```
Expand Down
50 changes: 50 additions & 0 deletions docs/releases/v0.7.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Android Use v0.7.1

**A steadier live screen. Now a Claude Code plugin.**

The live phone view no longer restarts its video every time the panel is briefly hidden, an authentication pause can be ended from the panel, and the repository now loads directly as a Claude Code plugin. All 26 MCP tools, keyless host decisions, optional Jev and the existing Dim / Codex integrations are unchanged.

[English README](https://github.com/arcships/android-use/blob/v0.7.1/README.md) · [中文 README](https://github.com/arcships/android-use/blob/v0.7.1/README.zh-CN.md) · [Native installation and rollback](https://github.com/arcships/android-use/blob/v0.7.1/docs/standalone.md) · [Source upgrades](https://github.com/arcships/android-use/blob/v0.7.1/docs/upgrading.md)

## What's changed

- **The encoder lingers for 30 seconds after the viewer is hidden.** Previously capture stopped 5 seconds after the last frame request, so switching away from the panel and back cost a full encoder restart, about 3 seconds of "waiting for a new picture" on the test phone. Frames stop being served as soon as the viewer is hidden, a hidden viewer never starts an encoder, and an authentication pause or a locked phone still stops capture at once.
- **Stopping video no longer blocks frame requests.** Phone-side recorder cleanup runs outside the preview lock. It used to hold that lock for up to several seconds, stalling every open panel.
- **One failed lock-state read is not a disconnect.** The stream now stops only after three consecutive failures. Tap and swipe are disabled from the first failure until the state is known again.
- **Resume from the panel.** During an authentication pause the panel shows **我已完成,恢复预览**. It clears the same shared flag as `aua_resume`, so a pause left behind by a closed agent session no longer strands every preview. A locked phone still resumes only after it is unlocked on the device.
- **Claude Code plugin.** `.claude-plugin/` adds a plugin manifest and a marketplace entry. The manifest's own MCP entry uses `${CLAUDE_PLUGIN_ROOT}`; the existing `.mcp.json` for Codex and Dim is unchanged. `/android-use:screen` opens the live screen in a local browser, because the Claude Code terminal cannot embed it. The plugin ZIP includes the manifest and the release check now covers its version.

Preview daemons from earlier versions are replaced automatically, keeping the same local address, the first time the screen is opened after updating.

## Install in Claude Code

Requires `uv`, ADB and ffmpeg on the computer the phone is connected to.

```text
/plugin marketplace add arcships/android-use
/plugin install android-use@arcships
```

The first start creates the Python environment with `uv` and needs network access. To load a source checkout or the extracted `android-use-0.7.1-plugin.zip` instead, start Claude Code with `claude --plugin-dir /absolute/path/android-use`.

Dim Agent, Codex and other MCP clients install as in [v0.7.0](https://github.com/arcships/android-use/blob/v0.7.1/docs/releases/v0.7.0.md); asset names are the same with the new version number.

## Validation and scope

- **487 Python tests and 25 browser tests** are in the suite, with Ruff and the UI build. Seven of them are new and cover the lingering encoder, lock-free stop, the lock-probe threshold and panel resume.
- The preview changes were exercised on one physical phone (Android 16, HyperOS 3, USB): returning to a hidden viewer inside the linger window served a frame immediately without a second encoder start, and no recorder process was left on the phone afterwards.
- The Claude Code plugin passed `claude plugin validate` and connected its MCP server when loaded with `--plugin-dir` on macOS with Claude Code 2.1.321. Installation from the hosted marketplace and Windows / Linux hosts have not been exercised.
- Native install, upgrade and rollback acceptance was last run for v0.7.0 and has not been repeated for this version before tagging; the release pipeline re-runs its package checks on the v0.7.1 artifacts.
- While the encoder lingers, the phone keeps recording for up to 30 seconds after the panel is hidden. Frames stay in memory only and are not written to disk.

## 中文

v0.7.1 让实时手机画面更稳,并新增 Claude Code 插件。26 个 MCP 工具、宿主决策、可选 Jev,以及 Dim / Codex 的集成方式保持不变。

- **面板隐藏后录屏保留 30 秒。** 此前停止取帧 5 秒就会停流,切走再切回要重新起流,测试机上约 3 秒看不到新画面。现在隐藏后立即停止提供画面,隐藏期间不会新启动录屏;认证暂停或手机锁屏仍会立刻停流。
- **停流不再阻塞取帧。** 手机端录屏清理移到预览锁之外执行。
- **单次锁屏状态读取失败不再判定为断连。** 连续 3 次失败才停流;第一次失败起禁用点击和滑动,直到状态恢复。
- **在面板中恢复。** 认证暂停时面板显示「我已完成,恢复预览」,清除的是与 `aua_resume` 相同的共享标记;手机锁屏仍需在手机上解锁。
- **Claude Code 插件。** 新增 `.claude-plugin/`,原有 `.mcp.json` 不变。运行 `/plugin marketplace add arcships/android-use` 和 `/plugin install android-use@arcships` 安装;`/android-use:screen` 在本机浏览器中打开实时画面。

**验证范围:** 套件共 487 项 Python 测试、25 项浏览器测试。预览改动在一台 Android 16 真机上通过 USB 验证;Claude Code 插件在 macOS 上通过清单校验并以 `--plugin-dir` 加载连接成功,托管市场安装及 Windows / Linux 尚未验证。原生安装、升级和回滚验收最近一次针对 v0.7.0 执行,打标签前未针对本版本重跑。
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "android-use"
version = "0.7.0"
version = "0.7.1"
requires-python = ">=3.11"
description = "Local Android device control for coding agents over MCP and ADB"
license = "MIT"
Expand Down
2 changes: 2 additions & 0 deletions scripts/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ def main():
".gitignore",
".env.example",
".codex-plugin/plugin.json",
# Claude Code reads this manifest; its MCP entry overrides .mcp.json there.
".claude-plugin/plugin.json",
)
]
for directory in ("src", "skills", "scripts", "docs", "tests", "ui"):
Expand Down
1 change: 1 addition & 0 deletions scripts/release_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def search(name, pattern):

return {
".codex-plugin/plugin.json": json.loads(read(".codex-plugin/plugin.json"))["version"],
".claude-plugin/plugin.json": json.loads(read(".claude-plugin/plugin.json"))["version"],
"pyproject.toml": tomllib.loads(read("pyproject.toml"))["project"]["version"],
"uv.lock": search("uv.lock", r'name = "android-use"\nversion = "([^"]+)"'),
"src/android_use/__init__.py": search(
Expand Down
2 changes: 1 addition & 1 deletion src/android_use/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Android Use: an ADB/UiAutomator bridge for agents."""

__version__ = "0.7.0"
__version__ = "0.7.1"
Loading
Loading