railgun0325/dsh-phone

dsh-phone

让 DeepSeek Harness 的 agent 跑在手机里,通过 Magisk root 原生操作安卓系统(截图/点击/滑动/开应用)+ 移动端布局 + WebView APK

Uncategorizedagentandroiddeepseek-harness

DSH Phone

Put DeepSeek Harness on your Android phone: the AI takes screenshots, taps, swipes, opens apps and runs commands by itself.

Install one APK → paste your API key → tap once. Everything deploys automatically and runs on-device.

License · Latest Release · Install guide · Troubleshooting · 中文

What it does

  • Two one-tap editions: Root (for rooted phones) and Shizuku (for unrooted phones) — install APK → paste key → deploy; Termux, Node.js, DSH and the Android control plugin are installed automatically.
  • Native Android control: the agent can screenshot, tap, swipe, type, send keys, launch apps, read the UI hierarchy, install APKs and run shell commands.
  • Hardware awareness: battery / brightness / volume / sensors, camera, microphone, TTS, media playback, notifications, vibration, location, and a manual confirm dialog before risky actions.
  • Runs fully on-device: DSH lives in Termux + Node.js; the UI is the local web GUI at port 3080 (bundled WebView shell).
  • Your API key stays on the phone: the APK ships with no key; your key is written only to ~/.dsh-api-key (chmod 600) — never embedded, uploaded or committed.

Choose an edition

Root editionShizuku edition
ForRooted phones (Magisk / Kitsune / KernelSU…)Any unrooted phone
RequiresJust the phonePhone + one-time wireless-debugging authorization (Shizuku, ~30 s)
PrivilegeAgent holds root (spare phone advised)adb-shell level, bounded by the OS
After rebootTermux:Boot auto-startShizuku auto-start + Termux:Boot
Network self-healBuilt-in DNS fixNone (needs working network)

Quick start

Download: open Latest Release and choose dsh-phone-root-*.apk or dsh-phone-shizuku-*.apk. Checksums ship with each release.

Root edition (3 steps)
  1. Install the Root APK (allow “unknown sources”).
  2. Open the app and paste a DeepSeek API key (platform.deepseek.com).
  3. Tap deploy → allow the superuser prompt → wait; the shell opens automatically.

Deployment is automatic: install Termux (bootstrap embedded) → configure mirrors → install Node/DSH → inject plugin & key → grant hardware permissions → start the server.

Shizuku edition (4 steps)
  1. Install the Shizuku APK.
  2. Open the app → tap deploy → follow the guide to install and activate Shizuku (Developer options → Wireless debugging → pair code, one time only).
  3. Return to the app and paste your API key.
  4. Tap deploy → wait; the shell opens automatically.

After a reboot, open Shizuku once to confirm auto-start; DSH is restarted by Termux:Boot.

Upgrading from the v0.1.0 shell: uninstall it first (v0.2.0 uses a new signature; your Termux/DSH environment is not affected and is reused automatically).

Usage

Open the app (or browse http://127.0.0.1:3080 on the phone) and talk to the agent:

GoalExample prompt
See the screen“Take a screenshot”
Open an app“Open WeChat and search for …”
Tap“Tap screen at (540, 1200)”
Run a command“Run pm list packages via android_shell”
Device status“Check the phone with android_status”
Media & controls“Take a photo for me” / “Set volume to 8”

From a PC: adb forward tcp:3081 tcp:3080, then browse http://127.0.0.1:3081.

Tool overview

CategoryCapabilities
Screen & inputscreenshot, tap, swipe, text, keys, wake/unlock, screen-off
Apps & systemshell, launch app, foreground app, UI dump, APK install, package list
Status & sensorsbattery / brightness / volume / network, sensor list & sampling
Mediacamera photo, mic recording, TTS, media playback
Device controlsvolume, brightness, wakelock, vibration
Location & notificationslocation, notifications, clipboard
Human confirmationconfirm dialog before risky actions

All 28 tools are documented in plugin/README.md (Chinese).

Security & privacy

  • On rooted phones the agent equals root: use a spare phone and keep payment / banking accounts off it; the Shizuku edition is also best used on a spare phone.
  • Deployment automatically grants Termux:API camera / microphone / location permissions and a battery exemption; every result is printed in the deploy log and system privacy indicators stay visible.
  • The APK and repository contain no keys; your key lives only in ~/.dsh-api-key (chmod 600). The DeepSeek text model cannot see photos or hear recordings — they are for the user or a future vision model.

More docs

DocContents
ReleasesPer-version features, verification status, known issues and upgrade notes
docs/INSTALL.mdManual install, plugin mounting, API key and auto-start
docs/ARCHITECTURE.mdExecution chains, Root/Shizuku bridge, plugin and DNS self-heal
docs/TROUBLESHOOTING.mdCommon deploy/runtime/reboot issues
plugin/README.mdFull android_* tool list and permissions

Deep guides are currently in Chinese; the README itself is maintained in both languages.

Building from source

# Requires: JDK 17, Android SDK (platform-34 + build-tools 34.0.0), PowerShell, curl
powershell -File tools/fetch-assets.ps1          # fetch pinned Termux/Shizuku APKs (SHA256 verified)
powershell -File app/root/build-apk.ps1          # → app/root/out/dsh-phone-root.apk
powershell -File app/shizuku/build-apk.ps1       # → app/shizuku/out/dsh-phone-shizuku.apk

Zero-Gradle pipeline: javac → d8 → aapt2 → zipalign → apksigner. Toolchain paths come from ANDROID_JDK / ANDROID_SDK_ROOT or the jdk17/ and android-sdk/ directories next to the repo.

⚠️ Signing uses the repo-local apk/debug.keystore (gitignored — back it up; losing the v0.1.0 keystore is why v0.2.0 could not install over v0.1.0).

Repository layout

app/          Two Android variants (common UI/icons; root & shizuku implementations)
tools/        Asset fetch, icon generation, resource compilation, release notes
scripts/      Termux-side scripts (install/start/boot/DNS fix/compat patches)
plugin/       dsh-android-control plugin (28 tools + mobile CSS + su/Shizuku dual executor)
docs/         Install, architecture and troubleshooting guides
apk/          Historic v0.1.0 shell project (kept for reference)

Third-party components

ComponentLicenseRole
Termux / Termux:Boot / Termux:APIGPL-3.0Runtime environment (official APKs redistributed)
Shizuku / shizuku-apiApache-2.0adb-level capability channel for unrooted phones
DeepSeek HarnessMITThe agent framework

This project is MIT — see LICENSE. Thanks to the DeepSeek team for open-sourcing DSH.

Credits

  • DeepSeek Harness — the agent framework that makes this possible
  • The Termux and Shizuku communities — the most reliable infrastructure in the Android ecosystem