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.

Note: You can skip this part if you followed the procedure from Environment Setup and Configuration tutorial.

Use conditional filtering, such as selecting the project as openharmony, selecting the target branch OpenHarmony-4.1-Release, selecting a date from the previous month, or manually choosing a range.

In the daily build or rolling build, find ohos-sdk-full_4.1-Release, and click on the download link to choose and download the full package, which includes Full-SDK for Windows and Linux. (If daily build SDK is not compatible with your version of DevEco Studio, try to use rolling build SDK instead)

  1. Under toolchain folder, find hdc.exe and libusb_shared.ddl.
  1. Create a folder called hdc_bin, you can create it wherever you like and put hdc.exe and libusb_shared into that folder.
  1. Add Environment Variable
    • Open Settings on Windows system, type environment to search Edit the system environment variables and click it.
  • Make sure the System Properties window is under Advanced tab, click Environment Variables...
  • Double click Path in System variables area. Click New on new pop-up window and paste your hdc_bin folder path.
    After that, click OK for all windows.
  • Check whether the HDC is running properly You can open your Command prompt and type hdc to check.

Use real machine to run application with USB

  1. Connect the development board(Here I used HiHope HH-SCDAYU200 Development Kit) running the OpenHarmony standard system to the computer and you can find the running device on the top part of the IDE.
  1. Generate signature.
    • Click Project Structure... icon on the top-right corner of the IDE, Choose Project > Signing Configs and select Automatically generate signature.
    • Click Apply and wait until the automatic signing is complete.
  • You can find signed signature in configuration folder and open build-profile.json5 file.
  1. Click Run 'entry' triangle button.
  1. You can observe the application running on the board.

You learned about DevEco Studio and built your first Eclipse Oniro Application, congratulations!