xref: /docs/en/application-dev/tools/bm-tool.md (revision e41f4b71)
1# Bundle Manager
2
3
4The Bundle Manager enables you to install, uninstall, update, and query a bundle (application). It provides the bundle debugging capabilities, for example, installing and uninstalling a bundle and querying bundle information.
5
6> **NOTE**
7>
8> Before using this tool, you must obtain the <!--Del-->[<!--DelEnd-->hdc tool<!--Del-->](../../device-dev/subsystems/subsys-toolchain-hdc-guide.md)<!--DelEnd--> and run the hdc shell command.
9
10
11  **Table 1** bm commands
12
13| Name| Description|
14| -------- | -------- |
15| help | Displays the commands supported by the Bundle Manager tool.|
16| install | Installs a bundle.|
17| uninstall | Uninstalls a bundle.|
18| dump | Displays bundle information.|
19| clean | Clears the cache and data of a bundle. This command is available in the root version and is available in the user version with developer mode enabled. It is unavailable in other cases.|
20| enable | Enables a bundle. A bundle can be used after being enabled. This command is available in the root version but unavailable in the user version.|
21| disable | Disables a bundle. A bundle cannot be used after being disabled. This command is available in the root version but unavailable in the user version.|
22| get | Obtains the UDID of a device.|
23| quickfix | Performs patch-related operations, such as installing or querying a patch.|
24
25
26## Help Command
27
28  **Table 2** Help command
29
30| Name| Description|
31| -------- | -------- |
32| bm help | Used to display the commands supported by the Bundle Manager tool.|
33
34Example
35
36
37```bash
38# Display the help information.
39bm help
40```
41
42
43## Installation Command
44
45```bash
46bm install [-h] [-p path] [-u userId] [-r] [-w waitting-time]
47```
48
49
50  **Table 3** Installation command parameters
51
52| Name| Mandatory| Description|
53| -------- | -------- | -------- |
54| -h | No| Used to display the parameters supported by the **install** command. By default, the help information is displayed.|
55| -p | Yes| Path of the HAP to install. You can specify a path to install one or more HAPs at the same time.|
56| -u | No| User whose HAP is to be installed. By default, the current user's HAP is installed. If a driver application is to be installed, this parameter is ignored and the HAP will be installed for all users.|
57| -r | No| Whether to install the HAP in overwrite mode. By default, the HAP is installed in overwrite mode.|
58| -w | No| Time that the Bundle Manager tool waits before installing the HAP. The minimum waiting time is 180s, and the maximum waiting time is 600s. The default waiting time is 180s.|
59
60
61Example
62
63```bash
64bm install -p /data/app/ohosapp.hap -u 100 -w 300s -r
65// The execution result is as follows:
66install bundle successfully.
67```
68
69
70## Uninstall Command
71
72```bash
73bm uninstall [-h help] [-n bundleName] [-m moduleName] [-u userId] [-k]
74```
75
76
77  **Table 4** Uninstall command parameters
78
79| Name| Mandatory| Description|
80| -------- | -------- | -------- |
81| -h | No| Used to display the parameters supported by the **uninstall** command. By default, the help information is displayed.|
82| -n | Yes| Name of the bundle to uninstall.|
83| -m | No| Module of the bundle to uninstall. By default, all modules are uninstalled.|
84| -u | No| User whose bundle is to be uninstalled. By default, the current active user's bundle is uninstalled. If a driver application is to be uninstalled, this parameter is ignored and the bundles of all users are uninstalled.|
85| -k | No| Whether the application data is retained when the bundle is uninstalled. By default, the application data is deleted along the uninstall.|
86| -v | No| Version number of the shared bundle. By default, all shared bundles with the specified bundle name are uninstalled.|
87
88
89Example
90
91```bash
92bm uninstall -n com.ohos.app -m com.ohos.app.EntryAbility -u 100 -k
93// The execution result is as follows:
94uninstall bundle successfully.
95```
96
97
98## Dump Command
99
100```bash
101bm dump [-h help] [-a] [-n bundleName] [-s shortcutInfo] [-u userId] [-d deviceId]
102```
103
104
105If **-u** is not specified, the command applies to all users.
106
107
108  **Table 5** Dump command parameters
109
110| Name| Mandatory| Description|
111| -------- | -------- | -------- |
112| -h | No| Used to display the parameters supported by the **dump** command. By default, the help information is displayed.|
113| -a | Yes| Used to display all bundles installed in the system.|
114| -n | Yes| Used to display the details of a bundle.|
115| -s | Yes| Used to display the shortcut information of a bundle.|
116| -d | No| Used to display the bundle information on a given device. By default, the bundle information on the current device is queried.|
117| -u | No| Used to display the bundle information for a given user. By default, the bundle information of the current user is queried.|
118
119
120Example
121
122```bash
123# Display the names of all bundles installed in the system.
124bm dump -a
125# Display the details of a bundle.
126bm dump -n com.ohos.app -u 100
127# Display the shortcut information of a bundle.
128bm dump -s -n com.ohos.app -u 100
129# Display cross-device bundle information.
130bm dump -n com.ohos.app -d xxxxx
131```
132
133
134## Clean Command
135
136```bash
137bm clean [-h] [-c] [-n  bundleName] [-d] [-u userId]
138```
139
140
141If **-u** is not specified, the command applies to all active users.
142
143
144  **Table 6** Clean command parameters
145
146| Name| Description|
147| -------- | -------- |
148| -h | Used to display the parameters supported by the **clean** command.|
149| -c -n | Used to clear the cache data of a bundle.|
150| -d -n | Used to clear the data directory of a bundle.|
151| -u | Used to clear the cache data of a bundle for a given user.|
152
153
154Example
155
156```bash
157# Clear the cache data of a bundle.
158bm clean -c -n com.ohos.app -u 100
159// The execution result is as follows:
160clean bundle cache files successfully.
161# Clear the user data of a bundle.
162bm clean -d -n com.ohos.app -u 100
163// The execution result is as follows:
164clean bundle data files successfully.
165```
166
167
168## Enable Command
169
170```bash
171bm enable [-h] [-n bundleName] [-a abilityName] [-u userId]
172```
173
174
175If **-u** is not specified, the command applies to all active users.
176
177
178  **Table 7** Enable command parameters
179
180| Name| Description|
181| -------- | -------- |
182| -h | Used to display the parameters supported by the **enable** command.|
183| -n | Used to enable a bundle.|
184| -a | Used to enable an ability with a specified bundle name.|
185| -u | Used to enable a bundle for a given user.|
186
187
188Example
189
190```bash
191# Enable a bundle.
192bm enable -n com.ohos.app -a com.ohos.app.EntryAbility -u 100
193// The execution result is as follows:
194enable bundle successfully.
195```
196
197
198## Disable Command
199
200```bash
201bm disable [-h] [-n bundleName] [-a abilityName] [-u userId]
202```
203
204
205If **-u** is not specified, the command applies to all active users.
206
207
208  **Table 8** Disabled command parameters
209
210| Name| Description|
211| -------- | -------- |
212| -h | Used to display the parameters supported by the **disable** command.|
213| -n | Used to disable a bundle.|
214| -a | Used to disable an ability with a specified bundle name.|
215| -u | Used to disable a bundle for a given user.|
216
217Example
218
219```bash
220# Disable a bundle.
221bm disable -n com.ohos.app -a com.ohos.app.EntryAbility -u 100
222// The execution result is as follows:
223disable bundle successfully.
224```
225
226
227## Obtaining UDID
228
229```bash
230bm get [-h] [-u]
231```
232
233
234  **Table 9** Parameters used in the command for obtaining the UDID
235
236| Name| Description|
237| -------- | -------- |
238| -h | Used to display the parameters supported by the **get** command.|
239| -u | Used to obtain the UDID of a device.|
240
241
242Example
243
244```bash
245# Obtain the UDID of a device.
246bm get -u
247// The execution result is as follows:
248udid of current device is :
24923CADE0C
250```
251
252
253## Quick Fix
254
255```bash
256bm quickfix [-h] [-a -f filePath [-t targetPath] [-d]] [-q -b bundleName] [-r -b bundleName] 
257```
258
259
260  **Table 10** Parameters used in the command for quick fix
261
262| Name| Description|
263| -------- | -------- |
264| -h | Used to display the commands supported by **quickfix**.|
265| -a -f | Used to run the quick fix patch installation command. **file-path** corresponds to the .hqf file. You can pass in one or more .hqf files or the directory where the .hqf file is located.|
266| -t | Used to specify the installation directory name of the quick fix patch. The patch is not enabled after being installed. The name must be a one-level directory and cannot contain characters such as **..** and **/**. The actual installation directory is the directory under the **patch** directory. For example, if **-t mydir** is specified, the actual installation directory is **patch/mydir**.|
267| -d | Used to select the debug mode to run the patch installation command.|
268| -q -b | Used to display the patch information based on the bundle name. **bundleName** indicates the bundle name.|
269| -r&nbsp;-b | Used to uninstall a patch based on the bundle name. **bundleName** indicates the bundle name. Only the patch that is not enabled yet and for which the installation directory name is specified by **-t** can be uninstalled.|
270
271
272Example
273
274```bash
275# Display patch package information by the bundle name.
276bm quickfix -q -b com.ohos.app
277// The execution result is as follows:
278// Information as follows:            
279// ApplicationQuickFixInfo:           
280//  bundle name: com.ohos.app 
281//  bundle version code: xxx     
282//  bundle version name: xxx       
283//  patch version code: x            
284//  patch version name:              
285//  cpu abi:                          
286//  native library path:             
287//  type:                            
288# Install a quick fix patch:
289bm quickfix -a -f /data/app/
290// The execution result is as follows:
291apply quickfix succeed.
292# Uninstall a quick fix patch:
293bm quickfix -r -b com.ohos.app
294// The execution result is as follows:
295delete quick fix successfully
296```
297
298## Commands for Querying the Shared Library
299
300```bash
301bm dump-shared [-h help] [-a] [-n bundleName] [-m moudleName]
302```
303
304  **Table 11** Commands for querying the shared library
305
306| Name                                            | Description                                  |
307| ------------------------------------------------ | -------------------------------------- |
308| bm dump-shared -h                                | Displays the parameters supported by the **dump-shared** command.         |
309| bm dump-shared -a                                | Displays all shared libraries installed in the system.            |
310| bm dump-shared -n                                | Displays details about a shared library.          |
311| bm dump-dependencies -h                          | Displays the parameters supported by the **bm dump-dependencies** command.|
312| bm dump-dependencies -n bundleName -m moudleName | Displays information about the shared library on which a specified module of an application depends.  |
313
314Example
315
316```bash
317# Display the bundle names of all shared libraries installed in the system.
318bm dump-shared -a
319# Display the details about the specified shared library.
320bm dump-shared -n com.ohos.lib
321# Display information about the shared library on which a specified module of an application depends.
322bm dump-dependencies -n com.ohos.app -m entry
323```
324
325## Error Codes
326
327### 9568320
328**Error Message**
329
330Failed to install bundle, no signature file.
331![Example](figures/en-us_image_0000001389116960.png)
332
333**Symptom**
334
335An unsigned HAP file is installed.
336
337**Possible Causes**
338
339The HAP file is not signed.
340
341**Solution**
342
343- Use automatic signature. After the device is connected, sign the application again.
344- To use manual signature, follow the instructions provided in [hapsigner Guide](../security/hapsigntool-guidelines.md).
345  <br></br>
346
347### 9568347
348**Error Message**
349
350Error: install parse native so failed.
351
352**Symptom**
353
354When you start debugging or running a C++ app/service, the error message "error: install parse native so failed" is displayed during the installation of the HAP.
355
356**Possible Causes**
357
358The Application Binary Interface (ABI) supported by the device does not match that configured in the C++ project.
359
360**Solution**
361
362- Connect the device to DevEco Studio.
363- Open the command line tool and go to the **toolchains\{*Version*}** directory in the OpenHarmony SDK installation directory.
364    ```
365    To check the OpenHarmony SDK installation directory, choose **File** > **Settings** > **SDK**.
366    ```
367- 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.
368    ```
369    hdc shell
370    param get const.product.cpu.abilist
371    ```
372- Depending on the obtained list, modify the **abiFilters** settings in the module-level **build-profile.json5** file. The rules are as follows:
373    * If the list includes only **default**, run the following command to check whether the **lib64** folder exists:
374      ```
375      cd /system/
376      ls
377      ```
378      ![Example](figures/en-us_image_0000001609001262.png)
379      * If the **lib64** folder exists, add the arm64-v8a type to **abiFilters**.
380      * If the **lib64** folder does not exist, add armeabi, armeabi-v7a, or both types to **abiFilters**.
381    * 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.
382    <br></br>
383
384
385### 9568344
386**Error Message**
387
388Error: install parse profile prop check error.
389![Example](figures/en-us_image_0000001585361412.png)
390
391**Symptom**
392
393When 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.
394
395**Possible Causes**
396
397The application uses the privileges, but the new signature fingerprint is not added to the **install_list_capability.json** file of the device after the signature file of the application is changed.
398
399**Solution**
400
4011. Obtain the new signature fingerprint.
402
403    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.
404
405    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.
406
407    The format of the new .cer file is shown below. (The file content is an example.)
408
409    ![Example](figures/en-us_image_0000001585521364.png)
410    
411    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:
412    
413      keytool -printcert -file xxx.cer
414    
415    d. Remove the colon (:) from the SHA-256 content in the certificate fingerprint. What you get is the signature fingerprint.
416    
417    An example SHA-256 value is shown below.
418    ![Example](figures/en-us_image_0000001635921233.png)
419    
420    The signature fingerprint obtained by removing the colon is 5753DDBC1A8EF88A62058A9FC4B6AFAFC1C5D8D1A1B86FB3532739B625F8F3DB.
421    
4222. Obtain the **install_list_capability.json** file of the device.
423
424    a. Connect the device.
425
426    b. Run the following command to view the **install_list_capability.json** file of the device:
427    ```
428    find /system -name install_list_capability.json
429    ```
430    The **install_list_capability.json** file of the device is stored in the following directory. Find the corresponding configuration file based on the bundle name.
431    ```
432    /system/etc/app/install_list_capability.json
433    ```
434    c. Run the following command to obtain the **install_list_capability.json** file:
435    ```
436    hdc shell mount -o rw,remount /
437    hdc file recv /system/etc/app/install_list_capability.json
438    ```
439
4403. 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.
441     ![Example](figures/en-us_image_0000001635641893.png)
442
4434. Push the modified **install_list_capability.json** file to the device and restart the device.
444
445    ```
446    hdc shell mount -o rw,remount / 
447    hdc file send install_list_capability.json /system/etc/app/install_list_capability.json 
448    hdc shell chmod 644 /system/etc/app/install_list_capability.json 
449    hdc shell reboot
450    ```
451
4525. Reinstall the application.
453
454
455### 9568305
456**Error Message**
457
458Error: dependent module does not exist.
459![Example](figures/en-us_image_0000001560338986.png)
460
461**Symptom**
462
463When you start debugging or run an application, the error message "error: dependent module does not exist" is displayed during the installation of the HAP.
464
465**Possible Causes**
466
467The SharedLibrary module on which the application to be run or debugged depends is not installed.
468
469**Solution**
470
471- 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.
472  ![Example](figures/en-us_image_0000001560201786.png)
473- 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.
474  ![Example](figures/en-us_image_0000001610761941.png)
475
476
477### 9568259
478**Error Message**
479
480Error: install parse profile missing prop.<br>
481![Example](figures/en-us_image_0000001559130596.png)
482
483**Symptom**
484
485When you start debugging or run an application, the error message "error: install parse profile missing prop" is displayed during the installation of the HAP.
486
487**Possible Causes**
488
489Mandatory fields are missing in the **app.json5** and **module.json5** files.
490
491**Solution**
492
493* 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).
494* Determine the missing fields based on the HiLog.
495
496    Run the following command to enable disk flushing:
497    ```
498    hilog -w start
499    ```
500
501    Disk location: /data/log/hilog
502
503    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.
504
505
506### 9568258
507**Error Message**
508
509Error: install releaseType target not same.<br>
510![Example](figures/en-us_image_0000001609976041.png)
511
512**Symptom**
513
514When you start debugging or run an application, the error message "error: install releaseType target not same" is displayed during the installation of the HAP.
515
516**Possible Causes**
517
518The value of **releaseType** in the SDK used by the existing HAP is different from that used by the new HAP.
519
520**Solution**
521
522Uninstall the existing HAP on the device, and then install the new HAP.
523
524
525### 9568322
526**Error Message**
527
528Error: signature verification failed due to not trusted app source.
529![Example](figures/en-us_image_0000001585042216.png)
530
531**Symptom**
532
533When 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.
534
535**Possible Causes**
536
537The signature does not contain the UDID of the debugging device.
538
539**Solution**
540
541- Use automatic signature. After the device is connected, sign the application again.
542- If manual signature is used, add the UDID of the device to the **UnsgnedDebugProfileTemplate.json** file. For details, see [OpenHarmony Application Manual Signature](../security/hapsigntool-guidelines.md).
543  ```
544  // Command for obtaining the UDID
545  hdc shell bm get -u
546  ```
547
548
549### 9568289
550**Error Message**
551
552Error: install failed due to grant request permissions failed.
553![Example](figures/en-us_image_0000001585201996.png)
554
555**Symptom**
556
557When 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.
558
559**Possible Causes**
560
561The application uses the default Ability Privilege Level (APL), which is normal, and requires the system_basic or system_core permission.
562
563**Solution**
564
565Change the API in the **UnsgnedDebugProfileTemplate.json** file to **system_basic** or **system_core**, and sign and pack the application again.
566
567
568### 9568297
569**Error Message**
570
571Error: install failed due to older sdk version in the device.
572![Example](figures/en-us_image_0000001635521909.png)
573
574**Symptom**
575
576When 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.
577
578**Possible Causes**
579
580The SDK version used for build and packing does not match the device image version.
581
582**Solution**
583
584* 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:
585  ```
586  hdc shell param get const.ohos.apiversion
587  ```
588  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.
589
590* Scenario 2: For applications that need to run on OpenHarmony devices, ensure that runtimeOS has been changed to OpenHarmony.
591
592
593### 9568332
594**Error Message**
595
596Error: install sign info inconsistent.
597![Example](figures/en-us_image_0000001635761329.png)
598
599**Symptom**
600
601When you start debugging or run an application, the error message "error: install sign info inconsistent" is displayed during the installation of the HAP.
602
603**Possible Causes**
604
605The signature of the application installed on the device is different from that of the new application. **Keep Application Data** is selected in **Edit Configurations** (the app installation is overwritten) and the app is re-signed.
606
607**Solution**
608
609Uninstall the application, or deselect **Keep Application Data**. Then install the new application.
610
611
612### 9568266
613**Error Message**
614
615Error: install permission denied.
616![Example](figures/en-us_image_9568266.png)
617
618**Symptom**
619
620When you run the **hdc install** command to install the HAP file, the error message "code:9568266 error: install permission denied"  is displayed.
621
622**Possible Causes**
623
624The **hdc install** command cannot be used to install the enterprise application with the **release** signature.
625
626**Solution**
627
628Run the **hdc install** command to install and debug the enterprise application with the **debug** signature.
629
630
631### 9568337
632**Error Message**
633
634Error: install parse unexpected.
635
636**Symptom**
637
638When an application is pushed to a device, an error message is displayed, indicating that the HAP file fails to be opened.
639
640**Possible Causes**
641
642* 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.
643
644* The HAP file is damaged when it is pushed to the device.
645
646**Solution**
647
648* Check the storage space allocated to the system partition. If the storage space is full, clear the storage space to install the HAP file.
649  
650  ```
651  hdc shell param get const.ohos.apiversion
652  ```
653
654* 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.
655
656
657### 9568316
658**Error Message**
659
660Error: apl of required permission in proxy data is too low.
661
662**Symptom**
663
664**requiredReadPermission** and **requiredWritePermission** of the **proxyData** tag fail to be verified.
665
666**Possible Causes**
667
668In the **module.json** file of the application project, **requiredReadPermission** and **requiredWritePermission** of the **proxyData** tag fail to be verified, because they can only be configured when the application has the permission level of **system_basic** or **system_core**.
669
670**Solution**
671
672Check whether the **proxyData** tag of the application is specified as required. For details, see <!--RP6-->[proxyData](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/quick-start/module-configuration-file.md#proxydata%E6%A0%87%E7%AD%BE)<!--RP6End-->.
673
674
675### 9568315
676**Error Message**
677
678Error: uri in proxy data is wrong.
679
680**Symptom**
681
682**uri** of the **proxyData** tag fails to be verified.
683
684**Possible Causes**
685
686In the **module.json** file of the application project, **uri** of the **proxyData** tag fails to be verified because it's format does not meet the requirement.
687
688**Solution**
689
690Check whether the **proxyData** tag of the application is set as required. For details, see <!--RP7-->[proxyData](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/quick-start/module-configuration-file.md#proxydata%E6%A0%87%E7%AD%BE)<!--RP7End-->.
691
692
693### 9568336
694**Error Message**
695
696Error: install debug type not same.
697
698**Symptom**
699
700The debugging type of the application (the **debug** field in the **app.json** file) is different from that of the installed application.
701
702**Possible Causes**
703
704You have installed the application using the **Debug** button of the DevEco studio, and then you run the **hdc install** command to install the HAP file of the application.
705
706**Solution**
707
708Uninstall the existing application and install a new application.
709
710### 9568296
711**Error Message**
712
713Error: install failed due to error bundle type.
714
715**Symptom**   
716
717The installation fails to be installed because the **bundleType** tag is incorrect.
718
719**Possible Causes**
720
721The **bundleType** of the application to be installed is different from that of an existing application with the same **bundleName**.
722
723**Solution**
724
725* Uninstall the existing application and install the application again.
726
727* Set the **bundleType** of the application to the same as that of the existing application.
728
729
730### 9568292
731**Error Message**
732
733Error: install failed due to zero user can only install singleton app.
734
735**Symptom**
736
737The 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**.
738
739**Possible Causes**
740
741The **UserID** is not set to **0** for the application with the **singleton** permission.
742
743**Solution**
744
745If the application has the **singleton** permission, set the **UserID** to **0** during installation.
746
747```
748// Set the user ID to 0.
749hdc install -p name of the HAP file.hap -u 0
750```
751
752### 9568263
753**Error Message**
754
755Error: install version downgrade.
756
757**Symptom**
758
759The installation fails because **versionCode** of the application to be installed is earlier than that of the existing application.
760
761**Possible Causes**
762
763The **versionCode** of the application to be installed is earlier than that of the existing application.
764
765**Solution**
766
767Uninstall the existing application and install a new application.
768
769
770### 9568304
771**Error Message**
772
773Error: device type is not supported.
774
775**Symptom**
776
777The installation fails because the application does not support the current device type.
778
779**Possible Causes**
780
781The application does not support the current device type.
782
783**Solution**
784
785To 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.
786
787
788### 9568317
789**Error Message**
790
791Error: isolationMode does not match the system.
792
793**Symptom**
794
795The installation fails because the **isolationMode** of the appllication is not supported by the system.
796
797**Possible Causes**
798
799* The device supports the isolation mode (the value of **persist.bms.supportIsolationMode** is **true**), whereas the value of **isolationMode** in the HAP is **nonisolationOnly**.
800
801* 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**.
802
803**Solution**
804
805Set the value of **isolationMode** in the HAP configuration file based on the isolation mode of the device. 
806
807```
808// Query the value of persist.bms.supportIsolationMode. If errNum is:106 is returned, persist.bms.supportIsolationMode is not configured.
809hdc shell
810param get persist.bms.supportIsolationMode
811// Set persist.bms.supportIsolationMode.
812hdc shell
813param set persist.bms.supportIsolationMode [true|false]
814```
815
816### 9568315
817**Error Message**
818
819Error: uri in proxy data is wrong.
820
821**Symptom**
822
823**uri** of the **proxyData** tag in the **module.json** file fails to be verified.
824
825**Possible Causes**
826
827The **uri** does not meet the format requirements.
828
829**Solution**
830
831Ensure that the uri meets the format requirements.
832
833```
834// uri format specifications:
835The uri of a data proxy must be unique and must be in the format of datashareproxy://bundle name of the current application/xxx.
836```
837
838### 9568310     
839**Error Message**
840
841Error: compatible policy not same.
842
843**Symptom**
844
845The compatibility policy of the new package is different from that of the existing package.
846
847**Possible Causes**
848
849An HAP with the same name has been installed on the device.
850
851**Solution**
852
853Uninstall the HAP with the same name and install the new HAP.
854
855
856### 9568391     
857**Error Message**
858
859Error: bundle manager service is died.
860
861**Symptom**
862
863The bundle manager service is stopped.
864
865**Possible Causes**
866
867When you run the **bm install -p *******.hap** command to install a pre-installed application, the running application is killed, causing an exception (for example, the foundation process restarts).
868
869**Solution**
870
871Install the pre-installed applications based on the reference to the OTA upgrade.
872
873
874### 9568393     
875**Error Message**
876
877Error: verify code signature failed.
878
879**Symptom**
880
881The code signature fails to be verified.
882
883**Possible Causes**
884
885* The bundle does not contain code signature information.
886
887* The signature certificate is incorrect.
888
889
890**Solution**
891
892* Use the signing tool SDK to check whether the bundle is signed.
893	
894```
895	// Verify the signature.
896	java -jar SDK installation path (SDK in the DevEco installation directory) \toolchains\lib\hap-sign-tool.jar verify-app -outCertChain out.cer -outProfile out.p7b -inFile bundle path\**.hap
897	// 1. "is can not find codesign block" is returned, indicating that the bundle is not signed.
898	// 2. "verify codesign success," is returned, indicating that the bundle is signed.
899```
900	
901	
902	
903	
904* Check the signing process and signing certificate. For details, see <!--RP8--> [App/Service Signing](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/ide-signing-0000001587684945-V5)<!--RP8End-->.
905