Skip to content

Releases: ZSeven-W/dsh-android

dsh-android v0.1.0-rc.4

Pre-release

Choose a tag to compare

@Kayshen-X Kayshen-X released this 21 Aug 23:11

dsh-android v0.1.0-rc.4

Windows 兼容审计版:rc.3 修完两个 Windows issue 后又通盘扫了一遍,抓出最后一个平台雷。/ The Windows-compatibility audit release: one more platform landmine caught by the sweep that followed rc.3's two Windows fixes.

🐛 修复 / Fixed

  • android_logs 的 follow 模式在 Windows 上必然报错 / Follow-mode logcat always errored on Windows — 限时实时捕获靠给 adb 子进程的进程组发信号收尾(process.kill(-pid)),而 Windows 没有进程组、负 PID 直接抛异常:每个 follow 窗口都以错误告终而不是返回日志。win32 上 adb.exe 是单个客户端进程,现在改为非 detached 启动 + 普通 child.kill()(TerminateProcess)收尾,设备侧 logcat 随传输一起结束。回归测试 stub process.platform 断言窗口干净关闭且子进程确被收割。/ The bounded live capture ended by signalling the adb child's process group — but Windows has no process groups and a negative-PID kill THROWS, so every follow window errored out. On win32 the child now spawns undetached and is reaped with plain child.kill(); regression steps stub the platform and assert both the clean close and the reap marker.

✅ 审计结论 / Audit verdict

