xxccdl/DeepSeek-Harness-Mobile
在 Android 手机上运行 DeepSeek Harness AI 助手的 React Native 应用,内置 Termux + proot-distro 完整 Linux 环境,无需 root,支持手机控制
项目介绍Project Overview
DeepSeek Harness Mobile 是在 Android 上运行 dsh AI 助手的 React Native 应用,内置 Termux 与 proot Debian 环境,无需 root。它可执行命令、安装软件、读写文件,并通过无障碍服务读屏、点击、滑动和输入。适合在手机上让 AI 自动操作设备或处理任务;注意手机控制需授权无障碍,且首次初始化需数分钟。
DeepSeek Harness Mobile is a React Native app that runs the dsh AI assistant on Android. It bundles Termux and a proot Debian Linux environment without root, allowing command execution, package installation, file access, and phone control via accessibility services such as screen reading, tapping, swiping, and text input. Use it when an AI needs to operate or automate tasks directly on a phone. Note that accessibility permission is required, and first-time setup takes several minutes.
请帮我了解并安装插件:【DeepSeek-Harness-Mobile】【https://github.com/xxccdl/DeepSeek-Harness-Mobile】
把上面这条消息直接发给当前会话里的 DSH,让它帮你了解并安装。安装命令不一定准确,发给 DSH 更稳。Send this message to DSH in your current session. CLI install commands may not be accurate across systems — DSH will figure it out for you.
或使用命令行安装(适合开发者)Or use CLI install (for developers)
命令行安装CLI Install
dsh plugin --profile web add github:xxccdl/DeepSeek-Harness-Mobile
把 xxccdl/DeepSeek-Harness-Mobile 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
DeepSeek Harness Mobile
在 Android 手机上运行 DeepSeek Harness(dsh)AI 助手的 React Native 应用。
内置完整 Linux 环境(Termux + proot-distro Debian 容器),无需 root。AI 可以读写文件、执行命令、安装软件包,甚至可以读取屏幕、点击、滑动、输入,真正操控这台手机。
✨ 功能特性
- 内置 dsh 引擎:嵌入式 Node.js 运行时 + dsh-bundle,首次启动自动解压 Termux bootstrap 并启动 dsh Web 服务
- 完整 Linux 环境:proot-distro 跑 Debian 容器,AI 可通过 bash 工具执行
apt/pip/git/python等命令 - 手机控制:无障碍服务 + 本地 HTTP 桥接,AI 可读取屏幕元素、点击、长按、滑动、输入、滚动、按键、打开应用
- AI 产物一键保存:AI 产出文件后一键保存到
Download/DeepSeekHarness - 任务通知:任务完成、产物保存时通过系统通知提醒
- 移动端深度适配:DeepSeek 风格深色 UI、触屏优化、拍照/相册/文件上传、悬浮球、检查更新
- 前台服务保活:退后台 / 息屏后 dsh 服务继续运行
🏗️ 架构
React Native (0.87) 壳层 + 原生 Android 模块:
| 模块 | 说明 |
|---|---|
TermuxEngine |
嵌入式 Termux 引擎:解压 bootstrap、初始化环境、启动 dsh Web 服务 |
PhoneAccessibilityService / PhoneControlHttp |
无障碍服务 + 本地 HTTP(127.0.0.1:3090),供 dsh-tool-phone 调用 |
DeliverSaver / DeliverReceiver |
产物保存到 Download/DeepSeekHarness + 通知点击保存 |
FloatingBallService |
悬浮球(悬浮窗权限 + 触控手势) |
启动流程:
- App 启动 → 解压 Termux bootstrap → 安装 nodejs / ripgrep → 配置 npm 镜像
- 安装 dsh 引擎(dsh-bundle.dat)→ 解压 Debian rootfs(proot-distro)
- 启动 dsh Web 服务(
127.0.0.1:3080)→ React Native WebView 加载聊天界面
📁 目录结构
├── android/ # Android 原生工程(Kotlin 模块在 android/app/src/main/java/com/dshmobile/)
├── src/ # React Native 界面(SplashScreen / InitScreen / ChatScreen)
├── scripts/ # 资产构建脚本(bundle-dsh / pack-node-runtime 等)
├── proot-distro/ # proot-distro 打包脚本
├── plugins/ # dsh 插件源码(@deepseek-ai/*)
└── ...
🔌 插件
本仓库 plugins/@deepseek-ai/ 收录移动端用到的 dsh 插件源码,包括:
- 手机控制:
dsh-tool-phone/dsh-client-ui-phone-control(无障碍读屏 + 点击/滑动/输入等) - 悬浮球:
dsh-client-ui-floatball - 产物交付:
dsh-tool-deliver/dsh-client-ui-deliver(一键保存到下载目录) - 检查更新:
dsh-client-ui-updatecheck - 移动端 UI 魔改:
dsh-client-ui-mobile(DeepSeek 风格、上传面板、窄屏适配) - 移动桥接:
dsh-mobile-bridge(通知/保存等原生桥接) - 以及
dsh-tool-vision、dsh-tool-webfetch、dsh-tool-snippets、dsh-command-btw等
插件通过 scripts/bundle-dsh.mjs 打进 dsh-bundle.dat(在 EXTRA_PKGS 中声明的包)。
📦 快速开始(下载安装)
从 Releases 下载最新 app-release.apk 直接安装即可,无需 root、无需额外配置。
首次启动会自动解压内置环境并初始化,耗时较长(约数分钟),属正常现象。
🛠️ 构建(Android)
环境要求
- Node.js ≥ 22.11
- JDK 17(见
android/gradle.properties中的org.gradle.java.installations.paths) - Android SDK / Android Studio
运行时资产
为保持仓库精简,以下大体积运行时数据不入库,需先构建或从 Release 获取:
| 资产 | 生成方式 |
|---|---|
android/app/src/main/assets/dsh/dsh-bundle.dat |
node scripts/bundle-dsh.mjs(dsh 引擎依赖闭包) |
android/app/src/main/assets/dsh/node-runtime.dat |
node scripts/pack-node-runtime.mjs(嵌入式 Node 运行时) |
android/app/src/main/assets/dsh/debian-rootfs.tar.gz |
proot-distro/pack-proot.mjs(Debian rootfs) |
android/app/src/main/assets/termux/bootstrap-aarch64.zip |
Termux bootstrap 包 |
mmmbuto-node-pty-android-arm64-1.1.2.tgz |
node-pty Android 预编译包 |
注意:资产构建脚本是开发期工具,部分路径指向本地桌面版 dsh 仓库 (如
scripts/bundle-dsh.mjs中的SRC_NM = d:/code/dsh-gui/node_modules), 开源后需按自己的环境调整这些路径。
构建 APK
npm install
cd android
./gradlew assembleRelease
生成 APK:android/app/build/outputs/apk/release/app-release.apk
⚠️ 签名:仓库默认 release 构建复用 debug keystore(仅用于开发调试)。 正式分发请在
android/keystore.properties配置自己的 keystore(模板:storeFile、storePassword、keyAlias、keyPassword,文件不入库)。 存在该文件时自动使用正式签名,缺失时回退 debug 签名保证可直接构建。
📱 使用
- 首次启动自动初始化环境,并请求无障碍权限(手机控制)
- 在系统设置 → 无障碍中开启 DeepSeek Harness
- 打开 App,在设置页的「手机控制」分区可验证屏幕读取
- 悬浮球/通知/文件上传等权限按需授权
🙏 致谢
- DeepSeek Harness — dsh 引擎
- Termux — Android 终端环境
- proot-distro — Linux 发行版容器
nexu-io/open-design
ruvnet/ruflo
amruthpillai/reactive-resume
esengine/DeepSeek-Reasonix
volcengine/OpenViking
Molunerfinn/PicGo
titanwings/distilly
titanwings/colleague-skill