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:
- DSH → Settings → Plugins → Add plugin
- 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 - Install (DSH's bundled pnpm handles dependencies and registration)
- 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>): rundsh plugin --profile <my profile> add "link:<absolute path>"(ifdshis not on PATH, use<DSH install dir>\resources\runtime\cli\bin\dsh.cmd), then runnode scripts/doctor.mjsand 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 swipetriggers 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-serveris 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
Links
More in this category
Tencent/WeKnora#dsh-weknora★ 38705
Four read-only tools over a WeKnora knowledge base: list knowledge bases, hybrid passage search, reassemble one document's chunks in order, and WeKnora's own cited RAG or ReAct-agent answer with a resumable session id.
DayuanJiang/next-ai-draw-io#dsh-plugin★ 37321
Draws draw.io diagrams in DeepSeek Harness through the next-ai-drawio MCP server: the link in the reply opens a live preview in the right sidebar, you can edit the diagram by hand, and each AI change is a version you can restore. Node.js 18+; npx downloads the MCP server on first use.
yikart/AiToEarn#dsh-plugin-aitoearn★ 28986
Generate copy, images and short videos, and publish with one click to Douyin, Kuaishou, Xiaohongshu, WeChat Official, Bilibili, Facebook, TikTok and more, covering the full content lifecycle from creation to publishing and monetization.
superdesigndev/treg★ 10137
Tool catalog for agents: search ~2,600 external endpoints (SEO and SERP, backlinks, social, people and company enrichment, ad libraries, scraping) by the task you want done, read each one's parameters and per-call price, then call it with the credential injected server-side. Ships the skill plus an MCP row that stays disabled until TREG_TOKEN is set.
T-Auto/dsh-ops★ 6125
Provides bash, PowerShell 7, and high-performance Rust tools for DSH on Windows to reduce token usage.
Hithink-Tech-Org/Financial-API#hithink-finance★ 4781
Query Hithink Finance data in DeepSeek Harness, view charts in chat, and save refreshable dashboards.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.