Live Android device pane next to your DSH conversation: scrcpy-server H.264 streaming (WebCodecs, 30-60 fps), agent tap/swipe/text with auto-screenshot verification, uiautomator element tree with tap coordinates, host-managed recording + logcat debug sessions. FLAG_SECURE pages are detected automatically with a mitigation chain and a tappable text-view fallback. Emulators and USB real phones, human+agent co-operation, session-isolated, loopback-only.
Install
# from a prebuilt release tarball
dsh plugin --profile web add "https://github.com/hoyyang/dsh-android-pane/releases/download/v0.1.0/dsh-external-dsh-android-pane-0.1.0.tgz"
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:hoyyang/dsh-android-pane
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
A live Android device pane next to your DeepSeek Harness (DSH) conversation: emulators and USB real phones alike. The agent drives the device and verifies its own changes with screenshots plus a structured UI tree — and you can jump in and co-operate at any time.
Install
dsh plugin add github:hoyyang/dsh-android-pane
Zero configuration: no API keys, no DSH config edits. Requires adb on PATH (Android SDK), a device with USB debugging (or any emulator); macOS/Linux and the DSH web profile.
Why it's useful
- Live stream: scrcpy-server H.264 straight into the DSH web UI, decoded via WebCodecs (30–60 fps on loopback); automatic fallback to screenshot polling when scrcpy can't run (old devices, hardened security builds).
- The agent verifies itself: 10 context-economical tools — tap/swipe/text/key/scroll/rotate (auto-screenshot after every action), uiautomator element tree with tap coordinates, mp4 recording, host-managed debug sessions (recording + logcat + action timeline).
- FLAG_SECURE self-recovery: banking/password apps are detected automatically; a banner plus a mitigation chain (
adb root→ root-framework guidance → final SECURE-flag re-check), degrading to a tappable text view of the element tree when pixels stay system-blocked — every step reported, never silent. - Human + agent on one screen: tap = tap, drag = swipe in the pane; a red badge shows when the agent is driving (panel gestures are temporarily rejected).
- Session isolation: one device belongs to one session at a time; idle sessions release devices after 10 minutes (emulators shut down, phones detach).
- Local-only: all streams accept 127.0.0.1 peers only (everything else gets 403); panel mutations are same-origin checked.
30-second start
- Connect a phone with USB debugging (or start any emulator);
- Tell the agent "connect my Android device";
- The live device pane appears in the DSH web UI;
- Say "tap the Settings icon" — watch it act, screenshot returned each step;
- Tap and drag the pane yourself anytime — human and agent share the screen.
Advanced
- Chinese input:
android_pane_install_ime(one-time ADBKeyboard IME setup; Chinese text goes through clipboard paste). - Element-level ops:
android_pane_uifind/click/setText — fuzzy text matching instead of blind coordinates. - Secure-page detection switch: config
flagSecureCheck(default true). - Vendor-customized Android: input injection requires "USB debugging (Security settings)"; otherwise the pane degrades to view-only.
How it works
On attach, scrcpy-server is pushed to the device and runs H.264 encoding via app_process; the stream reaches the local loopback through adb port forwarding and is rendered in the browser with WebCodecs. Injection commands go over adb; the element tree comes from uiautomator dump. Debug mode is host-managed: segmented mp4 recording + full logcat + a structured action timeline for per-action replay.
Reliability
Delivered through the dsh-plugin-build pipeline: isolated staging verification, uninstall/reinstall idempotence, cold-boot triple-fault static checks, and a ten-gate review; tested on emulators and multiple real phones (H.264 streaming, injection, Chinese input, FLAG_SECURE degradation chain, multi-device concurrency). Self-healing styles (v0.1.1): header button / pane styles recover within milliseconds if removed or invalidated externally, and hot-reloaded style updates apply without a full page refresh.
FAQ
- Black screen? Usually a FLAG_SECURE page (banking/password managers) — the pane shows a banner with a mitigation chain; on normal pages, check
adb devicesfirst. - Taps do nothing? Vendor-customized Android needs "USB debugging (Security settings)".
- Low fps? Concurrent devices share the bandwidth; detach the ones you don't need.
Build from source
git clone https://github.com/hoyyang/dsh-android-pane && cd dsh-android-pane
npm install && npm run build && npm run build:client
Uninstall
dsh plugin remove @dsh-external/dsh-android-pane
Removal stops all streams and reclaims adb child processes; state lives under <DSH_HOME>/dsh-android-pane/ (screenshots, state.json) and can be deleted freely.
Privacy
Screenshots the agent takes of the device are sent to the configured model. Don't sign in to real accounts on a device under agent control.
License
MIT — see LICENSE. Bundled scrcpy-server (Apache-2.0) and ADBKeyboard.apk (Apache-2.0) are covered in THIRD_PARTY_NOTICES.md.
Links
More in this category
DayuanJiang/next-ai-draw-io#dsh-plugin★ 36548
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.
Tencent/WeKnora#dsh-weknora★ 36201
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.
superdesigndev/treg★ 6962
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★ 5011
Provides bash, PowerShell 7, and high-performance Rust tools for DSH on Windows to reduce token usage.
sixtysevenlf/dsh-blender-plugin★ 1536
Lets a DSH agent drive a local Blender over a direct TCP channel with 15 tools: viewport frames, custom-angle renders, Python execution, headless and job offload, transaction rollback, and a planning layer of 228 ops across 34 families.
TencentCloudBase/CloudBase-AI-Toolkit#dsh-plugin★ 1153
Tencent CloudBase backend for DeepSeek Harness — scaffold and deploy full-stack apps from chat, render query results as table cards with paging, sorting and CSV export, preview a deployment on its domain, and call the CloudBase MCP toolset (`mcp__cloudbase__*`) with device-code login.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.