Skip to content

1na-ko/dsh-hdc-bridge

71Last commit Aug 14, 2026

dsh-hdc-bridge DSH plugin

dsh-hdc-bridge provides a full hdc device debugging loop directly in DSH: list targets, connect, shell, screenshot, install, UI dump and operate, crash capture, and more. It also includes an offline official knowledge layer (Tier-1 bundled docs) and optional integration with DevEco CLI for building, signing, and linting.

How to install the dsh-hdc-bridge DSH plugin

dsh plugin --profile <name> add dsh-hdc-bridge

This source command needs manual review. Copying does not run it.

dsh-hdc-bridge DSH plugin data source

dsh-hdc-bridge DSH plugin snapshot date: Aug 16, 2026

discovered

What the dsh-hdc-bridge DSH plugin can do

  • Device management: list, connect, shell, screenshot, install, uninstall, app lifecycle control
  • UI automation: dump layout tree, find controls by text, tap, swipe, input, key events
  • Crash capture: fetch recent jscrash/cppcrash/appfreeze logs with structured summary
  • Offline official knowledge: 23 high-frequency API modules bundled as Tier-1, no network required
  • SDK-accurate API knowledge: read local .d.ts files with @since/@deprecated version info
  • Official DevEco CLI build, sign, run, lint, and compatibility check (optional backend)

Where the dsh-hdc-bridge DSH plugin fits

  • Debugging HarmonyOS apps on device or emulator through a conversational UI in DSH
  • Automating UI testing: observe → operate → verify loop with screenshot and text dump
  • Quickly checking device information, logs, and crash reports without leaving the chat
  • Building and signing HAP packages using official DevEco CLI, with fallback to local hvigorw
  • Searching offline official documentation for API usage and version changes

Who the dsh-hdc-bridge DSH plugin is for

  • HarmonyOS app developers who use DSH as their development environment
  • QA engineers performing automated UI testing on HarmonyOS devices

dsh-hdc-bridge DSH plugin limitations

  • Screenshot format is JPEG only (API 10+ snapshot_display limitation)
  • Real device installation requires UDID-bound signing profile; otherwise error 9568332
  • hdc client may return exit code 0 on remote failure; plugin uses output markers and checksum fallback
  • UI input with mixed character types may lose the first character after mode switch; workaround provided
  • DevEco CLI features require DevEco Studio ≥ 6.1.0 (macOS/Windows, Node ≥ 18) and a one-time `devecocli auth login`

dsh-hdc-bridge DSH plugin: from the repository README

Quoted from the 1na-ko/dsh-hdc-bridge README, the upstream source of the dsh-hdc-bridge DSH plugin. Copyright remains with the original authors.

> DSH 原生鸿蒙开发助手:`hdc` 设备闭环调试(看设备 → 截图 → 看图 → 改码 → 装包 → 验证)+ 官方优先版本化知识层(离线 Tier-1 随包 + SDK 机读 + 官方文档检索)+ 可选官方 DevEco CLI 构建/签名通道。 > A DSH-native HarmonyOS dev assistant: the hdc device loop (inspect → screenshot → view → fix → install → verify), an official-first version-classified knowledge layer (offline Tier-1 bundled + SDK-accurate reads + official docs search), and an optional official DevEco CLI build/sign backend. ## 定位 [hdc_mcp](https://github.com/yushun667/hdc_mcp) 等 MCP 服务器已覆盖 hdc 能力层。本插件不重写 hdc 协议,直接复用本机 hdc 二进制(3.x),价值在 DSH 原生层: - 会话内工具卡片与 `read_image` 原生闭环 - 按调用会话解析沙箱策略(与 `pwsh` 工具同款路线),截图写入 `<workspace>/.dsh-hdc/screenshots/` - 结构化的失败上报(hdc 传输层退出码不可靠,插件用输出标记 + 落盘校验兜底) ## 工具 | 工具 | 说明 | | --- | --- | | `hdc_list_targets` | 列出已连接设备/模拟器(空列表 + 连接指引) | | `hdc_connect` | `hdc tconn`(严格 host:port 校验) | | `hdc_shell` | 设备 shell(param get / ps / uitest dumpLayout…) | | `hdc_screenshot` | 截图 → 拉取 JPEG → 落盘校验(API 10+ 的 snapshot_display 仅支持 .jpeg) | | `hdc_install` | 安装 .hap(默认 -r;输出标记级失败检测) | | `hdc_hilog` | hilog 尾部 N 行(可选域名 `-T` 过滤,如 PARAM) | | `hdc_ui_dump` | 文本化 UI 快照:uitest 布局树 → 可见文本节点(纯文本模型的「文字截图」) | | `hdc_ui_find` | 按文本/hint 找控件:返回 bounds 与中心坐标,配合 tap 免手算坐标 | | `hdc_

Read the full READMERepository license: MIT

dsh-hdc-bridge DSH plugin questions

How do I install dsh-hdc-bridge?

Run `dsh plugin --profile <name> add dsh-hdc-bridge` in your terminal. If you prefer a direct GitHub install, use `dsh plugin --profile <name> add github:1na-ko/dsh-hdc-bridge`. After adding, verify the layer appears with `dsh --profile <name> --dump-config` and then start DSH.

What are the environment requirements for this plugin?

You need a HarmonyOS device or emulator with developer mode and USB debugging enabled. The plugin auto-detects the hdc binary from DevEco Studio SDK paths or PATH. For screenshot viewing, an image input model is required; text-only models can use `hdc_ui_dump` instead. Optional DevEco CLI features require DevEco Studio ≥ 6.1.0 (macOS/Windows, Node ≥ 18) and a one-time `devecocli auth login`.

Where do screenshots get saved?

Screenshots are saved to `<workspace>/.dsh-hdc/screenshots/` by default. The plugin creates this directory automatically. It is recommended to add this path to your project's `.gitignore` to avoid committing screenshots.

I get error 9568332 when installing an app. What should I do?

Error 9568332 means the signing profile is not bound to the device UDID. You need to register the device UDID in your AppGallery Connect project and re-sign the HAP with a profile that includes the UDID. This is a standard HarmonyOS signing requirement, not a plugin issue.

Can I use the knowledge layer offline?

Yes, the `hms_knowledge` tool provides offline access to 23 high-frequency API modules from the official OpenHarmony documentation (CC-BY-4.0). It is bundled with the plugin (~1.2MB) and requires no network, SDK, or CLI. Use `hms_knowledge catalog` to browse topics, then `hms_knowledge read <section>` to view content.