Connect a HarmonyOS Test Device with HDC
Treat the connection as a separate test from model inference. Huawei’s HarmonyOS Device Connector (HDC) can identify a supported device. Open-AutoGLM needs its HDC adapter, a supported screen and a compatible model configuration before it can attempt a task.

Verify the USB connection
- Get HDC from the HarmonyOS SDK or command-line tools and make sure your shell can run it.
- On a test phone, enable developer mode and USB debugging for your software build. Use a cable that carries data. Accept the debugging prompt on the device if one appears.
- Run
hdc list targets. For connection status and transport details, runhdc list targets -v. On a connected USB target, identify the row for your test device. When several devices are present, copy its exact target ID for any later command.
| Symptom | What to check next |
|---|---|
Shell cannot find hdc | Open the SDK toolchains folder and check the executable path before changing phone settings. |
| List is empty | Recheck the cable, USB mode, developer options and any host-driver requirements in Huawei’s guide. |
| Target is offline or unauthorized | Check the on-device approval prompt. Disconnect and reconnect, then read the status again. |
| HDC sees the phone but the agent cannot | Check the selected device type and target ID, then check model connectivity separately. |
Hand the verified target to the agent
Check the USB layer
Run the SDK’s HDC tool and confirm the handset appears in the target list.
Choose the device type
Point the runner at HDC and record the target when several devices are attached.
Check the service separately
If the target is visible but the task cannot run, verify the model endpoint.
The Open-AutoGLM README has separate Android and HarmonyOS steps. Check python main.py --help in your installed revision. The documented HDC example sets --device-type hdc and uses --device-id to select a target. Use the exact ID reported by HDC and the model ID and URL from your chosen provider. The upstream project uses native input methods for HarmonyOS and places ADB Keyboard in the Android instructions.
From the installed project, run python main.py --device-type hdc --list-apps to list the HarmonyOS app entries defined by the project. Check those against the apps and versions available on your test device.
For a first agent check, choose an app you have confirmed is supported on your device. Give one read-only instruction and check the resulting screen manually. Verify screen capture, input, the application and the inference endpoint separately after HDC connects. This setup checklist draws on Huawei’s documentation and the upstream project. Continue with Open-AutoGLM and Midscene on the same HarmonyOS phone, the cross-system comparison or the 中文 HDC 指南.