Windows-only DSH sidebar preview and Dart hot reload for configured Starcompanion / Operit2-derived projects; requires the project preview scripts, a prebuilt debug APK, Android SDK, Flutter and scrcpy 3.3.3.
Install
# from a prebuilt release tarball
dsh plugin --profile web add -w "https://github.com/skyjjgw/dsh-plugin-android-preview/releases/download/v0.1.2/dsh-plugin-android-preview-0.1.2.tgz"
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:skyjjgw/dsh-plugin-android-preview
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
简体中文 · Configuration and migration
Operate a real Android emulator in a native DSH right sidebar: touch, scroll, type and navigate. Flutter debug APKs additionally support hot reload when Dart source changes. Configure your own APK, application ID, launch activity and source directories; standalone apps and monorepos work without Starcompanion / Operit2 or mandatory PowerShell scripts.
Requirements and installation
- Node.js 22.19.0+, DSH 0.2.1-rc.2+ retaining the public sidebar, renderer and connection APIs.
- Windows, macOS or Linux with Android SDK, a running emulator and an external official scrcpy 3.3.3 server.
- An existing compatible APK. Flutter hot reload needs a debug APK matching the current source and Flutter SDK.
- No SDK downloads, emulator startup or APK builds are performed by default. Physical phones are not supported; rotated-screen control is not verified.
Desktop users can enter this source in their application's plugin installer:
github:skyjjgw/dsh-plugin-android-preview#v0.2.0
For a separate CLI Web profile:
dsh plugin --profile web add github:skyjjgw/dsh-plugin-android-preview#v0.2.0
The package includes readable JavaScript and a dsh.bundle.patch, with no build or install lifecycle script. It is not published on npm. Desktop and CLI profiles are separate; configure the existing android-preview row rather than inserting a duplicate or replacing your profile.
Flutter configuration
The following is the row's config object, not a full profile. Replace every path, ID and emulator serial with your actual values:
projectRoot: /home/me/projects/my-counter
appDirectory: .
apkPath: build/app/outputs/flutter-apk/app-debug.apk
applicationId: com.example.my_counter
activity: .MainActivity
flutterRoot: /opt/flutter
adbPath: /home/me/Android/Sdk/platform-tools/adb
scrcpyServer: /home/me/tools/scrcpy-server
serial: emulator-5556
hotReload: true
watchDirectories:
- lib
port: 18772
frameAncestors:
- dsh-app://app
On Windows use native absolute paths such as E:/projects/my-counter, E:/SDK/flutter and E:/Android/Sdk/platform-tools/adb.exe. On macOS use paths such as /Users/me/projects/my-counter. The Dart executable is selected for the host OS. An empty flutterRoot uses FLUTTER_ROOT.
For monorepos, set appDirectory: apps/mobile and watchDirectories: [lib, ../../packages/widgets/lib]. Source directories must stay inside projectRoot. apkPath can also be absolute.
Other Android apps
Set hotReload: false for an existing Kotlin, Java, React Native or other Android APK, and configure its actual apkPath, applicationId and activity. A Gradle debug APK might be at app/build/outputs/apk/debug/app-debug.apk. This mode installs, launches and mirrors the APK without a Flutter SDK or Dart watcher; it does not implement JavaScript/native hot reload. Rebuild changed APKs yourself, then use restart-app.
Use and lifecycle
Start the configured emulator first, then open a chat and the phone-preview sidebar tab. Opening the tab installs and launches your APK; Flutter mode attaches its debugger afterward. Use mouse/touch, wheel, keyboard or explicit paste to operate the phone. Saving watched .dart files requests hot reload. The toolbar supports reload, video refresh and app restart; reload is disabled in plain Android mode.
Disabling the plugin closes its listener, sockets, watchers and owned Flutter process, retaining the emulator. Keep only one Flutter attachment per emulator. Native code, permissions and dependency changes require a new debug APK. renderer: auto preserves the app's renderer; gpu or software explicitly selects a Flutter fallback.
Execution boundaries
No project scripts execute by default. Optional prepareExecutable (absolute path) and prepareArgs launch a trusted owner-configured program directly, without a shell. Its stdout must be a JSON environment object; see the hook contract and migration guide.
Enabling a configured plugin starts an idle HTTP service on 127.0.0.1. Opening the tab runs ADB/scrcpy, optional preparation and optional Flutter. WebSockets require local Host, exact Origin and a random same-origin session token. The discovery route uses the host connection layer's owner-Peer check. Frames allow dsh-app://app and explicitly configured loopback HTTP origins, never wildcards or external origins.
There are no model tools, microphone/audio, video recording, system clipboard reading or arbitrary shell/file HTTP APIs. Explicit typing/paste writes the Android clipboard; automatic clipboard synchronization is disabled. Child processes inherit the host environment. These checks are not an OS sandbox.
Development
npm run check
npm test
npm pack --dry-run
Tests cover Windows/macOS/Linux path and launch selection, generic APK/Flutter startup, optional preparation, cancellation, loopback controls, protocol handling and disposal. CI runs on all three platforms. See the verification scope for actual emulator testing. React and the optional SDK peer come from the host. Licensing and origins: NOTICE.md, LICENSE.
Links
More in this category
yjh051108/dsh-routing-suite★ 7031
One repository, three parts: a runtime injector for DSH plugin packages (inject, hot-reload, unload, promote a dev staging tool to the front, route self-heal, plus a settings-page plugin manager that lists, unloads and drags folders in to internalize), a task-aware reasoning-mode router agent preset (router-standard / router-spec / router-react), and a graded two-level task protocol whose six tools (commit_star, lock_stage, revise_do, edit_plan, mark_task, redteam_verdict) pin task state to disk. The injector implementation ships in-tree, so the install carries its own behaviour rather than a dependency list.
strukto-ai/mirage#dsh★ 3963
Swaps the filesystem and bash providers for a mirage virtual workspace: file tools and shell commands run over mounted resources (RAM, S3, Redis, Slack, Gmail, Notion, Postgres) instead of the host disk, with per-mount read/write/exec modes, per-command sandbox routing (monty, pyodide, quickjs in process; docker, e2b, daytona remote), and installed CLIs (git, gh, slack, linear, ntn, gws, or one you register) as head words in the virtual terminal.
first-fluke/oh-my-agent#dsh★ 1496
Runs project OMA checks before and after tool execution and when a turn tries to finish. Installs its OMA CLI dependency and initializes unconfigured projects on first use. Requires Node.js 22+; initial setup needs network access and project write access.
MichengAI/dsh-skills-manager★ 641
Manages local DeepSeek Harness skills in Settings and shows shared Agent skills as read-only.
hust-open-atom-club/oh-dsh★ 327
Community distribution: TUI, desktop, and Web UI as one bundle with layered installation.
Fishquito7/dsh-skill-mcp-panel★ 294
Manages DSH skills and MCP servers from the web settings: skill cards with hot enable/disable, workspace scopes, groups, batch migration and drag-and-drop import, plus stdio/HTTP MCP CRUD with connection tests, secret redaction and the unified dsh-panel CLI.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.