running-on-the-device-9.md 1.6 KB
Newer Older
M
mamingshuai 已提交
1 2 3 4 5 6 7 8 9 10 11 12
# Running on the Device<a name="EN-US_TOPIC_0000001115258034"></a>

Before you install the app and run it on the development board, install the DevEco Device Tool by following operations provided in  [HUAWEI DevEco Device Tool User Guide](https://device.harmonyos.com/en/docs/ide/user-guides/tool_install-0000001050164976). Burn OpenHarmony into the development board, and run it on the board. For details about how to build, burn, and run an image, see  [Getting Started with Hi3516](../quick-start/how-to-develop-12.md). After the image is running normally and the system is started properly, perform the following steps to install or uninstall the app:

1.  Obtain the HDC client from the following path:

    ```
    developtools/hdc_standard/prebuilt/windows/hdc_std.exe
    ```

    Change the HDC client name to  **hdc.exe**  and add the path above to the system environment variable  **path**.

N
NEEN 已提交
13
2.  Open the  **cmd**  window, and run the following commands to push the HAP file to the device directory, and install it:
M
mamingshuai 已提交
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35

    ```
    hdc smode
    hdc target mount
    hdc file send clock.hap /data/clock.hap
    hdc shell chmod 666 /data/clock.hap
    hdc shell bm install -p /data/clock.hap
    ```

3.  Run the following command to start the app.  **ohos.samples.clock**  indicates the app package name, and  **MainAbility**  indicates the ability started by the app.

    ```
    hdc shell aa start -d 123 -a ohos.samples.clock.MainAbility -b ohos.samples.clock
    ```

4.  \(Optional\) Run the following command to uninstall the app.  **ohos.samples.clock**  indicates the app package name.

    ```
    hdc shell bm uninstall -n ohos.samples.clock
    ```