其余路径确认 Windows 安全:adb 发现(rc.3 起识别 .exe、LOCALAPPDATA SDK 路径、PATH 双名候选)、宿主侧路径全走 join/sepadb shell 输出 CRLF 归一、截图/流走二进制安全的 exec-out、OCR 在非 macOS 宿主给出解释性错误而非崩溃。设备枚举 → boot → 实时流 → 侧栏面板的全链路已有 Windows 10 + LDPlayer 的真实用户验证(#1)。/ Everything else checked out: discovery (.exe since rc.3, LOCALAPPDATA, dual PATH candidates), join/sep paths throughout, CRLF-normalized shell output, binary-safe exec-out capture, and an explanatory non-macOS OCR refusal. The full devices → boot → stream → panel chain has real-user validation on Windows 10 + LDPlayer (#1).

📦 安装 / Install

dsh plugin --profile web add @zseven-w/dsh-android@next
dsh web

Full Changelog: v0.1.0-rc.3...v0.1.0-rc.4

dsh-android v0.1.0-rc.3

Pre-release

Choose a tag to compare

@Kayshen-X Kayshen-X released this 21 Aug 23:06

dsh-android v0.1.0-rc.3

社区首反馈修复版:两个 Windows 用户报的真实问题,都来自 @sc-yx 的高质量报告(含根因与验证)。/ The first community-feedback release: two real Windows reports, both from @sc-yx's high-quality issues with root cause and validation included.

🐛 修复 / Fixed

  • Windows 下 adb.exe 被误判为不可执行(#1)/ A Windows adb.exe was misjudged as non-executable (#1) — adb 发现逻辑对每个候选都要求 Unix 执行位 mode & 0o111,而 Windows 文件系统根本没有这个位:真实存在、可直接运行的 adb.exe(雷电模拟器安装)在 ADB env / PATH / SDK 三条发现路径上全部被拒。win32 上"是普通文件"即为可执行判定,实际启动失败交给 execFile。回归测试通过 stub process.platform 证明 mode-0644 的 adb.exe 能在 win32 解析、且 Unix 执行位检查在其他平台不受影响。/ Discovery demanded the Unix execute bit on every candidate — a bit no Windows filesystem sets — so a real, runnable adb.exe (an LDPlayer install) was refused across all three discovery tiers. On win32 a regular file IS the check; execFile owns launch failures. The regression stubs process.platform to prove both directions.
  • 与第三方右侧栏共存而不是退化成模态浮层(#2)/ Coexist with a foreign right sidebar instead of going modal (#2)dsh-better-sidebar 等插件先占了 #root 的右 margin 时,设备面板的停靠租约直接失败、退回"点外面就关"的全屏模态——人机协同没法用。现在外来 margin 被当作固定的右缘偏移:margin 按 对方 + 我们 叠加预留,面板停靠在 right: 对方宽度,正好排在对方侧栏左边;释放时恢复对方的原值。对方侧栏占掉超过 60% 视口时仍回退浮层;我们自己属性的二次认领依旧 fail-closed。已知边界:偏移是认领时的快照,对方侧栏事后改宽需要关开一次面板重测。/ A pre-existing root margin failed the dock lease outright, dropping the panel to a click-outside-to-close modal. The lease now treats the foreign margin as a fixed right-edge offset — reserving offset + width and docking the surface immediately left of the other sidebar, restoring the foreign value on release. A sidebar hogging >60% of the viewport still gets the overlay; the offset is a claim-time snapshot.

📦 安装 / Install

dsh plugin --profile web add @zseven-w/dsh-android@next
dsh web

⚠️ 说明 / Notes

  • npm dist-tag: next。/ Published under next.
  • 七套 smoke 全绿(新增 win32 平台回归与外来侧栏共存断言)。/ All seven smoke suites green, with the new win32 and foreign-sidebar regressions.

Full Changelog: v0.1.0-rc.2...v0.1.0-rc.3

dsh-android v0.1.0-rc.2

Pre-release

Choose a tag to compare

@Kayshen-X Kayshen-X released this 21 Aug 15:29

dsh-android v0.1.0-rc.2

原生多模态版:支持图像输入的模型直接"看"安卓屏幕。/ The native-multimodal release: image-capable models now SEE the Android screen.

✨ 新增 / New

  • 截图本身交给模型 / The screenshot itself reaches the model — 五个截图类工具(android_screenshotandroid_interactandroid_tap_elementandroid_tap_textandroid_tap_row)在路由模型声明 image 输入时,把落定截图作为 {type:'image'} 块附在 JSON 摘要旁——识别界面、读像素里的文字不再经过 OCR 转述。门控与落盘照 DSH 内置 read_image 的官方模式(附件服务持久化 + resolveModelInfo 模态检查)。/ On a route whose resolved model declares image input, all five capture-producing tools attach the settle screenshot as an image block beside their JSON summary, following the in-tree read_image pattern (durable attachment store + modality gate).
  • 降级不拒绝 / Degrade, never refuse — 纯文本模型、未挂附件服务、路由解析失败、附件准入失败:结果与 rc.1 逐字节一致,绝不新增错误。/ A text-only model, an absent attachment store, an unresolvable route, or a failed admission all keep the rc.1 result byte-for-byte.
  • OCR 三件套保留其不可替代的用途:像素级精确的按文字点按,以及纯文本路由/非 macOS 宿主的读屏。skill 剧本已教模型"先用眼睛看"。/ The OCR trio keeps its irreplaceable jobs — pixel-precise text taps, and reading on text-only routes; the skill playbook now says "look first".

🐛 修复 / Fixed

  • 永不空闲的前台不再拖 34 秒 / A never-idle foreground fails fast with a real answer — 浏览器网页这类持续动画的前台会让 uiautomator 永远等不到 idle。现在瞬时动画重试一次;仍失败则跳过注定同样失败的 /sdcard 兜底,并明确指路:"改用 android_find_text / android_tap_text(OCR 读像素,不需要 idle)"。在真机 x.com 页面上复现并验证。/ A continuously animating foreground (a web page in Chrome) starves uiautomator's idle wait forever. One retry for transient animations, then the equally doomed /sdcard fallback is skipped and the error routes the model to OCR. Reproduced live against x.com.
  • CI 假 adb 的 stdout 截断 / The fake adb's stdout truncation on Linux — 写完就 process.exit() 会在 Linux 管道上丢弃未刷缓冲(900 行日志只到 251 行,macOS 侥幸全绿)。成功路径改为自然退出。/ process.exit() right after writes discards buffered stdout on Linux pipes (900 chatty lines arrived as 251; macOS happened to swallow it all). Success paths now drain naturally.

📦 安装 / Install

dsh plugin --profile web add @zseven-w/dsh-android@next
dsh web

⚠️ 说明 / Notes

  • npm dist-tag: next。/ Published under next.
  • 新增 18 步 dev-vision-smoke(门控/落盘/双降级/全链路),随 pnpm test 运行。/ An 18-step vision smoke joins pnpm test.
  • 15 个语言 README 均加入"🖼️ 原生多模态"亮点行。/ All 15 locale READMEs gained the Native-multimodal highlight row.

Full Changelog: v0.1.0-rc.1...v0.1.0-rc.2

dsh-android v0.1.0-rc.1

Pre-release

Choose a tag to compare

@Kayshen-X Kayshen-X released this 21 Aug 15:29

dsh-android v0.1.0-rc.1

首个发布:对话里的实时 Android 设备——模拟器或 USB 真机,全程只靠 adb 驱动。/ The first release: a live Android device inside a DeepSeek Harness conversation — emulator or USB phone, driven entirely through adb.

✨ 核心设计 / Core design

  • 纯 adb 中心 / adb is the only contract — 设备的唯一身份是 adb devices 报出的 serial;模拟器与 USB 真机走同一条代码路径,没有 iOS 版那套 WebDriverAgent 构建/隧道/信任状态机,真机授权 USB 调试即插即用。emulator 启动器只是可选发现项,发现不了只影响"启动 AVD"这一个动词。/ A device's one identity is its adb serial; emulators and USB phones share one code path. There is no WebDriverAgent-style build/tunnel/trust machinery — a phone that has authorized USB debugging just works. The emulator launcher is a best-effort discovery used solely by the boot-an-AVD verb.
  • 进程内流水线,无外部依赖、无内部端口 / An in-process stream, no helper, no inner port — 单个持久 adb exec-out 子进程跑 screencap -p 循环,宿主按 PNG IEND 自己切帧,路由直接从内存写 multipart 流。没有需要代理的回环流服务器、没有端口区间、没有孤儿收养——攻击面严格小于代理方案。实测模拟器 ~8 fps、首帧 ~200 ms、tap ~130 ms。/ One persistent adb exec-out child loops screencap -p; the host splits the concatenated PNGs itself and serves the multipart stream straight from memory. Nothing to proxy, no port range, nothing to adopt. Measured: ~8 fps on an emulator, ~200 ms first frame, ~130 ms per tap.
  • 帧随显示旋转 / Frames follow display rotation — 横屏应用的帧直接是 2400×1080,tap 空间即帧空间,客户端不携带任何反向旋转数学。/ A landscape app streams 2400×1080 frames; the tap space IS the frame space, so the client carries no counter-rotation math.

🛠️ 20 个 Agent 工具 / 20 agent tools

devices · boot · shutdown · screenshot · interact · list_apps · launch_app · build_run (Gradle → install → launch) · ui_tree · tap_element · ui_rows · tap_row · find_text · tap_text · wait_for · logs (logcat) · processes · backtrace · meminfo · app_info

  • 语义自动化:uiautomator 层级树、按 resource-id/text/content-desc 点按、列表行计数器 ±1 验证;树失明时 Vision OCR(macOS 宿主)按像素找字/点字。/ Semantic automation: the uiautomator hierarchy, identity taps, list-row counter ±1 verification; Vision OCR (macOS host) reads and taps pixels when the tree is blind.
  • 错误即操作手册:失败必抛、消息带下一步指引;枚举失败绝不伪装成空列表。/ Errors are runbooks: failures always throw with the next step named; a failed listing never masquerades as an empty one.

🖥️ 侧边栏面板 / The sidebar panel

实时画面 + ◁ ○ □ 三键导航 + 旋转/截图/刷新 + 无框/边框/手机框 + 设备选择器(AVD 显示为"用 android_boot 启动"提示);直接在视频上点按拖拽,人机协同。/ The live view with Android's three-button navigation, rotate/screenshot/refresh, three frame styles, and a device picker (AVDs appear as boot-via-android_boot hints); tap and drag directly on the video.

🔐 安全模型 / Security model

与 dsh-ios 同款:HMAC-SHA256 capability(10 分钟过期)、loopback 三重围栏(peer + Host 反 DNS-rebinding + Fetch-Metadata/Origin)、截图目录 lstat+realpath 围栏。可视字节只经签名 URL 到达 UI。/ Same posture as dsh-ios: 10-minute HMAC capabilities, the triple loopback fence, and the screenshot-directory containment walk. Visual bytes reach the UI only through signed URLs.

📦 安装 / Install

dsh plugin --profile web add @zseven-w/dsh-android@next
dsh web

要求 adb 可解析(ADB env / PATH / Android SDK platform-tools)。/ Requires a resolvable adb.

⚠️ 说明 / Notes

  • npm dist-tag: next。/ Published under next.
  • 模拟器画面全白 → 用 -gpu swiftshader_indirect 启动(部分 macOS 上 host-GPU 的 framebuffer 读回损坏,README 排障有记录)。/ A solid-white stream means broken host-GPU readback; relaunch the emulator with -gpu swiftshader_indirect.
  • CJK 文本输入需要设备装 ADBKeyboard;未装时报带安装指引的错误。/ CJK typing needs the ADBKeyboard IME on the device.
  • 尚未实测:USB 真机全流程、android_build_run 对真实 Gradle 工程、AVD 冷启动路径。/ Not yet exercised live: the full USB-phone path, android_build_run against a real Gradle project, and the cold AVD boot.
  • 15 个语言的 README 与六件套封闭 smoke(含 KVM 模拟器 CI job)随包发布。/ Ships with 15 locale READMEs and six hermetic smoke suites plus a KVM emulator CI job.

Full Changelog: https://github.com/ZSeven-W/dsh-android/commits/v0.1.0-rc.1