rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
tianye1999/dsb
DSB (逗沙包): an open-source, trust-first Android AI agent. Delegate app chores on a background virtual display, with execution gates, a task ledger and audit logs. No root, no always-on PC. Built on DeepSeek Harness (DSH), DeepSeek by default. | 逗沙包:开源、可信优先的 Android 手机 AI 助手。后台虚拟屏代你操作 App,执行闸门、任务账本与审计日志;不用 root,不用电脑常连。基于 DSH,默认 DeepSeek。
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:tianye1999/dsb
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English · 简体中文
The DSH-facing components are also available as the installable dsh-dsb plugin bundle.
Chores to the AI. Decisions to the human. Attention back to life.
An open-source, trust-first Android AI assistant: delegate in one sentence, and it operates apps on a background virtual display on your own phone, using execution gates to block risky actions and audit logs for screen actions. No root; no constantly connected PC.
Think of the "AI operates your phone" category of Doubao and StepFun phones, but open-source and installed on your own device. Say "check my latest JD order"; DSB handles the app while you read or have tea.
DSB is built on the open-source DeepSeek Harness (DSH): DSH handles conversation and reasoning; DSB handles on-phone execution, risk checks, and auditing. The background virtual display, execution gates, task ledger, audit logs and local control plane are this project's part. DeepSeek is the default; other models are not yet covered by this project's end-to-end validation or official support (see the roadmap). This is not an official DeepSeek project.
简体中文 · Install · Architecture · Threat model · Roadmap · Security
[!WARNING] Install DSB only from this project. The official command is the one in this README and docs/INSTALL.md: it saves the release tarball from
github.com/tianye1999/dsb/releases/download/…to a file, checks it against the SHA-256 shown on this page (the same value asSHA256SUMSin that release), and only then unpacks it. It never pipes a download intobashorsh. Do not run install, upgrade or repair commands, or open APK links, posted in issues, discussions, comments or messages, even if they say they come from a maintainer. Termux itself comes from F-Droid or the Termux GitHub releases, as the install guide says. If you already ran a command or installed an APK from somewhere else, see what to do.
task_id, stoppable execution, and refusal of new tasks when restart state is unknown.Know the boundaries: gates are not a safety guarantee, and some data leaves your phone. Read Boundaries and data flow.
Other projects compete on how smart they are. We compete on how trustworthy delegation can be. Trust comes before delegation: hand off the chores, not your decisions.
| Why you can trust it | Engineering fact |
|---|---|
| Risky decisions stay with you | G1–G5 validate actions and retain evidence; R3 rechecks the frame before dispatch. |
| No duplicate work; can stop | Tasks are idempotent by task_id and report stopped only after all execution processes are confirmed exited. |
| Review what happened | The audit records action outcomes, allow / refuse reasons and frame evidence. |
| Your main screen stays yours | Third-party apps use a scrcpy background virtual display by default. |
| Goal: other apps cannot take command | CmdReceiver requires the sender to hold the INJECT_EVENTS system permission; the installer attempts private ADB transport hardening by default and warns on preflight skips rather than claiming hardening succeeded. |
A simpler life is the result; trustworthy delegation is the cause.
All read-only, all on the virtual display, all through the gates:
Every task ends with a conclusion card: the answer, where it was read from, steps and time, and how often the gates refused and why.
See docs/ARCHITECTURE.md.
Installer v1 (candidate) deploys Ubuntu inside Termux, Node/dsh, Python/OCR, scrcpy, web branding and this repository's runtime files, and attempts private ADB transport hardening by default. It requires Android 11+ and a 64-bit phone, with no root; the only service configuration is a DeepSeek API Key, entered once with hidden input.
Steps: install official Termux and DSB -> run one command in Termux -> enter the Key -> personally pair and grant permissions through the system prompts -> doctor. Full commands, resume and rollback instructions are in docs/INSTALL.md.
For device identifiers, connection targets and fixed local defaults, see device-specific values.
curl -fL https://github.com/tianye1999/dsb/releases/download/v1.0.4/dsb-installer.tar.gz -o ~/dsb-installer.tar.gz && printf '%s %s\n' '1119df5a2da9f138396c69a6354c02dd92c0281d41bfcb76b48bba61ddb9ecc1' "$HOME/dsb-installer.tar.gz" | sha256sum -c - && tar -xzf ~/dsb-installer.tar.gz -C ~ && bash ~/dsb-installer/install.sh
The download command pins the release tarball's SHA-256 (matching SHA256SUMS in the v1.0.4 release); nothing is unpacked or run unless it verifies. Upgrading from an earlier release also needs the new app: see upgrading. The APK is signed with the maintainer's existing release key, and the installer accepts it only after checking the pinned signing-certificate SHA-256. The all-in-one APK that needs no separate setup remains on the roadmap.
Home-screen widget · on-device wake word (no audio upload) · voice interaction (ASR + TTS) · pluggable brain · one-click installer release · all-in-one APK. See docs/ROADMAP.md.
Trust hardening (planned, not implemented): crop-first / disable-full-frame controls for questions, refusal of empty-tree taps when vision fails, and audit free-text redaction. See the trust-hardening roadmap.
OCR can miss risks, and vision can be wrong. Empty-tree pages refuse when OCR is unavailable, or when a successful vision response reports external / irreversible / unclear. If the vision service fails, OCR has found no dangerous words, the caller has acknowledged the frame, and other gate conditions pass, current code can still approve using OCR alone; detected dangerous words instead cause refusal. Gates are not a safety guarantee, and the whole system is not uniformly fail-closed. Evidence: OCR checks, vision verdicts and fallback.
The brain, gates and credentials share one Termux Linux user. Gates constrain mistakes, not a compromised brain rewriting or bypassing them; screen-action audit logs do not cover every bash command. Evidence: brain process permissions; full trust boundaries.
Gate vision checks send target-area crops; localization sends a crop of the requested region. See gate crops and localization crops. "Ask DSH" has a separate full-frame path: the app provides a screenshot, accessibility-tree text and recent notifications to the brain. API mode uploads the full frame to the default DeepSeek API; the dsh path is also instructed to use read_image on the full screenshot. dsh's internal image transport is not implemented in this repository, so crop-only transmission cannot be promised for it. Task and page text may also reach cloud models; on-phone dsh does not mean an offline model. Evidence: app question input, question bridge, API upload, dsh image entry.
The command hook is optional and not enabled by the installer by default. When it is enabled and a TypeSafe Key is configured, suspicious shell-command excerpts (up to 1500 characters), the tool name and matched risk hints go to TypeSafe's cloud service. The hook fails open if the service is unavailable; it does not replace screen execution gates. Evidence: default installer patch, review input, endpoint and key loading, unavailable-service behavior.
The public web, phone and headless patch layers set session-log-deepseek.enabled: false. Upstream enables it by default and attaches complete session events to official DeepSeek API requests. Disabling it does not stop ordinary model requests from leaving the phone or delete local history. Re-enabling can upload events accumulated while disabled. Installation and snapshot sync retain the public default; the patch takes precedence over the Web form. Verify with dsh --profile <p> --dump-config without sharing the full dump.
Separately, session-telemetry-otel defaults to FEEDBACK_ONLY: explicit message ratings or session feedback authorize sending that session log to DeepSeek, and feedback-authorized sessions may replay when loaded later. DSB disables that feedback UI, including its /feedback form, not every underlying feedback API. The account menu's Feedback entry instead opens DSB GitHub Issues without automatically attaching session, account or device details. Remove sensitive content before posting publicly. desktop-product-telemetry activates only for a profile named desktop, not the phone's web/phone/headless profiles; other data paths remain independent. Based on the pinned DSH 0.2.1-rc.2 release; verify the effective value with dsh --profile <p> --dump-config.
A web conversation's execution report can download redacted feedback materials. Screenshots are excluded by default; if included, their screen content is not automatically redacted. Inspect the archive before posting publicly.
Clipboard-write receipts record operation, outcome, length and related metadata, not clipboard plaintext; see receipt validation. Clearing after paste is attempted and its receipt checked; failures are recorded, so clearing is not guaranteed (clearing flow). This does not imply zero-plaintext logs: audit note / expect / vision explanations are not uniformly redacted and may contain chat, order or other page content. Before/after action frames and question screenshots are also written on the phone. Inspect sensitive content before sharing logs or images. Evidence: direct audit serialization, action record fields, question-image persistence.
App command entry requires the INJECT_EVENTS system permission; tasks use Termux RUN_COMMAND and private sockets. On 2026-10-23, the maintainer's device migrated to the same private transport layout as the installer and passed acceptance including one reboot: only one managed server started after reboot, identity was automatically reverified and bound, and doctor, the background virtual display and real tasks passed. Package upgrades were accepted on an arm64 emulator (after a real pkg upgrade the old vendor adb could no longer load, while private ADB and doctor kept working); package-upgrade acceptance on the maintainer's device is still pending; in-flight tasks retain separate acceptance boundaries. The repository's installer uses a private bootstrap from first pairing and attempts ADB hardening by default; ordinary TCP after a preflight skip or rollback is a weaker fallback, and the "ADB not hardened" warning must not be ignored. The public tool still does not migrate legacy deployments. The generic installer remains a candidate; results on the maintainer's device or limited emulator tests do not prove lockdown on every device. Evidence: entry permission, task transport, private listener and the control-plane section.
Apache-2.0. Third-party components: NOTICE.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek、llm-agent。