DeepSeek Harness Plugin

Lovepeace-art/dsh-android-phone

Stars ★ 1 Category Tools & Capabilities Added 2026-10-19

Mirrors a USB-connected Android phone in the DSH sidebar and drives it over scrcpy's control protocol: 12 agent tools for tap/swipe/type/keys, multi-frame scroll-and-stitch long screenshots, and agent-first control that hands over the moment a human touches the phone. Ships its own adb and scrcpy-server. Windows 10/11 only; the live sidebar mirror additionally requires dsh-better-sidebar.

Install

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:Lovepeace-art/dsh-android-phone

Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).

README

Features

  • The phone screen is shown live in DSH's native right sidebar; the same capabilities are exposed to the model, so the AI can operate the phone too
  • Sub-millisecond input: tap, long-press, drag, wheel scroll, pinch zoom, PC keyboard passthrough
  • Screenshots / long screenshots (scroll-and-stitch)
  • The same capabilities are exposed to the model as tools — "AI operates the phone" and "user views the phone" share one pipeline and one session
  • (still being designed) agents that operate the phone on their own, closing the IM–PC–PHONE loop

Requirements

Need Notes
Windows 10/11 Windows only for now
DSH desktop profile, >= 0.2.0-rc.2
Node ≥ 20 (zero npm dependencies at runtime: adb is called as a CLI, PNG codec ships in src/core/png.js)
Android phone "Developer options → USB debugging" on, plugged in, tap "Always allow" on the RSA prompt; any USB mode works
Not needed dsh-better-sidebar — the pane is a native DSH right-sidebar feature, unrelated to it, and you don't need to install it

Install

Use DSH's built-in installer; no script to run:

  1. DSH → Settings → Plugins → Add plugin
  2. Enter the local absolute path of the plugin directory (e.g. C:\Tools\dsh-android-phone); once this repo is public you can also use the Git URL
  3. Install (DSH's bundled pnpm handles dependencies and registration)
  4. Restart DSH

After installing, the plugin shows up on DSH's "Plugins" page (enable/disable and configure it there); a "📱 Phone" tab also appears in the right sidebar — open it with DSH's own right-sidebar toggle → pick "📱 Phone" in the guide chips.

Not published to npm yet, so installing "by package name" does not work — use a local path or the Git URL. Install/uninstall details: Usage · Install & uninstall (Chinese).

Let an agent install it

Give the model the absolute path of the plugin directory, plus:

Install the DSH plugin dsh-android-phone (directory <absolute path>): run dsh plugin --profile <my profile> add "link:<absolute path>" (if dsh is not on PATH, use <DSH install dir>\resources\runtime\cli\bin\dsh.cmd), then run node scripts/doctor.mjs and make it 10/10 green, then restart DSH. Do not modify files in the repository.

How it works

┌─ DSH host process (Node) ──────────────┐
│  session.js  single session / self-heal │      ┌─ phone ─┐
│  video.js    adb reverse + frame parser │ ───► │scrcpy-  │
│  control.js  control message encoder    │ ◄─── │server   │
│  longshot.js frame-by-frame stitching   │      └─────────┘
│  index.js    12 tools + 19 HTTP routes  │
└───────────────┬────────────────────────┘
                │ HTTP (video stream + control)
┌───────────────▼────────────────────────┐
│  DSH sidebar (browser)                  │
│  client.js  WebCodecs decode → canvas   │
└────────────────────────────────────────┘

Documentation

The in-depth docs are currently in Chinese:

Doc Contents
Usage install/uninstall details, sidebar gestures, quality presets, settings page, "Open app", session & ownership
Tools & API the 12 phone_* tools, action semantics, 19 HTTP routes
Internals the three channels, coordinate space, five key design decisions, performance numbers
Troubleshooting self-check, adb lookup order, common issues, cleaning up leftovers

Development

Coding conventions (hard rules, common pitfalls, what to check after a change) live in AGENTS.md; workflow in CONTRIBUTING.md. Both are in Chinese.

Known limitations

  • Windows only
  • Non-ASCII text is sent over the control channel as UTF-8 (auto-split at ≤300 bytes); only the adb fallback path is ASCII-only
  • Low frame rate on a static screen (5–6 fps): scrcpy's virtual display only produces frames when the content changes — this is expected
  • Long screenshots may be slightly misaligned on infinite feeds, lazy-loaded content or countdowns
  • On some devices input swipe triggers system gestures (the control-channel path is unaffected)

Disclaimer

  • If you believe something in this repository infringes your rights, please open an Issue; it will be removed or replaced promptly once verified.

Contributing

Issues and PRs are welcome. Please run npm run ci before submitting and fill in the test section of the PR template (screenshots for UI changes, sources for protocol-level changes). See CONTRIBUTING.md (Chinese) for the full workflow and code conventions.

This project uses no CLA: submitting a PR under Apache-2.0 means you agree to license your contribution under the same license.

License & acknowledgements

Code is licensed under the Apache License 2.0; see LICENSE. Third-party notices are in NOTICE.

  • scrcpy (Apache-2.0) — vendor/scrcpy-server is redistributed unmodified; the video-stream protocol and control channel were implemented independently from its public sources
  • QtScrcpy (Apache-2.0) — reference for product interaction; no code copied
  • Android SDK Platform-Tools (Google) — vendor/platform-tools/ is redistributed unmodified, as a runtime dependency only
  • Long-screenshot stitching was inspired by SnowShot (frame capture + motion estimation + incremental stitching + confidence-based frame rejection); implemented in pure JS without OpenCV

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.