The core architecture of DeepSeek Harness (DSH) is plugin-based. To extend the agent development workflow to mobile devices, platform-specific providers are required. For HarmonyOS devices, this plugin provides a solution connected via hdc, addressing screen viewing, tapping/swiping, key presses, text input, and screen access for the AI.
Positioning¶
This package is the HarmonyOS platform provider for DSH. It is solely responsible for “how to connect to this device, how to interact with it, and how to obtain the screen image,” while the UI, AI tools, and focus logic reside in dsh-scrcpy-core.
Core Features¶
- Connection method: Connect to the device via
hdc(USB debugging orhdc tconnwireless connection). - Basic interaction: Supports screen mirroring, touch, key presses, and text input.
- Process management: Each device corresponds to one Java process (Sidecar), started by this package to manage the video stream and controls.
- Multi-device support: Supports simultaneous screen mirroring on multiple devices; Android and HarmonyOS can coexist without conflicts.
- Huawei retail devices: Supports Huawei retail devices without requiring root, modifying system partitions, or an allowlist.
- Screen rotation support: After rotating the screen, the video automatically follows without requiring reconnection.
- Resource control: Supports pause/resume with low resource usage.
- Quality adjustment: Supports scaling and frame-rate adjustment.
- AI tools: Tools such as screenshot recognition, control list, tap/long press/key press/text input are in the core package and act on the currently focused device.
Installation and Activation¶
This package depends on dsh-scrcpy-core. DSH must be completely exited and reopened for the package to take effect.
- Open DSH’s plugin panel.
- Install
@nszzj/dsh-scrcpy-core(includes the UI and AI tools). - Install
@nszzj/dsh-hos-scrcpy(HarmonyOS provider). - Completely exit DSH and restart it.
Typical Usage¶
- Device preparation: Enable Developer Mode + USB Debugging on the device (or use
hdc tconnto connect). - Confirm connection: Run
hdc list targetsin a terminal and confirm that the device is visible. - Screen mirroring operation: The device appears in the DSH menu. Click Screen Mirror on that row.
- Multi-device switching: A corresponding device tab appears in the right panel. With multiple devices, clicking a row switches to its tab.
- Quality adjustment: Adjust scaling and frame rate in Connection Settings.
- AI operations: AI tools act on the currently focused device (the device visible in the panel).
Environment Requirements¶
- DSH: Desktop DeepSeek Harness (Windows / macOS / Linux).
- Java 8+: Runtime environment for the sidecar.
- hdc: Toolchain bundled with DevEco Studio.
- HarmonyOS device: Connected.
Notes¶
- Dependency:
@nszzj/dsh-scrcpy-coremust be installed; otherwise, this package will not activate. - Restart required: Changes to the host half-zone only take effect after a restart; after installation, completely exit DSH.
- Configuration limitation: Scaling/framerate cannot be changed mid-connection; disconnect and reconnect to apply changes.
- Logging: Device log streams (hilog) are not captured. The Logs item in the panel is the plugin diagnostic log.
- API limitation: In SDK 1.0.18,
requestIDRFrame()is an empty method. - Retail devices: Retail devices use the system-service path.