1# Ability Assistant 2 3Ability Assistant (aa) is a tool used to start applications and test cases. It provides basic application debugging and testing capabilities, for example, starting application components, forcibly stopping processes, and printing application component information. 4 5## Environment Setup 6 7Before 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. 8 9The commands in this topic are used in the interactive CLI. To run the hdc shell [aa command] directly, use quotation marks ("") to wrap the aa command to ensure that the input parameters in the command can be correctly identified. The sample code is as follows: 10 11```bash 12# The start command: 13hdc shell "aa start -A ohos.want.action.viewData -U 'https://www.example.com'" 14 15# The process command: 16hdc shell "aa process -b com.example.myapplication -a EntryAbility -p perf-cmd" 17``` 18 19## aa Commands 20 21| Command| Description| 22|--------|--------| 23| -h/help | Displays the help information of the aa tool.| 24| start | Starts an application component. The target component can be the PageAbility and ServiceAbility components of the FA model or the UIAbility and ServiceExtensionAbility components of the Stage model. The **exported** tag in the configuration file of the target component cannot be set to **false**.| 25| stop-service | Stops a ServiceAbility.| 26| dump<sup>(deprecated)</sup> | Prints information about an application component.| 27| force-stop | Forcibly stops a process based on the bundle name.| 28| test | Starts the test framework based on the carried parameters.| 29| attach | Attaches an application to enable it to enter the debugging mode.| 30| detach | Detaches an application to enable it to exit the debugging mode.| 31| appdebug | Sets or cancels the waiting-for-debugging state of an application, and obtains the bundle name and persistence flag of an application in the waiting-for-debugging state. The waiting-for-debugging state takes effect only for debugging applications. The setting command of **appdebug** takes effect only for a single application. Once the command is executed repeatedly, the bundle name and persistence flag are replaced with the latest settings.| 32| process | Debugs or optimizes an application. In DevEco Studio, this command is used to integrate debugging and optimization tools.| 33 34## help 35 36```bash 37# Display the help information. 38aa help 39``` 40 41## start 42 43Starts an application component. The target component can be the PageAbility and ServiceAbility components of the FA model or the UIAbility and ServiceExtensionAbility components of the Stage model. The **exported** tag in the configuration file of the target component cannot be set to **false**. 44 45```bash 46# Display the ability started. 47aa start [-d <deviceId>] [-a <abilityName> -b <bundleName>] [-m <moduleName>] [-D] [-R] [-S] [--pi <key> <integer-value>] [--pb <key> <bool-value: true/false/t and f are case insensitive] [--ps <key> <value>] [--psn <key>] [--wl <windowLeft>] [--wt <windowTop>] [--wh <windowHeight>] [--ww <windowWidth>] [-p <perf-cmd>] 48 49# Implicitly start an ability. If none of the parameters in the command is set, the startup fails. 50aa start [-d <deviceId>] [-U <URI>] [-t <type>] [-A <action>] [-e <entity>] [-D] [-R] [--pi <key> <integer-value>] [--pb <key> <bool-value: true/false/t and f are case insensitive] [--ps <key> <value>] [--psn <key>] [--wl <windowLeft>] [--wt <windowTop>] [--wh <windowHeight>] [--ww <windowWidth>] [-p <perf-cmd>] 51``` 52 53 **Parameters** 54 55| Name| Description | 56| -------- |-------------------| 57| -h/--help | Help information. | 58| -d | Device ID. This parameter is optional. | 59| -a | Ability name. This parameter is optional.| 60| -b | Bundle name. This parameter is optional. | 61| -m | Module name. This parameter is optional. | 62| -U | URI. This parameter is optional. | 63| -A | Action. This parameter is optional. | 64| -e | Entity. This parameter is optional. | 65| -t | Type. This parameter is optional. | 66| --pi | Key-value pair of the integer type. This parameter is optional. | 67| --pb | Key-value pair of the Boolean type. This parameter is optional. | 68| --ps | Key-value pair of the string type. This parameter is optional. | 69| --psn | Keyword of an empty string. This parameter is optional. | 70| --wl | Left margin of the window, in px. This parameter is optional.<br>**Constraints**:<br>This field is valid only when the 2-in-1 device is in developer mode and the application to start uses a debug signature.| 71| --wt | Top margin of the window, in px. This parameter is optional.<br>**Constraints**:<br>This field is valid only when the 2-in-1 device is in developer mode and the application to start uses a debug signature.| 72| --wh | Window height, in px. This parameter is optional.<br>**Constraints**:<br>This field is valid only when the 2-in-1 device is in developer mode and the application to start uses a debug signature.| 73| --ww | Window width, in px. This parameter is optional.<br>**Constraints**:<br>This field is valid only when the 2-in-1 device is in developer mode and the application to start uses a debug signature.| 74| -R | Whether to enable multi-thread error detection during debugging. This parameter is optional. The detection is enabled when this parameter is passed in.<br>**NOTE**: This parameter is supported since API version 14.| 75| -S | Whether to enter the application sandbox during debugging. This parameter is optional. If this parameter is carried, the application sandbox is entered. Otherwise, the application sandbox is not entered.| 76| -D | Debugging mode. This parameter is optional. | 77| -p | Optimization mode. This parameter is optional. This command can be customized. | 78 79 **Return value** 80 81 Returns "start ability successfully." if the ability is started; returns "error: failed to start ability." and the corresponding error information otherwise. 82 83 **Error codes** 84 85| ID| Error Message| 86| ------- | -------- | 87| 10103001 | Failed to verify the visibility of the target ability. | 88| 10104001 | The specified ability does not exist. | 89| 10105001 | Failed to connect to the ability service. | 90| 10105002 | Failed to obtain ability information. | 91| 10106002 | The target application does not support debug mode. | 92| 10100101 | Failed to obtain application information. | 93| 10100102 | The aa start command cannot be used to launch a UIExtensionAbility. | 94| 10103101 | Failed to find a matching application for implicit launch. | 95| 10103102 | The passed appCloneIndex is invalid. | 96| 10106101 | The current ability will be placed in the queue to wait for the previous ability to finish launching. | 97| 10106102 | The device screen is locked during the application launch. | 98| 10106103 | The target application is an expired crowdtesting application. | 99| 10106105 | The target application is under control. | 100| 10106106 | The target application is managed by EDM. | 101| 10106107 | The current device does not support using window options. | 102| 10107102 | Permission verification failed for the specified process. | 103| 10108101 | An internal error occurs while attempting to launch the ability. | 104 105 **Example** 106 107 The following uses the implicit startup of an ability as an example. 108 109 > **NOTE** 110 > 111 > This example describes only the usage of some fields. For details about ability matching rules, see [Matching Rules of Explicit Want and Implicit Want](../application-models/explicit-implicit-want-mappings.md). 112 113 114 - Configure **uris** for the target ability in the **module.json5** file. 115 116 ```json 117 { 118 "name": "TargetAbility", 119 // ...... 120 "exported": true, 121 "skills": [ 122 { 123 "actions":[ 124 "ohos.want.action.viewData" 125 ], 126 "uris":[ 127 { 128 "scheme": "myscheme", 129 "host": "www.test.com", 130 "port": "8080", 131 "path": "path", 132 } 133 ] 134 } 135 ] 136 } 137 ``` 138 139 140 - Implicitly start the ability. 141 142 - Run the **-U** command to start an application page. 143 144 ```bash 145 aa start -U myscheme://www.test.com:8080/path 146 ``` 147 148 - If parameters need to be carried, run the following command: 149 150 ```bash 151 aa start -U myscheme://www.test.com:8080/path --pi paramNumber 1 --pb paramBoolean true --ps paramString teststring --psn paramNullString 152 ``` 153 154 The following is an example for the UIAbility to obtain input parameters: 155 156 ```ts 157 import UIAbility from '@ohos.app.ability.UIAbility'; 158 import hilog from '@ohos.hilog'; 159 import Want from '@ohos.app.ability.Want'; 160 161 export default class TargetAbility extends UIAbility { 162 onCreate(want:Want, launchParam) { 163 hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate'); 164 let paramNumber = want.parameters.paramNumber 165 let paramBoolean = want.parameters.paramBoolean 166 let paramString = want.parameters.paramString 167 let paramNullString = want.parameters.paramNullString 168 } 169 } 170 ``` 171 172 - Run the **-A -U** command to start the browser and redirect to a specified page. 173 174 The following uses **https://www.example.com** as an example. Replace it with the actual URL. 175 176 ```bash 177 aa start -A ohos.want.action.viewData -U https://www.example.com 178 ``` 179 180 181## stop-service 182 183Stops a ServiceAbility. 184 185```bash 186aa stop-service [-d <deviceId>] -a <abilityName> -b <bundleName> [-m <moduleName>] 187``` 188 189 **Parameters** 190| Name| Description| 191| -------- | -------- | 192| -h/--help | Help information.| 193| -d | Device ID. This parameter is optional.| 194| -a | Ability name. This parameter is mandatory.| 195| -b | Bundle name. This parameter is mandatory.| 196| -m | Module name. This parameter is optional.| 197 198 **Return value** 199 200 Returns "stop service ability successfully." if the ServiceAbility is stopped; returns "error: failed to stop service ability." otherwise. 201 202 **Error codes** 203 204| ID| Error Message| 205| ------- | -------- | 206| 10103001 | Failed to verify the visibility of the target ability. | 207| 10103201 | The target ability is not of the ServiceAbility type. | 208| 10104001 | The specified ability does not exist. | 209| 10105001 | Failed to connect to the ability service. | 210| 10105002 | Failed to obtain ability information. | 211 212 **Example** 213 214 ```bash 215 # Stop a ServiceAbility. 216 aa stop-service -a EntryAbility -b com.example.myapplication -m entry 217 ``` 218 219## dump <sup>(deprecated)</sup> 220 221Prints information about an application component. 222 223```bash 224aa dump -a 225``` 226 227> **NOTE** 228> 229> This command is supported since API version 7 and deprecated since API version 9. You are advised to use **[hidumper](../dfx/hidumper.md) -s AbilityManagerService** instead. 230 231 **Parameters** 232| Name| Level-2 Parameter| Description| 233| -------- | -------- | -------- | 234| -h/--help | - | Help information.| 235| -a/--all | - | Application component information in all missions.| 236| -l/--mission-list | type (All logs are printed if this parameter is left unspecified.)| For better management, the service side maintains four types of MissionLists,<br>as described below:<br>- **NORMAL**: MissionList that is started normally. For example, if A starts B and C, the corresponding MissionList is A->B->C.<br>- **DEFAULT_STANDARD**: If a MissionList is damaged, missions with the launch type set to **multiton** are removed to this MissionList. The Missions in it are not associated with each other.<br>- **DEFAULT_SINGLE**: If a MissionList is damaged, missions with the launch type set to **singleton** are removed to this MissionList. The Missions in it are not associated with each other.<br>- **LAUNCHER**: MissionList for launcher abilities.| 237| -e/--extension | elementName | Extended component information.| 238| -u/--userId | UserId | Mission stack information of a specified user ID. This parameter must be used together with other parameters. Example commands: **aa dump -a -u 100** and **aa dump -d -u 100**.| 239| -d/--data | - | DataAbility information.| 240| -i/--ability | AbilityRecord ID | Detailed information about an application component.| 241| -c/--client | - | Detailed information about an application component. This parameter must be used together with other parameters. Example commands: **aa dump -a -c** and **aa dump -i 21 -c**.| 242| -p/--pending | - | Pending Want information. This parameter must be used together with other parameters. Example command: **aa dump -a -p**.| 243| -r/--process | - | Process information. This parameter must be used together with other parameters. Example command: **aa dump -a -r**.| 244 245 **Error codes** 246 247| ID| Error Message| 248| ------- | -------- | 249| 10105001 | Failed to connect to the ability service. | 250 251 **Example** 252 253 ```bash 254 # Print the application component information in all missions. 255 aa dump -a 256 ``` 257 258  259 260 261 ```bash 262 # Print all task chains. 263 aa dump -l 264 ``` 265 266  267 268 269 ```bash 270 # Print the detailed information about an application component. 271 aa dump -i 12 272 ``` 273 274  275 276## force-stop 277 278Forcibly stops a process based on the bundle name. 279 280```bash 281aa force-stop <bundleName> 282``` 283 284 **Return value** 285 286 Returns "force stop process successfully." if the process is forcibly stopped; returns "error: failed to force stop process." otherwise. 287 288 **Error codes** 289 290| ID| Error Message| 291| ------- | -------- | 292| 10105001 | Failed to connect to the ability service. | 293| 10104002 | Failed to obtain specified bundle information. | 294| 10106401 | Failed to terminate the process. | 295| 10106402 | Persistent processes cannot be terminated. | 296 297 **Example** 298 299 ```bash 300 # Forcibly stop a process based on the bundle name. 301 aa force-stop com.example.myapplication 302 ``` 303 304## test 305 306Starts the test framework based on the carried parameters. 307 308```bash 309aa test -b <bundleName> [-m <module-name>] [-p <package-name>] [-s class <test-class>] [-s level <test-level>] [-s size <test-size>] [-s testType <test-testType>] [-s timeout <test-timeout>] [-s <any-key> <any-value>] [-w <wait-time>] -s unittest <testRunner> 310``` 311 312> **NOTE** 313> 314> For details about parameters such as **class**, **level**, **size**, and **testType**, see <!--RP2-->[Keywords in the aa test Commands](../application-test/arkxtest-guidelines.md#cmd)<!--RP2End-->. 315 316 **Parameters** 317| Name| Description| 318| -------- | -------- | 319| -h/--help | Help information.| 320| -b | Bundle name. This parameter is mandatory.| 321| -s unittest | Test runner. This parameter is mandatory.| 322| -p | Package name of the test runner. This parameter is optional.<br>**NOTE**: This parameter can be used only in the FA model.| 323| -m | Module name of the test runner. This parameter is optional.<br>**NOTE**: This parameter can be used only in the stage model.| 324| -s class | Test suite or test case to be executed. This parameter is optional.| 325| -s level | Level of the test case to be executed. This parameter is optional.| 326| -s size | Size of the test case to be executed. This parameter is optional.| 327| -s testType | Type of the test case to be executed. This parameter is optional.| 328| -s timeout | Timeout interval for executing the test case, in ms. The default value is 5000. This parameter is optional.| 329| -s \<any-key> | Any key-value pair. This parameter is optional.| 330| -w | Test running time, in ms. This parameter is optional.| 331| -D | Debugging mode. This parameter is optional.| 332 333 **Return value** 334 335 Returns "user test started." if the test framework is started; returns "error: failed to start user test." and the corresponding error information otherwise. 336 337 **Error codes** 338 339| ID| Error Message| 340| ------- | -------- | 341| 10104002 | Failed to obtain specified bundle information. | 342| 10105001 | Failed to connect to the ability service. | 343| 10106002 | The target application does not support debug mode. | 344| 10108501 | An internal error occurs during the execution of the aa test command. | 345 346 **Example** 347 348 ```bash 349 # Start the test framework. 350 aa test -b com.example.myapplication -s unittest ActsAbilityTest 351 # Start the test framework and set the module name. 352 aa test -b com.example.myapplication -m entry_test -s unittest ActsAbilityTest 353 # Start the test framework and specify the timeout interval. 354 aa test -b com.example.myapplication -m entry_test -s timeout 10000 -s unittest ActsAbilityTest 355 ``` 356 357## attach 358 359Attaches an application to enable it to enter the debugging mode. 360 361```bash 362aa attach -b <bundleName> 363``` 364 365 **Parameters** 366| Name| Description | 367| -------- |-------------------| 368| -h/--help | Help information. | 369| -b | Bundle name. This parameter is mandatory. | 370 371 **Return value** 372 373 Returns "attach app debug successfully." if the application enters the debugging mode; returns "fail: unknown option." and prints the help information if the specified parameter is invalid. 374 375 **Error codes** 376 377| ID| Error Message| 378| ------- | -------- | 379| 10105001 | Failed to connect to the ability service. | 380| 10106001 | The current device is not in developer mode. | 381| 10106002 | The target application does not support debug mode. | 382| 10103601 | The specified bundleName does not exist. | 383| 10108601 | An internal error occurs while attempting to enter/exit debug mode. | 384 385 **Example** 386 387 ```bash 388 # Attach an application to enable it to enter the debugging mode. 389 aa attach -b com.example.myapplication 390 ``` 391 392## detach 393 394Detaches an application to enable it to exit the debugging mode. 395 396```bash 397aa detach -b <bundleName> 398``` 399 400 **Parameters** 401| Name| Description | 402| -------- |-------------------| 403| -h/--help | Help information. | 404| -b | Bundle name. This parameter is mandatory. | 405 406 **Return value** 407 408 Returns "detach app debug successfully." if the application exits the debugging mode; returns "fail: unknown option." and prints the help information if the specified parameter is invalid. 409 410 **Error codes** 411 412| ID| Error Message| 413| ------- | -------- | 414| 10105001 | Failed to connect to the ability service.| 415| 10106001 | The current device is not in developer mode. | 416| 10106002 | The target application does not support debug mode. | 417| 10103601 | The specified bundleName does not exist. | 418| 10108601 | An internal error occurs while attempting to enter/exit debug mode. | 419 420 **Example** 421 422 ```bash 423 # Detach an application to enable it to exit the debugging mode. 424 aa detach -b com.example.myapplication 425 ``` 426 427## appdebug 428 429Sets or cancels the waiting-for-debugging state of an application, and obtains the bundle name and persistence flag of an application in the waiting-for-debugging state. The waiting-for-debugging state takes effect only for debugging applications. The setting command of **appdebug** takes effect only for a single application. Once the command is executed repeatedly, the bundle name and persistence flag are replaced with the latest settings. 430 431```bash 432aa appdebug -b <bundleName> [-p] 433``` 434 435 **Parameters** 436| Name| Level-2 Parameter| Description| 437| -------- | -------- | -------- | 438| -h/--help | - | Help information.| 439| -b/--bundlename | bundleName | Bundle name for which the waiting-for-debugging state is set. The system does not verify the validity of the bundle name.| 440| -p/--persist | - | Persistence flag. This parameter is optional. If this parameter is carried, the application is set to the waiting-for-debugging state persistently. That is, the setting takes effect regardless of whether the device is restarted or the application is reinstalled. If this parameter is not carried, the state takes effect only before the device is restarted. This parameter must be used together with the **-b** parameter. Example command: **aa appdebug -b \<bundleName> -p**.| 441| -c/--cancel | - | Used to cancel the waiting-for-debugging state.| 442| -g/--get | - | Used to obtain the bundle name and persistence flag of an application in the waiting-for-debugging state.| 443 444 **Return value** 445 446 Returns "app debug successfully." if the operation is successful; returns "error: not developer mode." if the operation fails because the application is not in developer mode; returns "error: failed to app debug." if the operation fails due to other reasons. 447 448 **Error codes** 449 450| ID| Error Message| 451| ------- | -------- | 452| 10105003 | Failed to connect to the app service. | 453| 10106001 | The current device is not in developer mode. | 454| 10106701 | The target application is not a debug application. | 455 456 **Example** 457 458 ```bash 459 # Display the help information. 460 aa appdebug -h 461 462 # Set the waiting-for-debugging state for an application. 463 aa appdebug -b com.example.myapplication [-p] 464 465 # Cancel the waiting-for-debugging state. 466 aa appdebug -c 467 468 # Obtain the bundle name and persistence flag of an application in the waiting-for-debugging state. 469 # Example of the obtained information: bundle name: com.example.publishsystem, persist: false 470 aa appdebug -g 471 ``` 472 473## process 474 475Debugs or optimizes an application. In DevEco Studio, this command is used to integrate debugging and optimization tools. 476 477```bash 478# Debug an application. 479aa process -b <bundleName> -a <abilityName> [-m <moduleName>] [-D <debug-cmd>] [-S] 480 481# Optimize an application. 482aa process -b <bundleName> -a <abilityName> [-m <moduleName>] [-p <perf-cmd>] [-S] 483``` 484 485 **Parameters** 486| Name| Description| 487| -------- | -------- | 488| -h/--help | Help information.| 489| -b | Bundle name. This parameter is mandatory.| 490| -a | Ability name. This parameter is mandatory.| 491| -m | Module name. This parameter is optional.| 492| -p | Optimization mode. This parameter is optional. Either this parameter or **-D** must be specified. This command can be customized.| 493| -D | Debugging mode. This parameter is optional. Either this parameter or **-p** must be specified. This command can be customized.| 494| -S | Used to enter the application sandbox. This parameter is optional.| 495 496 **Return value** 497 498 Returns "start native process successfully." if this command is executed successfully; returns "start native process successfully." if this command fails to be executed; returns "start native process successfully." and prints the help information if the specified parameter is invalid. 499 500| ID| Error Message| 501| ------- | -------- | 502| 10105002 | Failed to obtain ability information. | 503| 10105003 | Failed to connect to the app service. | 504| 10106002 | The target application does not support debug mode. | 505 506 **Example** 507 508 ```bash 509 # Debug an application. 510 aa process -b com.example.myapplication -a EntryAbility -D debug_cmd [-S] 511 512 # Optimize an application. 513 aa process -b com.example.myapplication -a EntryAbility -p perf-cmd [-S] 514 ``` 515 516## Error Codes 517 518### 10103001 Failed to Verify the Visibility of the Target Ability 519 520**Error Message** 521 522Failed to verify the visibility of the target ability. 523 524**Symptom** 525 526The verification of the target ability visibility fails. 527 528**Possible Causes** 529 530The **exported** field of the [abilities](../quick-start/module-configuration-file.md#abilities) or [extensionAbilities](../quick-start/module-configuration-file.md#extensionabilities) tag in the **module.json5** file is set to **false**. As a result, the corresponding UIAbility or ExtensionAbility component cannot be invoked by other applications or started by the aa command. 531 532**Solution** 533 534Check whether the **exported** field of the ability in the **module.json5** file of the target application is **true**. If not, change it to **true** and try again. 535 536### 10104001 The Ability Does Not Exist 537**Error Message** 538 539The specified ability does not exist. 540 541**Symptom** 542 543The specified ability name does not exist. 544 545**Possible Causes** 546 547The specified ability is not installed. 548 549**Solution** 550 5511. Check whether the **-a** parameter **abilityName** and the **-b** parameter **bundleName** in the aa command are correct. 5522. Checks whether the **application** corresponding to the specified **bundleName** is installed. You can run the following command to query the list of installed applications. If **bundleName** is not in the query result, the application is not installed. 553 ``` 554 hdc shell bm dump -a 555 ``` 5563. For a multi-HAP application, check whether the HAP to which the ability belongs is installed. You can run the following command to query the bundle information. If the installed application does not contain the corresponding HAP and ability, the HAP to which the ability belongs is not installed. 557 ``` 558 hdc shell bm dump -n bundleName 559 ``` 560 561### 10105001 Failed to Connect to the Ability Service 562 563**Error Message** 564 565Failed to connect to the ability service. 566 567**Symptom** 568 569The connection to the Ability service fails. 570 571**Possible Causes** 572 573The Ability service is disconnected when the API is called. 574 575**Solution** 576 577Restart the device and try again. 578 579### 10105002 Failed to Obtain Ability Information 580 581**Error Message** 582 583Failed to obtain ability information. 584 585**Symptom** 586 587The Ability information fails to be obtained. 588 589**Possible Causes** 590 591The **AbilityInfo** obtained through BMS is empty when the ability request is generated. 592 593**Solution** 594 595Checks whether the **application** corresponding to the specified **bundleName** is installed. You can run the following command to query the list of installed applications. If **bundleName** is not in the query result, the application is not installed. 596 597 ``` 598 hdc shell bm dump -a 599 ``` 600 601### 10105003 Failed to Connect to the Application Service 602 603**Error Message** 604 605Failed to connect to the app service. 606 607**Symptom** 608 609The connection to the app service fails. 610 611**Possible Causes** 612 613The application service is disconnected when the API is called. 614 615**Solution** 616 617Restart the device. 618 619### 10106001 The Current Device Is Not in Developer Mode 620 621**Error Message** 622 623The current device is not in developer mode. 624 625**Symptom** 626 627The current device is not in developer mode. 628 629**Possible Causes** 630 631The current device is not in developer mode. 632 633**Solution** 634 635Enable the developer mode in **Settings**. 636 637### 10106002 The Target Application Does Not Support the Debug Mode 638 639**Error Message** 640 641The target application does not support debug mode. 642 643**Symptom** 644 645The target application does not support the debug mode. 646 647**Possible Causes** 648 649The **type** parameter in the signing tool of the target application is not **debug**. 650 651**Solution** 652 653Use the **debug** certificate to re-sign the HAP, install the newly signed HAP, and then run this command. 654 655### 10100101 Failed to Obtain Application Information 656 657**Error Message** 658 659Failed to obtain application information. 660 661**Symptom** 662 663The application information obtained from BMS is abnormal. 664 665**Possible Causes** 666 667The application name or bundle name in the app information obtained from BMS is incorrect. 668 669**Solution** 670 6711. Check whether the **-a** parameter **abilityName** and the **-b** parameter **bundleName** in the aa command are correct. 6722. Checks whether the **application** corresponding to the specified **bundleName** is installed. You can run the following command to query the list of installed applications. If **bundleName** is not in the query result, the application is not installed. 673 ``` 674 hdc shell bm dump -a 675 ``` 6763. For a multi-HAP application, check whether the HAP to which the ability belongs is installed. You can run the following command to query the bundle information. If the installed application does not contain the corresponding HAP and ability, the HAP to which the ability belongs is not installed. 677 ``` 678 hdc shell bm dump -n bundleName 679 ``` 680 681### 10100102 UIExtensionAbility Cannot Be Launched Using the aa start Command 682 683**Error Message** 684 685The aa start command cannot be used to launch a UIExtensionAbility. 686 687**Symptom** 688 689The aa tool cannot launch a UIExtensionAbility. 690 691**Possible Causes** 692 693The aa start command cannot be used to launch the UIExtensionAbility. 694 695**Solution** 696 697Check whether the target ability is a UIExtensionAbility. The aa start command cannot start the UIExtensionAbility. 698 699### 10103101 No Matching Application Is Found During Implicit Launch 700 701**Error Message** 702 703Failed to find a matching application for implicit launch. 704 705**Symptom** 706 707A matching ability is not found during implicit launch. 708 709**Possible Causes** 710 711* The implicit launch parameters are incorrectly configured or the specified HAP is not installed. 712* If the application is launched explicitly, it is possible that **bundleName** is specified but **abilityName** is not specified in the command. 713 714**Solution** 715 716* For implicit launch, ensure that the launch parameters are set correctly and the specified HAP is installed. 717* For explicit launch, ensure that the value of **abilityName** is correct. 718 719### 10103102 The Value of AppCloneIndex Is Invalid 720 721**Error Message** 722 723The passed appCloneIndex is invalid. 724 725**Symptom** 726 727The value of **appCloneIndex** is invalid. 728 729**Possible Causes** 730 731The **AppCloneIndex** parameter in the aa start command is invalid. 732 733**Solution** 734 735Check whether the **AppCloneIndex** parameter is valid. 736 737### 10106101 Waiting for the Previous Abilities to Finish Startup 738 739**Error Message** 740 741Another ability is being started. Wait until it finishes starting. 742 743**Symptom** 744 745Too many abilities need to be started. Due to the limited processing capability of the system, the requests are cached in the queue and processed in sequence. 746 747**Possible Causes** 748 749The system has a large number of concurrent requests. 750 751**Solution** 752 753No action is required. Wait for the previous abilities to finish startup. 754 755### 10106102 The Device Is Locked During Application Launch 756 757**Error Message** 758 759The device screen is locked during the application launch. 760 761**Symptom** 762 763The device is locked during application launch. 764 765**Possible Causes** 766 767The device cannot be unlocked during application launch. 768 769**Solution** 770 771Unlock the device and launch the application. 772 773### 10106103 The Target Application Is an Expired Crowdtesting Application 774 775**Error Message** 776 777The target application is an expired crowdtesting application. 778 779**Symptom** 780 781The target application is an expired crowdtesting application. 782 783**Possible Causes** 784 785The crowdtesting application has expired. 786 787**Solution** 788 789Check whether the crowdtesting application has expired. Expired crowdtesting applications cannot be started. 790 791### 10106105 The Target Application Is Controlled 792 793**Error Message** 794 795The target application is under control. 796 797**Symptom** 798 799The application is controlled by the application market. 800 801**Possible Causes** 802 803The target application is suspected to have malicious behavior and is not allowed to start due to application market control. 804 805**Solution** 806 807It is recommended that end users uninstall the application. 808 809### 10106106 The Target Application Is Managed by EDM 810 811**Error Message** 812 813The target application is managed by EDM. 814 815**Symptom** 816 817This target application is managed by Enterprise Device Management (EDM). 818 819**Possible Causes** 820 821The target application is forbidden to start by EDM. 822 823**Solution** 824 825The device is an enterprise device, and the target application is forbidden to start. You cannot handle it. 826 827### 10106107 The Current Device Does Not Support Window Options 828 829**Error Message** 830 831The current device does not support using window options. 832 833**Symptom** 834 835The device does not support window options. 836 837**Possible Causes** 838 839The device does not support **WindowOptions** specified in the aa start command. 840 841**Solution** 842 843Delete the **wl**, **wt**, **wh**, and **ww** parameters from the aa start command. 844 845### 10107102 Process Permission Verification Failure 846 847**Error Message** 848 849Permission verification failed for the specified process. 850 851**Symptom** 852 853Permission verification for the specified process fails. 854 855**Possible Causes** 856 857Permission verification for the specified process fails. 858 859**Solution** 860 861Check whether the permission of the specified process is correct. 862 863### 10108101 Internal Error During Ability Launch 864 865**Error Message** 866 867An internal error occurs while attempting to launch the ability. 868 869**Symptom** 870 871An error occurs during internal processing, such as memory application or multi-thread processing. 872 873**Possible Causes** 874 875Common kernel errors such as memory application and multi-thread processing errors occur. The specific causes are as follows: empty internal object, processing timeout, failure in obtaining application information, failing in obtaining the system service, and too many started ability instances. 876 877**Solution** 878 879You cannot handle internal errors that occur during system running. 880 881### 10103201 The Target Ability Is Not of the ServiceAbility Type 882 883**Error Message** 884 885The target ability is not of the ServiceAbility type. 886 887**Symptom** 888 889The target ability is not of the ServiceAbility type. 890 891**Possible Causes** 892 893When the **aa stop** command is used to stop a ServiceAbility, the ability specified by **abilityName** in the **-a** parameter is not a ServiceAbility. 894 895**Solution** 896 897Check whether the ability corresponding to the **abilityName** parameter in the **aa -a** command is a ServiceAbility. 898 899### 10104002 Failed to Obtain Information About a Specified Bundle 900 901**Error Message** 902 903Failed to retrieve specified package information. 904 905**Symptom** 906 907Information about the specified bundle fails to be obtained. 908 909**Possible Causes** 910 911The application corresponding to the specified bundle name is not installed. 912 913**Solution** 914 9151. Check whether the specified bundle name is correct. 9162. Check whether the application corresponding to the specified **bundleName** is installed. You can run the following command to query the list of installed applications. If **bundleName** is not in the query result, the application is not installed. 917 ``` 918 hdc shell bm dump -a 919 ``` 920 921### 10106401 Failed to Terminate the Process 922 923**Error Message** 924 925Failed to terminate the process. 926 927**Symptom** 928 929The process fails to be terminated. 930 931**Possible Causes** 932 9331. The application specified by the **aa force-stop** command does not exist. 9342. AppManagerService is not connected. 935 936**Solution** 937 9381. Check whether the application corresponding to the specified **bundleName** is installed. You can run the following command to query the list of installed applications. If **bundleName** is not in the query result, the application is not installed. 939 940 ``` 941 hdc shell bm dump -a 942 ``` 9432. Restart the device. 944 945### 10106402 Persistent Processes Cannot Be Terminated 946 947**Error Message** 948 949Persistent processes cannot be terminated. 950 951**Symptom** 952 953Persistent processes cannot be killed. 954 955**Possible Causes** 956 957The process specified by **bundleName** in the **aa force-stop** command is a persistent process. 958 959**Solution** 960 961Check whether the target application is a persistent process. Persistent processes cannot be terminated by running commands. 962 963**Solution** 964 965Close the multiple instances of the target application and try again. 966 967### 10108501 Internal Error During the Execution of the aa test Command 968 969**Error Message** 970 971An internal error occurs during the execution of the aa test command. 972 973**Symptom** 974 975An error occurs during internal processing, such as memory application or multi-thread processing. 976 977**Possible Causes** 978 979Common kernel errors such as memory application and multi-thread processing errors occur. The specific causes are as follows: empty internal object, processing timeout, and failing in obtaining the system service. 980 981**Solution** 982 983You cannot handle internal errors that occur during system running. 984 985### 10108601 Internal Error During Entering or Exiting the Debug Mode 986 987**Error Message** 988 989An internal error occurs while attempting to enter/exit debug mode. 990 991**Symptom** 992 993An error occurs during internal processing, such as memory application or multi-thread processing. 994 995**Possible Causes** 996 997Common kernel errors such as memory application and multi-thread processing errors occur. The specific causes are as follows: empty internal object, processing timeout, and failing in obtaining the system service. 998 999**Solution** 1000 1001You cannot handle internal errors that occur during system running. 1002 1003### 10103601 The Specified Bundle Name Does Not Exist 1004 1005**Error Message** 1006 1007The specified bundleName does not exist. 1008 1009**Symptom** 1010 1011The specified bundle name is not found. 1012 1013**Possible Causes** 1014 1015The bundle name specified by the **aa attach** or **aa detach** command does not exist. 1016 1017**Solution** 1018 1019Check whether the application corresponding to the specified **bundleName** is installed. You can run the following command to query the list of installed applications. If **bundleName** is not in the query result, the application is not installed. 1020 1021 ``` 1022 hdc shell bm dump -a 1023 ``` 1024 1025### 10106701 The Target Application Is Not a Debug Application 1026 1027**Error Message** 1028 1029The target application is not a debug application. 1030 1031**Symptom** 1032 1033The target application is not a debug application. 1034 1035**Possible Causes** 1036 1037The value of the **type** parameter in the signing tool is not **debug**. 1038 1039**Solution** 1040 1041Use the **debug** certificate to re-sign the HAP, install the newly signed HAP, and then run this command. 1042For details about the signing tool and certificate, see [Signing Your App/Atomic Service](https://developer.huawei.com/consumer/en/doc/harmonyos-guides/ide-signing). 1043