1# Unpacking Tool 2 3 4The unpacking tool is a commissioning tool provided by OpenHarmony. It can split a HAP file into folders or split an App Pack into HAP files in command line mode. 5 6 7The **app_unpacking_tool.jar** package can be found in the OpenHarmony SDK downloaded locally. 8 9 10- Unpacking a HAP File 11 12 ```bash 13 java -jar app_unpacking_tool.jar --mode <option> --hap-path <option> --out-path <option> --force <option> 14 ``` 15 16 The table below describes the command parameters. 17 18 | Name| Mandatory| Description| 19 | -------- | -------- | -------- | 20 | --mode | Yes| Unpacking mode. In this scenario, set this parameter to **hap**.| 21 | --hap-path | Yes| Path of the HAP file.| 22 | --rpcid | No| Whether to extract the rpcid file from the HAP file to a specified directory. If the value is **true**, only the rpcid file is extracted and the HAP file is not unpacked.| 23 | --out-path | Yes| Path of the target file.| 24 | --force | No| The default value is **false**. If the value is **true**, an existing target file will be forcibly deleted during unpacking.| 25 26- Unpacking an App Pack 27 28 ```bash 29 java -jar app_unpacking_tool.jar --mode <option> --app-path <option> --out-path <option> --force <option> 30 ``` 31 32 The table below describes the command parameters. 33 34 | Name| Mandatory| Description| 35 | -------- | -------- | -------- | 36 | --mode | Yes| Unpacking mode. In this scenario, set this parameter to **hap**.| 37 | --app-path | Yes| Path of the App Pack.| 38 | --out-path | Yes| Path of the target file.| 39 | --force | No| The default value is **false**. If the value is **true**, an existing target file will be forcibly deleted during unpacking.| 40 41- Extracting the rpcid File from a HAP file 42 43 ```bash 44 java -jar app_unpacking_tool.jar --mode <option> --rpcid <option> --hap-path <option> --out-path <option> --force <option> 45 ``` 46 47 The table below describes the command parameters. 48 49 | Name| Mandatory| Description| 50 | -------- | -------- | -------- | 51 | --mode | Yes| Unpacking mode. In this scenario, set this parameter to **hap**.| 52 | --rpcid | No| Whether to extract the rpcid file from the HAP file to a specified directory. If the value is **true**, only the rpcid file is extracted and the HAP file is not unpacked.| 53 | --out-path | Yes| Path of the target file.| 54 | --hap-path | Yes| Path of the HAP file.| 55