1# Bundle Manager 2 3Bundle Manager (bm) is a tool for installing, uninstalling, updating, and querying bundles. It provides basic capabilities for debugging application installation packages. 4 5## Environment Setup 6 7Before using this tool, you must obtain <!--Del-->[<!--DelEnd-->hdc<!--Del-->](../../device-dev/subsystems/subsys-toolchain-hdc-guide.md)<!--DelEnd--> and run the hdc shell command. 8 9 10## bm Commands 11 12| Name| Description| 13| -------- | -------- | 14| help | Displays the commands supported by the bm tool.| 15| install | Installs a bundle.| 16| uninstall | Uninstalls a bundle.| 17| dump | Displays bundle information.| 18| clean | Clears the cache and data of a bundle. This command is available in the root version. It is also available in the user version with developer mode enabled. It is unavailable in other cases.| 19| <!--DelRow-->enable | Enables a bundle. A bundle can be used after being enabled. This command is available in the root version but not in the user version.| 20| <!--DelRow-->disable | Disables a bundle. A bundle cannot be used after being disabled. This command is available in the root version but not in the user version.| 21| get | Obtains the UDID of a device.| 22| quickfix | Performs patch-related operations, such as installing or querying a patch.| 23| compile | Executes the AOT compilation on a bundle.| 24| copy-ap | Copies the .ap file of a bundle to the **/data/local/pgo** directory for the shell user to read the file.| 25| dump-dependencies | Displays the information about the modules on which the bundle depends.| 26| dump-shared | Displays the HSP information of a bundle.| 27| dump-overlay | Displays **overlayModuleInfo** of an overlay bundle.| 28| dump-target-overlay | Displays **overlayModuleInfo** of all overlay bundles associated with a target bundle.| 29 30 31## help 32 33```bash 34# Display the help information. 35bm help 36``` 37 38 39## install 40 41```bash 42bm install [-h] [-p filePath] [-r] [-w waitingTime] [-s hspDirPath] 43``` 44 45 **Parameters of the install command** 46 47 48| Parameter| Description| 49| -------- | -------- | 50| -h | Displays help information.| 51| -p | Installs an HAP with other HAPs in the specified path. This parameter is mandatory. | 52| -r | Installs an HAP in overwrite mode. This parameter is optional. By default, the HAP is installed in overwrite mode.| 53| -s | Installs an HSP. Each directory can have only one HSP with the same bundle name. This parameter is mandatory only for the HSP installation.| 54| -w | Waits for a specified time before installing a HAP. The minimum waiting time is 5s, and the maximum waiting time is 600s. The default waiting time is 5s. This parameter is optional.| 55 56 57Example 58```bash 59# Install an HAP. 60bm install -p /data/app/ohos.app.hap 61# Install an HAP in overwrite mode. 62bm install -p /data/app/ohos.app.hap -r 63# Install an HSP. 64bm install -s xxx.hsp 65# Install a HAP and its dependent HSP. 66bm install -p aaa.hap -s xxx.hsp yyy.hsp 67# Install an HAP. The waiting time is 10s. 68bm install -p /data/app/ohos.app.hap -w 10 69``` 70 71## uninstall 72 73```bash 74bm uninstall [-h] [-n bundleName] [-m moduleName] [-k] [-s] [-v versionCode] 75``` 76 77 **Parameters of the uninstall command** 78 79| Parameter| Description| 80| -------- | -------- | 81| -h | Displays help information.| 82| -n | Uninstalls a bundle. This parameter is mandatory.| 83| -m | Uninstalls a module. This parameter is optional. By default, all modules are uninstalled.| 84| -k | Uninstalls a bundle with or without retaining the bundle data. This parameter is optional. By default, the bundle data is deleted along the uninstall.| 85| -s | Uninstalls an HSP. This parameter is mandatory only for the HSP installation.| 86| -v | Uninstalls an HSP of a given version number. This parameter is optional. By default, all shared bundles with the specified bundle name are uninstalled.| 87 88 89Example 90 91```bash 92# Uninstall a bundle. 93bm uninstall -n com.ohos.app 94# Uninstall a module of a bundle. 95bm uninstall -n com.ohos.app -m com.ohos.app.EntryAbility 96# Uninstall a shared bundle. 97bm uninstall -n com.ohos.example -s 98# Uninstall a shared bundle of the specified version. 99bm uninstall -n com.ohos.example -s -v 100001 100# Uninstall a bundle and retain user data. 101bm uninstall -n com.ohos.app -k 102``` 103 104 105## dump 106 107```bash 108bm dump [-h] [-a] [-n bundleName] [-s shortcutInfo] [-d deviceId] 109``` 110 111 **Parameters of the dump command** 112 113| Parameter| Description| 114| -------- | -------- | 115| -h | Displays help information.| 116| -a | Displays all bundles installed in the system. This parameter is optional.| 117| -n | Displays the details of a bundle. This parameter is optional.| 118| -s | Displays the shortcut information of a bundle. This parameter is optional.| 119| -d | Displays the bundle information on a given device, which is the current device by default. This parameter is optional. | 120 121 122Example 123 124```bash 125# Display the names of all bundles installed in the system. 126bm dump -a 127# Display the details of a bundle. 128bm dump -n com.ohos.app 129# Display the shortcut information of a bundle. 130bm dump -s -n com.ohos.app 131# Display cross-device bundle information. 132bm dump -n com.ohos.app -d xxxxx 133``` 134 135## clean 136 137```bash 138bm clean [-h] [-c] [-n bundleName] [-d] [-i appIndex] 139``` 140**Parameters of the clean command** 141 142| Parameter| Description| 143| -------- | --------- | 144| -h | Displays help information.| 145| -c -n | **-n** is mandatory, and **-c** is optional. Clears the cache data of a specified bundle.| 146| -d -n | **-n** is mandatory, and **-d** is optional. Clears the data directory of a specified bundle.| 147| -i | Clears the data directory of an application clone. This parameter is optional. The default value is 0.| 148 149 150Example 151 152```bash 153# Clear the cache data of a bundle. 154bm clean -c -n com.ohos.app 155# Clear the user data of a bundle. 156bm clean -d -n com.ohos.app 157// Execution result 158clean bundle data files successfully. 159``` 160 161<!--Del--> 162## enable 163 164```bash 165bm enable [-h] [-n bundleName] [-a abilityName] 166``` 167 168 169 **Parameters of the enable command** 170 171| Parameter| Description| 172| -------- | -------- | 173| -h | Displays help information.| 174| -n | Enables a specified bundle. This parameter is mandatory.| 175| -a | Enables an ability with a specified bundle name. This parameter is optional.| 176 177 178Example 179 180```bash 181# Enable a bundle. 182bm enable -n com.ohos.app -a com.ohos.app.EntryAbility 183// Execution result 184enable bundle successfully. 185``` 186 187 188## disable 189 190```bash 191bm disable [-h] [-n bundleName] [-a abilityName] 192``` 193 194 195 **Parameters of the disable command** 196 197| Parameter| Description| 198| -------- | -------- | 199| -h | Displays help information.| 200| -n | Disables a specified bundle. This parameter is mandatory.| 201| -a | Disables an ability with a specified bundle name. This parameter is optional.| 202 203 204Example 205 206```bash 207# Disable a bundle. 208bm disable -n com.ohos.app -a com.ohos.app.EntryAbility 209// Execution result 210disable bundle successfully. 211``` 212<!--DelEnd--> 213 214 215## get 216 217```bash 218bm get [-h] [-u] 219``` 220 221 **Parameters of the get command** 222 223| Parameter| Description| 224| -------- | -------- | 225| -h |Displays help information.| 226| -u | Obtains the UDID of a device. This parameter is mandatory.| 227 228 229Example 230 231```bash 232# Obtain the UDID of a device. 233bm get -u 234// Execution result 235udid of current device is: 23623CADE0C 237``` 238 239 240## quickfix 241 242```bash 243bm quickfix [-h] [-a -f filePath [-t targetPath] [-d]] [-q -b bundleName] [-r -b bundleName] 244``` 245 246Note: For details about how to create an .hqf file, see [HQF Packing Command](packing-tool.md#hqf-packing-command). 247 248 **Parameters of the quickfix command** 249| Parameter | Description| 250| -------- | -------- | 251| -h | Displays help information.| 252| -a -f | **-a** is optional, and **-f** is mandatory when **-a** is specified. Executes the quick fix patch installation command. **file-path** corresponds to an .hqf file. You can pass in one or more .hqf files or the directory where the .hqf file is located.| 253| -q -b | **-q** is optional, and **-b** is mandatory when **-q** is specified. Displays the patch information based on the bundle name.| 254| -r -b | **-r** is optional, and **-b** is mandatory when **-r** is specified. Uninstalls a disabled patch based on the bundle name.| 255| -t | Fixes a bundle to a specified path. This parameter is optional.| 256| -d | Selects the debug mode for quick fix. This parameter is optional.| 257 258 259 260Example 261 262```bash 263# Display patch package information by the bundle name. 264bm quickfix -q -b com.ohos.app 265// Execution result 266// Information as follows: 267// ApplicationQuickFixInfo: 268// bundle name: com.ohos.app 269// bundle version code: xxx 270// bundle version name: xxx 271// patch version code: x 272// patch version name: 273// cpu abi: 274// native library path: 275// type: 276# Install a quick fix patch. 277bm quickfix -a -f /data/app/ 278// Execution result 279apply quickfix succeed. 280# Uninstall a quick fix patch. 281bm quickfix -r -b com.ohos.app 282// Execution result 283delete quick fix successfully 284``` 285 286## dump-shared 287 288```bash 289bm dump-shared [-h] [-a] [-n bundleName] [-m moduleName] 290``` 291 292 **Parameters of the dump-shared command** 293 294| Parameter| Description| 295| -------- | -------- | 296| -h | Displays help information.| 297| -a | Displays all HSPs in the system. This parameter is optional.| 298| -n | Displays detailed information about the shared library with a specified bundle name. This parameter is optional.| 299| -m | Displays detailed information about the shared library with a specified bundle name and module name. This parameter is optional.| 300 301 302Example 303 304```bash 305# Display the bundle names of all shared libraries installed in the system. 306bm dump-shared -a 307# Display the details about the specified shared library. 308bm dump-shared -n com.ohos.lib 309# Display information about the shared library on which a specified module of a bundle depends. 310bm dump-dependencies -n com.ohos.app -m entry 311``` 312 313## dump-dependencies 314 315Displays information about the shared library on which a specified module of a bundle depends. 316```bash 317bm dump-dependencies [-h] [-n bundleName] [-m moduleName] 318``` 319 320**Parameters of the dump-dependencies command** 321| Parameter| Description| 322| -------- | -------- | 323| -h | Displays help information.| 324| -n | Displays details about the bundle name of a shared library. This parameter is mandatory.| 325| -m | Displays information about the shared library on which a specified module of a bundle depends. This parameter is optional.| 326 327Example 328```Bash 329# Display information about the shared library on which a specified module of a bundle depends. 330bm dump-dependencies -n com.ohos.app -m entry 331``` 332 333 334## compile 335 336Execute the AOT compilation on a bundle. 337```bash 338bm compile [-h] [-m mode] [-r bundleName] 339``` 340**Parameters of the compile command** 341 342| Parameter| Description| 343| -------- | -------- | 344| -h | Displays help information.| 345| -a | Compiles all bundles. This parameter is optional.| 346| -m | Compiles a bundle based on the bundle name. The value can be **partial** or **full**. This parameter is optional.| 347| -r | Checks whether a bundle is removed. This parameter is optional.| 348 349Example 350 351```bash 352# Compile a bundle based on the bundle name. 353bm compile -m partial com.example.myapplication 354``` 355 356## copy-ap 357 358Copies an .ap file to the **/data/local/pgo** directory of a specified bundle. 359 360```bash 361bm copy-ap [-h] [-a] [-n bundleName] 362``` 363 364**Parameters of the copy-ap command** 365 366| Parameter| Description| 367| -------- | -------- | 368| -h | Displays help information.| 369| -a | Copies the .ap files related to all bundles. By default, .ap files related to all bundles are copied. This parameter is optional.| 370| -n | Copies the .ap file related to a specified bundle, which is the current bundle by default. This parameter is optional.| 371 372Example 373 374```bash 375# Copy the .ap file related to a specified bundle. 376bm copy-ap -n com.example.myapplication 377``` 378 379## dump-overlay 380 381Displays **overlayModuleInfo** of an overlay bundle. 382```bash 383bm dump-overlay [-h] [-b bundleName] [-m moduleName] [-t targetModuleName] 384``` 385 386**Parameters of the dump-overlay command** 387| Parameter| Description| 388| -------- | -------- | 389| -h | Displays help information.| 390| -b | Displays all **OverlayModuleInfo** about a specified bundle. This parameter is mandatory.| 391| -m | By default, the name of the main module of the current bundle is used. This parameter is optional. Displays **OverlayModuleInfo** about a specified overlay bundle based on the bundle name and module name.| 392| -t | Displays **OverlayModuleInfo** based on a specified bundle name and target module name. This parameter is optional.| 393 394Example 395 396```bash 397# Display OverlayModuleInfo of an overlay bundle named com.ohos.app. 398bm dump-overlay -b com.ohos.app 399 400# Display OverlayModuleInfo of the overlay module named entry in an overlay bundle named com.ohos.app. 401bm dump-overlay -b com.ohos.app -m entry 402 403# Display OverlayModuleInfo of the overlay module named feature in an overlay bundle named com.ohos.app. 404bm dump-overlay -b com.ohos.app -m feature 405``` 406 407## dump-target-overlay 408 409Displays **overlayModuleInfo** of all overlay bundles associated with a target bundle. 410 411```bash 412bm dump-target-overlay [-h] [-b bundleName] [-m moduleName] 413``` 414 415**Parameters of the dump-target-overlay command** 416| Parameter| Description| 417| -------- | -------- | 418| -h | Displays help information.| 419| -b | Displays all **OverlayBundleInfo** about a specified bundle. This parameter is mandatory.| 420| -m | Displays **OverlayModuleInfo** based on a specified bundle name and module name. By default, **OverlayBundleInfo** of the main module of the current bundle is displayed. This parameter is optional.| 421 422Example 423 424```bash 425# Display OverlayBundleInfo of an overlay bundle named com.ohos.app. 426bm dump-target-overlay-b com.ohos.app 427 428# Display OverlayModuleInfo of the overlay module named entry in an overlay bundle named com.ohos.app. 429bm dump-target-overlay -b com.ohos.app -m entry 430``` 431 432## Error Codes 433 434### 9568320 The Signature File Does Not Exist 435**Error Message** 436 437Failed to install bundle, no signature file. 438 439 440 441**Symptom** 442 443A user attempts to install an unsigned HAP file. 444 445**Possible Causes** 446 447The HAP file is not signed. 448 449**Solution** 450 4511. Use [automatic signing](https://developer.huawei.com/consumer/en/doc/harmonyos-guides-V13/ide-signing-V13#section18815157237) to sign the HAP file. after the device is connected. 4522. Manually sign the HAP file. For details, see [Signing Your App/Atomic Service Manually](https://developer.huawei.com/consumer/en/doc/harmonyos-guides-V13/ide-signing-V13#section297715173233). 453<br></br> 454 455### 9568347 The Local .so File Fails to Be Parsed 456**Error Message** 457 458Error: install parse native so failed. 459 460**Symptom** 461 462When you start debugging or running a C++ app/service, the error message "error: install parse native so failed" is displayed during HAP installation. 463 464**Possible Causes** 465 466The Application Binary Interface (ABI) supported by the device does not match that configured in the C++ project. 467 468> **NOTE** 469> 470> - If the project has a dependent HSP or HAR module, make sure that one of the ABI types configured for all modules that contain C++ code is supported by the device. 471> - If the project depends on a third-party library that includes .so files, make sure the appropriate ABI directory for your device, such as **arm64-v8a** or **x86_64**, is present in the **oh_modules/*third-party-library*/libs** directory. 472<!--RP1--><!--RP1End--> 473 474**Solution** 475 4761. Connect the device to DevEco Studio. 4772. Open the CLI and go to the **toolchains** directory in the SDK installation directory. 478 ``` 479 To check the OpenHarmony SDK installation directory, choose **File** > **Settings** > **SDK**. 480 ``` 4813. Run the following command to obtain the list of ABI types supported by the device, which include one or more of the following: default, armeabi-v7a, armeabi, arm64-v8a, x86, and x86_64. 482 ``` 483 hdc shell 484 param get const.product.cpu.abilist 485 ``` 4864. Based on the obtained list, modify the **abiFilters** settings in the [module-level build-profile.json5](https://developer.huawei.com/consumer/en/doc/harmonyos-guides-V13/ide-hvigor-compilation-options-customizing-sample-V13#section4322212200) file. The rules are as follows: 487 * If the list includes only **default**, run the following command to check whether the **lib64** folder exists: 488 ``` 489 cd /system/ 490 ls 491 ``` 492  493 * If the **lib64** folder exists, add the arm64-v8a type to **abiFilters**. 494 * If the **lib64** folder does not exist, add armeabi, armeabi-v7a, or both types to **abiFilters**. 495 * If the list includes one or more of the following, add at least one of them to **abiFilters**: armeabi-v7a, armeabi, arm64-v8a, x86, and x86_64. 496<br></br> 497 498 499### 9568344 The Configuration File Fails to Be Parsed 500**Error Message** 501 502Error: install parse profile prop check error. 503 504 505 506**Symptom** 507 508When you start debugging or run an application, the error message "error: install parse profile prop check error" is displayed during the installation of the HAP. 509 510**Possible Causes** 511 5121. The **bundleName** in [app.json5 configuration file](../quick-start/app-configuration-file.md#tags-in-the-configuration-file) and the **name** in [module.json5 configuration file](../quick-start/module-configuration-file.md#tags-in-the-configuration-file) are invalid. 513 514<!--Del--> 5152. The **type** field in [extensionAbilities](../quick-start/module-configuration-file.md#extensionabilities) is set to **service** or **dataShare**. 516<!--DelEnd--> 517 518 519**Solution** 5201. Change the **bundleName** field in the **app.json5 configuration** file and the **name** field in the **module.json5 configuration** file based on the naming rules. 521<!--Del--> 5222. If the **type** field in **extensionAbilities** is set to **service** or **dataShare**, configure the [allowAppUsePrivilegeExtension privilege](../../device-dev/subsystems/subsys-app-privilege-config-guide.md) for the application as follows: 523 5241. Obtain the new signature fingerprint. 525 526 a. Obtain the storage path of the signature file, which is the value of **profile** in the **signingConfigs** field in the **project-level build-profile.json5** file. 527 528 b. Open the signature file (with the file name extension .p7b), search for **development-certificate** in the file, copy **-----BEGIN CERTIFICATE-----**, **-----END CERTIFICATE-----**, and the information between them to a new text file, delete the newline characters, and save the file as a new .cer file. 529 530 The format of the new .cer file is shown below. (The file content is an example.) 531 532  533 534 c. Use the keytool (available in the **jbr/bin** folder of the DevEco Studio installation directory) to obtain the SHA-256 value of the certificate fingerprint from the .cer file: 535 ``` 536 keytool -printcert -file xxx.cer 537 ``` 538 d. Remove the colon (:\) from the SHA-256 content in the certificate fingerprint. What you get is the signature fingerprint. 539 540 An example SHA-256 value is shown below. 541  542 543 The signature fingerprint obtained by removing the colon is 5753DDBC1A8EF88A62058A9FC4B6AFAFC1C5D8D1A1B86FB3532739B625F8F3DB. 544 5452. Obtain the **install_list_capability.json** file of the device. 546 547 a. Connect the device and enter the shell. 548 ``` 549 hdc shell 550 ``` 551 b. Run the following command to view the **install_list_capability.json** file of the device: 552 ``` 553 // Obtain the path of the install list. 554 find /system -name install_list_capability.json 555 ``` 556 c. Run the following command to obtain the **install_list_capability.json** file: 557 ``` 558 hdc target mount 559 hdc file recv /system/etc/app/install_list_capability.json 560 ``` 561 5623. Add the signature fingerprint obtained to **app_signature** in the **install_list_capability.json** file. Note that the signature fingerprint must be configured under the corresponding bundle name. 563 5644. Push the modified **install_list_capability.json** file to the device and restart the device. 565 566 ``` 567 hdc target mount 568 hdc file send install_list_capability.json /system/etc/app/install_list_capability.json 569 hdc shell chmod 644 /system/etc/app/install_list_capability.json 570 hdc shell reboot 571 ``` 5725. Reinstall the application.<!--DelEnd--> 573 574 575### 9568305 The Dependent Module Does Not Exist 576**Error Message** 577 578Error: dependent module does not exist. 579 580 581 582**Symptom** 583 584When you start debugging or run an application, the error message "error: dependent module does not exist" is displayed during the installation of the HAP. 585 586**Possible Causes** 587 588The SharedLibrary module on which the application depends is not installed. 589 590**Solution** 591 5921. Install the dependent SharedLibrary module. On the **Run/Debug Configurations** page of DevEco Studio, select **Keep Application Data** on the **General** tab page, and click **OK** to save the configuration. Then run or debug the application again. 593 5942. On the **Run/Debug Configurations** page of DevEco Studio, click the **Deploy Multi Hap** tab, select **Deploy Multi Hap Packages**, select the dependent module SharedLibrary, and click **OK** to save the configuration. Then run or debug the application again. 595 5963. Choose **Run** > **Edit Configurations**. On the **General** tab page, select **Auto Dependencies**. Click **OK** to save the configuration, and then run or debug the project. 597 598 599### 9568259 Some Fields Are Missing in the Configuration File 600**Error Message** 601 602Error: install parse profile missing prop. 603 604 605 606**Symptom** 607 608When you start debugging or run an application, the error message "error: install parse profile missing prop" is displayed during the installation of the HAP. 609 610**Possible Causes** 611 612Mandatory fields are missing in the **app.json5** and **module.json5** files. 613 614**Solution** 615 616* 1. Check and add mandatory fields by referring to the [app.json5 file](../quick-start/app-configuration-file.md) and [module.json5 file](../quick-start/module-configuration-file.md). 617* 2. Determine the missing fields based on the HiLog. 618 619 Run the following command to enable disk flushing: 620 ``` 621 hilog -w start 622 ``` 623 624 Disk location: **/data/log/hilog** 625 626 Open the log file and find **profile prop %{public}s is mission**. For example, **profile prop icon is mission** indicates that the **icon** field is missing. 627 628 629### 9568258 The Release Types of the New Application and Existing Application Are Different 630**Error Message** 631 632Error: install releaseType target not same. 633 634 635 636**Symptom** 637 638When you start debugging or run an application, the error message "error: install releaseType target not same" is displayed during the installation of the HAP. 639 640**Possible Causes** 641 642* Scenario 1: The value of **releaseType** in the SDK used by the existing HAP is different from that used by the new HAP. 643* Scenario 2: When the application has multiple HAPs, the **releaseType** values in the SDK used by each HAP are different. 644 645**Solution** 646 647* Scenario 1: Uninstall the existing HAP on the device and then install a new HAP. 648* Scenario 2: Use the same SDK to repackage the HAPs to ensure that the **releaseType** values of multiple HAPs are the same. 649 650 651### 9568322 The Signature Verification Fails Because the Application Source Is Untrusted 652**Error Message** 653 654Error: signature verification failed due to not trusted app source. 655 656 657 658**Symptom** 659 660When you start debugging or run an application, the error message "error: signature verification failed due to not trusted app source" is displayed during the installation of the HAP. 661 662**Possible Causes** 663 664* Scenario 1: The signature does not contain the UDID of the debugging device. 665 666* Scenario 2: The [release certificate and release profile](https://developer.huawei.com/consumer/en/doc/app/agc-help-releaseharmony-0000001933963166) is used during signature. However, an application signed by a release certificate cannot be debugged or run. 667 668**Solution** 669 670* Scenario 1: 671 1. Use [automatic signing](https://developer.huawei.com/consumer/en/doc/harmonyos-guides-V13/ide-signing-V13#section18815157237) to sign the HAP file. after the device is connected. 672 2. If manual signature is used, add the UDID of the device to the **UnsgnedDebugProfileTemplate.json** file. For details, see <!--RP2-->[hapsigner Guide](https://gitee.com/openharmony/docs/blob/master/en/application-dev/security/hapsigntool-guidelines.md)<!--RP2End-->. 673 674 1. Obtain the UDID of the device. 675 676 ``` 677 // Command for obtaining the UDID 678 hdc shell bm get -u 679 ``` 680 681 2. Go to the DevEco Studio installation path and open the **UnsgnedDebugProfileTemplate.json** configuration file in the SDK directory. 682 683 ``` 684 DevEco Studio installation path\sdk\version number or default\openharmony\toolchains\lib\ 685 686 Example: xxxx\Huawei\DevEco Studio\sdk\HarmonyOS-NEXT-DB1\openharmony\toolchains\lib\ 687 Example: xxxx\Huawei\DevEco Studio\sdk\default\openharmony\toolchains\lib\ 688 ``` 689 690 3. Add the UDID of the device to the **device-ids** field in the **UnsgnedDebugProfileTemplate.json** file. 691 692* Scenario 2: Use the [debug certificate and debug profile](https://developer.huawei.com/consumer/en/doc/app/agc-help-debug-app-0000001914423098) to re-sign the application. 693 694 695### 9568289 The Installation Fails Because the Permission Request Fails 696**Error Message** 697 698Error: install failed due to grant request permissions failed. 699 700 701 702**Symptom** 703 704When you start debugging or run an application, the error message "error: install failed due to grant request permissions failed" is displayed during the installation of the HAP. 705 706**Possible Causes** 707 708The application uses the default Ability Privilege Level (APL), which is normal, and requires the system_basic or system_core permission. 709 710**Solution** 711 7121. Go to the DevEco Studio installation path and open the **UnsgnedDebugProfileTemplate.json** configuration file in the SDK directory. 713``` 714DevEco Studio installation path\sdk\version number or default\openharmony\toolchains\lib\ 715 716Example: xxxx\Huawei\DevEco Studio\sdk\HarmonyOS-NEXT-DB1\openharmony\toolchains\lib\ 717Example: xxxx\Huawei\DevEco Studio\sdk\default\openharmony\toolchains\lib\ 718``` 7192. In the **UnsgnedDebugProfileTemplate.json** file, change the APL level to **system_core** and re-sign the package. 720 721### 9568297 The Installation Fails Because the SDK Version of the Device Is Too Early 722**Error Message** 723 724Error: install failed due to older sdk version in the device. 725 726 727 728**Symptom** 729 730When you start debugging or run an application, the error message "error: install failed due to older sdk version in the device" is displayed during the installation of the HAP. 731 732**Possible Causes** 733 734The SDK version used for build and packing does not match the device image version. 735 736**Solution** 737 738* Scenario 1: The device image version is earlier than the SDK version for build and packing. Update the device image version. Run the following command to query the device image version: 739 ``` 740 hdc shell param get const.ohos.apiversion 741 ``` 742 If the API version provided by the image is 10 and the SDK version used for application build is also 10, the possible cause is that the image version is too early to be compatible with the SDK verification rules of the new version. In this case, update the image version to the latest version. 743 744* Scenario 2: For applications that need to run on OpenHarmony devices, ensure that runtimeOS has been changed to OpenHarmony. 745 746### 9568332 The Installation Fails Due to Inconsistent Signatures 747**Error Message** 748 749Error: install sign info inconsistent. 750 751 752 753**Symptom** 754 755When you start debugging or run an application, the error message "error: install sign info inconsistent" is displayed during the installation of the HAP. 756 757**Possible Causes** 758 7591. The signatures of the existing application and new application are different, or the signatures of HAPs and HSPs are different. **Keep Application Data** is selected in **Edit Configurations** (the application installation is overwritten) and the application is re-signed. 7602. If an application is uninstalled but its data is kept, and a new application with the same bundle name is later installed, it is necessary to check whether the identity details match. If the signature information is inconsistent, this error is reported. 761 762 763**Solution** 764 7651. Uninstall the application, or deselect **Keep Application Data**. Then install the new application. 7662. If the signature inconsistency is caused by HSPs provided by different teams, use [integrated HSP](../quick-start/integrated-hsp.md). If there are multiple HAPs, ensure that their signatures are the same. 7673. If an application is uninstalled but its data is kept, a new application with the same bundle name but different signature information fails to be installed. To install the new application, you must first reinstall the uninstalled application and uninstall it without retaining the data. 768 769### 9568329 The Signature Information Fails to Be Verified 770**Error Message** 771 772Error: verify signature failed. 773 774 775 776**Symptom** 777 778The **bundleName** in the signature information is different from that of the application. 779 780**Possible Causes** 781 782* Scenario 1: An HSP module provided by a third party is imported, and the HSP is neither an [integrated HSP](../quick-start/integrated-hsp.md) nor an HSP with the same bundle name, causing the bundle name inconsistency. 783 784* Scenario 2: An incorrect signature file (with the file name extension .p7b) is used for signature, causing the bundle name inconsistency. 785 786 787**Solution** 788 789* Scenario 1: Use an HSP only for the application with the same bundle name; use an integrated HSP for applications with different bundle names. Ask the third party to provide an integrated HSP or an HSP with the same bundle name. 790 791* Scenario 2: Check the signing process and signing certificate. For details, see [Signing Your App/Atomic Service](https://developer.huawei.com/consumer/en/doc/harmonyos-guides-V13/ide-signing-V13). 792 793 794### 9568266 The Installation Permission Is Denied 795**Error Message** 796 797Error: install permission denied. 798 799 800 801**Symptom** 802 803When you run the **hdc install** command to install the HAP file, the error message "code:9568266 error: install permission denied" is displayed. 804 805**Possible Causes** 806 807The **hdc install** command cannot be used to install the enterprise application with a release signature. 808 809**Solution** 810 8111. Run the **hdc install** command to install and debug the enterprise application with a debug signature. 812 813 814### 9568337 The Installation Parsing Fails 815**Error Message** 816 817Error: install parse unexpected. 818 819**Symptom** 820 821When an application is pushed to a device, an error message is displayed, indicating that the HAP file fails to be opened. 822 823**Possible Causes** 824 825* Scenario 1: The storage space of the system partition is full. As a result, when you run the **hdc file send** command, files on the device are damaged due to insufficient storage space. 826 827* Scenario 2: The HAP file is damaged when it is pushed to the device. 828 829**Solution** 830 831* 1. Check the storage space allocated to the system partition. If the storage space is full, clear the storage space to install the HAP file. 832 ```bash 833 hdc shell df -h /system 834 ``` 835 836* 2. Check the MD5 values of the local HAP file and the HAP file pushed to the device. If they are different, the HAP is damaged during the push. In this case, push the file again. 837 838 839### 9568316 The Permission of APL in ProxyData Is Low 840**Error Message** 841 842Error: apl of required permission in proxy data is too low. 843 844**Symptom** 845 846**requiredReadPermission** and **requiredWritePermission** of the **proxyData** tag in the **module.json** file fail to be verified. 847 848**Possible Causes** 849 850**requiredReadPermission** and **requiredWritePermission** can be configured only when the application has the permission level of **system_basic** or **system_core**. 851 852**Solution** 853 8541. Check whether the **proxyData** content defined by the application meets the requirements. For details, see [proxyData](../quick-start/module-configuration-file.md#proxydata). 855 856 857### 9568315 The URI in Proxy Data Is Incorrect 858**Error Message** 859 860Error: uri in proxy data is wrong. 861 862**Symptom** 863 864**uri** of the **proxyData** tag in the **module.json** file fails to be verified. 865 866**Possible Causes** 867 868The format of **uri** does not meet the requirement. 869 870**Solution** 871 8721. Check whether the **proxyData** content defined by the application meets the requirements. For details, see [proxyData](../quick-start/module-configuration-file.md#proxydata). 873 874 875### 9568336 The Debugging Type of the Application Is Different From That of the Installed Application 876**Error Message** 877 878Error: install debug type not same. 879 880**Symptom** 881 882The debugging type (the **debug** field in the **app.json** file) of the application is different from that of the installed application. 883 884**Possible Causes** 885 886You have installed the application using the **Debug** button of DevEco Studio, and then you install the HAP file of the application by running the **hdc install** command. 887 888**Solution** 889 8901. Uninstall the existing application and install the new application. 891 892 893### 9568296 The Bundle Type Is Incorrect 894**Error Message** 895 896Error: install failed due to error bundle type. 897 898**Symptom** 899 900The installation fails because the **bundleType** tag is incorrect. 901 902**Possible Causes** 903 904The **bundleType** of the application to be installed is different from that of an existing application with the same **bundleName**. 905 906**Solution** 907 908* Method 1. Uninstall the existing application and install the application again. 909 910* Method 2: Set the **bundleType** of the application to the same as that of the existing application. 911 912 913### 9568292 The User With UserID 0 Can Install Only the Singleton Application 914**Error Message** 915 916Error: install failed due to zero user can only install singleton app. 917 918**Symptom** 919 920The user with **UserID 0** is only allowed to install the application with the **singleton** permission, and the application with the **singleton** permission is only allowed to be installed by the user with **UserID 0**. 921 922**Possible Causes** 923 924**UserID** is not set to **0** for the application with the **singleton** permission. 925 926**Solution** 927 9281. If the application has the **singleton** permission, set **UserID** to **0** during installation. 929 ``` 930 //Set the user ID to 0. 931 hdc install -p <HAP file name>.hap -u 0 932 ``` 933 934 935### 9568263 The Installation Version Cannot Be Downgraded 936**Error Message** 937 938Error: install version downgrade. 939 940**Symptom** 941 942The installation fails because **versionCode** of the application to be installed is earlier than that of the existing application. 943 944**Possible Causes** 945 946The **versionCode** of the application to be installed is earlier than that of the existing application. 947 948**Solution** 949 9501. Uninstall the existing application and install the new application. 951 952 953### 9568304 The Application Does Not Support the Current Device Type 954**Error Message** 955 956Error: device type is not supported. 957 958**Symptom** 959 960The installation fails because the application does not support the current device type. 961 962**Possible Causes** 963 964The application does not support the current device type. 965 966**Solution** 967 9681. To adapt to the current device, add the current device type to the value of **deviceTypes** of the application. The value of **deviceTypes** can be any of the following: phone, tablet, 2in1, tv, wearable, and car. 969 970 971### 9568317 The Multi-Process Configuration of the Application Does Not Match the System Configuration 972**Error Message** 973 974Error: isolationMode does not match the system. 975 976**Symptom** 977 978The installation fails because **isolationMode** of the application is not supported by the system. 979 980**Possible Causes** 981 982* 1. The device supports the isolation mode (the value of **persist.bms.supportIsolationMode** is **true**), whereas the value of **isolationMode** in the HAP is **nonisolationOnly**. 983 984* 2. The device does not support the isolation mode (the value of **persist.bms.supportIsolationMode** is **false**), whereas the value of **isolationMode** in the HAP is **isolationOnly**. 985 986**Solution** 987 9881. Set the value of **isolationMode** in the HAP configuration file based on the isolation mode of the device. 989 ``` 990 //Query the value of persist.bms.supportIsolationMode. If errNum is:106 is returned, persist.bms.supportIsolationMode is not configured. 991 hdc shell 992 param get persist.bms.supportIsolationMode 993 //Set persist.bms.supportIsolationMode. 994 hdc shell 995 param set persist.bms.supportIsolationMode [true|false] 996 ``` 997 998 999### 9568315 The URI Attribute of the Proxy Data Is Incorrect 1000**Error Message** 1001 1002Error: uri in proxy data is wrong. 1003 1004**Symptom** 1005 1006**uri** of the **proxyData** tag in the **module.json** file fails to be verified. 1007 1008**Possible Causes** 1009 1010The format of **uri** does not meet the requirement. 1011 1012**Solution** 1013 10141. Ensure that the URI meets the format requirements. 1015 ``` 1016 //URI format specifications. 1017 The URI of a data proxy must be unique and must be in the format of datashareproxy://bundleName/xxx. 1018 ``` 1019 1020 1021### 9568310 The Compatibility Policies Are Different 1022**Error Message** 1023 1024Error: compatible policy not same. 1025 1026**Symptom** 1027 1028The compatibility policy of the new bundle is different from that of the existing bundle. 1029 1030**Possible Causes** 1031 10321. The shared library to be installed has the same bundle name as the existing bundle. 10332. The bundle to be installed has the same bundle name as the existing shared library. 1034 1035**Solution** 1036 10371. Uninstall the installed bundle or shared library, and install the new bundle. 1038 1039 1040### 9568391 The Bundle Manager Service Is Stopped 1041**Error Message** 1042 1043Error: bundle manager service is died. 1044 1045**Symptom** 1046 1047The bundle manager service is stopped. 1048 1049**Possible Causes** 1050 1051An unknown system exception occurs. 1052 1053**Solution** 1054 10551. Restart the phone and try again. 1056 10572. If the installation still fails after the preceding steps are performed for three to five times, check whether a crash file containing **foundation** exists in the **/data/log/faultlog/faultlogger/** directory of the device. 1058``` 1059hdc shell 1060cd /data/log/faultlog/faultlogger/ 1061ls -ls 1062``` 10633. Export the crash file and log file and submit them to [online tickets](https://developer.huawei.com/consumer/en/support/feedback/#/) for help. 1064``` 1065hdc file recv /data/log/faultlog/faultlogger/ 1066hdc file recv /data/log/hilog/ 1067``` 1068 1069### 9568393 The Code Signature Fails to Be Verified 1070**Error Message** 1071 1072Error: verify code signature failed. 1073 1074**Symptom** 1075 1076The code signature fails to be verified. 1077 1078**Possible Causes** 1079 1080The bundle does not contain code signature information. 1081 1082**Solution** 1083 10841. Install the latest version of DevEco Studio and sign the code again. 1085 1086<!--RP3--><!--RP3End--> 1087 1088### 9568401 The Bundle to Debug Can Run Only on Devices in Developer Mode 1089**Error Message** 1090 1091Error: debug bundle can only be installed in developer mode. 1092 1093**Symptom** 1094 1095The bundle to debug can run only on devices in developer mode. 1096 1097**Possible Causes** 1098 1099Developer mode is not enabled on the device. 1100 1101**Solution** 1102 11031. Choose **Settings** > **System** and check whether **Developer options** is available. If not, go to **Settings** > **About** and touch the version number for seven consecutive times until the message "Enable developer mode?" is displayed. Touch **OK** and enter the PIN (if set). Then the device will automatically restart. 11042. Connect the device to the PC using a USB cable. Choose **Settings** > **System** > **Developer options** and enable USB debugging. In the displayed dialog box, touch **Allow**. 11053. Start debugging or run the application. 1106 1107### 9568386 The Bundle Cannot Be Found for Uninstallation 1108**Error Message** 1109 1110Error: uninstall missing installed bundle. 1111 1112**Symptom** 1113 1114The bundle cannot be found for uninstallation. 1115 1116**Possible Causes** 1117 1118The bundle to be uninstalled is not installed. 1119 1120**Solution** 1121 11221. Check whether the bundle to be uninstalled has been installed. 1123 1124### 9568388 Bundle Uninstall Is Not Allowed by Enterprise Device Management 1125**Error Message** 1126 1127Error: Failed to uninstall the HAP because the uninstall is forbidden by enterprise device management. 1128 1129**Symptom** 1130 1131The enterprise device management does not allow the uninstall of this bundle. 1132 1133**Possible Causes** 1134 1135The bundle is set not to be uninstalled. 1136 1137**Solution** 1138 11391. The enterprise device management cancels the uninstallation control of the bundle. 1140 1141### 9568284 The Installation Version Is Not Compatible 1142**Error Message** 1143 1144Error: install version not compatible. 1145 1146**Symptom** 1147 1148The installation version is not compatible. 1149 1150**Possible Causes** 1151 1152The version of the installed HSP does not match that of the installed HAP. 1153When an HSP is installed, the following information is verified: 11541. bundleName 11552. Version 11563. Signature 1157 1158**Solution** 1159 11601. Uninstall the HAP whose version does not match and then install the HSP. 11612. Change the HSP version to be the same as that of the HAP and install the HSP again. 1162 1163### 9568287 The Number of Entry Modules in the Installation Package Is Invalid 1164**Error Message** 1165 1166Error: install invalid number of entry HAP. 1167 1168**Symptom** 1169 1170The number of entry modules in the installation package is invalid. 1171 1172**Possible Causes** 1173 1174There are multiple entry modules in the installation package. An application can have only one entry module but multiple feature modules. 1175 1176**Solution** 1177 11781. Retain one entry module and change the other entry modules to feature modules (by modifying the **type** field in **module.json5**). 1179 1180 1181### 9568281 The vendor Field of the Installation Package Is Inconsistent 1182**Error Message** 1183 1184Error: install vendor not same. 1185 1186**Symptom** 1187 1188The **vendor** field of the installation package is inconsistent. 1189 1190**Possible Causes** 1191 1192The **vendor** field of the application in the **app.json5** file is inconsistent. 1193 1194**Solution** 1195 11961. If only a HAP is involved, the **vendor** field of the HAP must be the same as that of the installed application. In this case, uninstall and reinstall the HAP. 11972. If an integrated HSP is included, the **vendor** field of the integrated HSP must be the same as that of the HAP. 1198 1199 1200### 9568274 An Error Occurs During Service Installation 1201**Error Message** 1202 1203Error: install installd service error. 1204 1205**Symptom** 1206 1207An error occurs during service installation. 1208 1209**Possible Causes** 1210 1211An exception occurs during service installation. 1212 1213**Solution** 1214 12151. Clear the cache and restart the device. 1216 1217 1218### 9568314 The HSP Fails to Be Installed 1219**Error Message** 1220 1221Error: Failed to install the HSP because installing a shared bundle specified by hapFilePaths is not allowed. 1222 1223**Symptom** 1224 1225The HSP fails to be installed. 1226 1227**Possible Causes** 1228 1229The HSP is installed by running the **hdc app install \***\** command. 1230 1231**Solution** 1232 12331. Run the **hdc install -s \***\** command to install the HSP. 1234 1235 1236### 9568359 The SELinux Fails to be Installed and Set 1237**Error Message** 1238 1239Error: installd set selinux label failed. 1240 1241**Symptom** 1242 1243The SELinux fails to be installed and set. 1244 1245**Possible Causes** 1246 1247The **apl** field in the signature configuration file is incorrect. It can be **normal**, **system_basic**, and **system_core**. 1248 1249**Solution** 1250 12511. Check whether the **apl** field in the .p7b file is correct. 1252 1253  1254 12552. If the **apl** field is incorrect, modify the **apl** field in the **UnsgnedReleasedProfileTemplate.json** file and sign the file again. 1256 1257  1258 1259 1260### 9568403 The Encryption Check Fails During the Installation 1261**Error Message** 1262 1263Error: check encryption failed. 1264 1265**Symptom** 1266 1267The encryption check fails during the installation. 1268 1269**Possible Causes** 1270 1271The image version is too early or the **lib** directory of the HAP contain non-so files. 1272 1273**Solution** 1274 12751. Install a new image version. 12762. Delete non-so files in the **lib** directory of the HAP project and re-sign and package the files. 1277 1278### 9568417 Failed to Verify the Signature 1279**Error Message** 1280 1281Error: bundle cannot be installed because the appId is not same with preinstalled bundle. 1282 1283**Symptom** 1284 1285The signature verification fails. 1286 1287**Possible Causes** 1288 1289The signature of the installed bundle is different from that of the pre-installed bundle with the same bundle name. 1290 1291**Solution** 1292 12931. Ensure that the signature of the bundle to be installed is the same as that of the pre-installed bundle. 1294 1295### 9568278 Version Codes of Bundles Are Inconsistent 1296**Error Message** 1297 1298error: install version code not same. 1299 1300**Possible Causes** 13011. The version code of the new bundle is different from that of the existing bundle. 13022. The version codes of multiple bundles to be installed are inconsistent. 1303 1304**Solution** 13051. Change the version code of the new bundle to be the same as that of the existing bundle, or uninstall the existing bundle and install the new bundle. 13062. Ensure that the version codes of all new bundles are the same. 1307