Skip to content

Running the Application on a Real Device

Install HDC

  1. Find the pipeline whose name is ohos-sdk-full or ohos-sdk-public, click Download Link, and select Full Package.
    Use conditional filtering: select project openharmony, branch OpenHarmony-5.1.0-Release, and a date from the previous month or a manual range.
    Then find ohos-sdk-full_5.1.0-Release, and download the full package (Windows/Linux).
    (If daily build SDK is not compatible with your DevEco Studio, try the rolling build SDK.) Download SDK

  2. Under the toolchain folder, locate hdc.exe and libusb_shared.ddl.
    Toolchain

  3. Create a folder called hdc_bin, and copy hdc.exe and libusb_shared.dll into it.
    hdc_bin

  4. Add Environment Variable to your system:

  5. Open Settings on Windows → search for Edit the system environment variables. Env Settings
  6. In the Advanced tab, click Environment Variables.... Env Dialog
  7. Edit Path under System variables, click New, and paste your hdc_bin path. Path Config
  8. Open Command Prompt and run hdc to verify installation. HDC Check

Run the application on watch

Note

We are using Huawei Watch 5 in this tutorial.

  1. Make sure you watch connects the same network with your PC.

  2. Check the IP address on your watch and click ToolsIP Connection on the navbar.

Note

To find IP address on your watch, you need to enable Developer Option first. (Go to SettingsHUAWEI WATCH 5, find Software Version and continuously click 5 times)

Put the watch IP address into the following field, you can find the device at the top of DevEco Studio after clicking the green start buttion: Device Device

  1. Generate signature:
  2. Click Project Structure...Project > Signing Configs → check Automatically generate signature.
  3. Click Apply and wait until signature is generated. Signature Settings
  4. You will find it in the configuration folder under build-profile.json5.
    Signature File

  5. Click the Run 'entry' triangle button in the IDE.
    Run App

  6. Your application will now run on the development board.
    App Running


🎉 You’ve successfully installed HDC and deployed your first watch application using DevEco Studio!