# hdc command guide: connect, install apps and debug OpenHarmony devices > hdc (OpenHarmony Device Connector) is the command-line tool for connecting to and debugging OpenHarmony and HarmonyOS devices. Common commands for devices, apps, files, logs and ports. Source: https://ohosify.com/en/blog/hdc-command-guide Published: 2026-10-01 **Short answer:** hdc (OpenHarmony Device Connector) is the command-line tool for connecting to and debugging OpenHarmony and HarmonyOS devices or emulators. It does what adb does on Android: list devices, install apps, move files, open a shell and read logs. ## What is hdc? hdc has three parts: - **Client:** runs on your computer and executes the commands you type in a terminal or from an IDE. - **Server:** a background process on your computer that manages communication between the client and the device, including connection multiplexing and data transfer. - **Daemon:** runs on the device and handles requests from the client. ## Where do I get hdc? hdc is packaged in the SDK. DevEco Studio includes it in the SDK's `toolchains` directory (for example `.../sdk/default/openharmony/toolchains`). Add that directory to your `PATH` to run `hdc` from any terminal. The source code is in the [developtools_hdc repository](https://gitcode.com/openharmony/developtools_hdc). Check that it works: ``` hdc -v ``` ## What are the most useful hdc commands? ### Devices ``` hdc list targets # list connected devices hdc list targets -v # list with details (connection type, state) ``` ### Install and remove apps ``` hdc install path/to/app.hap # install a package hdc uninstall com.example.app # remove an app by bundle name ``` ### Transfer files ``` hdc file send # computer -> device hdc file recv # device -> computer ``` ### Shell and app management ``` hdc shell # interactive shell on the device hdc shell bm dump -a # list all installed bundles hdc shell bm dump -n # details of one bundle hdc shell aa start -a -b # start an ability hdc shell aa force-stop # force-stop an app ``` ### Logs ``` hdc hilog # stream device logs ``` ### Port forwarding ``` hdc fport tcp: tcp: # forward a computer port to the device hdc fport ls # list forward rules hdc rport tcp: tcp: # reverse forwarding (device -> computer) ``` ### Server control ``` hdc kill # stop the hdc server hdc start -r # restart the server ``` ## Why does hdc not show my device? 1. Make sure developer mode and USB debugging are enabled on the device, and use a data-capable USB cable. 2. Run `hdc list targets`. An empty result means that no device is connected or authorized. 3. Restart the server with `hdc kill` and then `hdc start -r`. 4. Check that only one version of hdc is on your `PATH`, because several SDKs installed on one machine can cause version conflicts. 5. Reconnect the device and run `hdc list targets` again. ## Next steps - [Your first ArkTS app](/en/blog/first-arkts-app) - [How to install DevEco Studio](/en/blog/install-deveco-studio) - Official hdc documentation: [HUAWEI Developers](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/hdc)