未验证 提交 69c3db92 编写于 作者: O openharmony_ci 提交者: Gitee

!15417 翻译完成:14800 tools资料修改

Merge pull request !15417 from wusongqing/cherry-pick-1677748050
# Ability Assistant
The Ability Assistant provides the application debugging and testing capabilities that enable you to start applications and test cases. With this tool, you can send commands (started with **aa**) in the hdc shell to perform various system operations, such as starting application components, forcibly stopping processes, and printing application component information.
The ability assistant enables you 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.
> **NOTE**
>
> Before using this tool, you must obtain the [hdc tool](../../device-dev/subsystems/subsys-toolchain-hdc-guide.md) and run the hdc shell command.
- help
Displays help information for the Ability Assistant.
**Return value**
Returns the help information.
**Method**
```bash
aa help
```
Displays help information for the Ability Assistant.
**Return value**
Returns the help information.
**Method**
```bash
aa help
```
- 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 **visible** tag in the configuration file of the target component cannot be set to **false**.
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 **visible** tag in the configuration file of the target component cannot be set to **false**.
| Name| Description|
| -------- | -------- |
| -h/--help | Help information.|
| -d | Device ID. Optional.|
| -a | Ability name. Mandatory.|
| -b | Bundle name. Mandatory.|
| -D | Debugging mode. Optional.|
**Return value**
Returns "start ability successfully." if the ability is started; returns "error: failed to start ability." and the corresponding error information otherwise.
**Method**
```bash
aa start [-d <deviceId>] -a <abilityName> -b <bundleName> [-D]
```
| -D | Debugging mode. Optional.|
**Return value**
Returns "start ability successfully." if the ability is started; returns "error: failed to start ability." and the corresponding error information otherwise.
**Method**
```bash
aa start [-d <deviceId>] -a <abilityName> -b <bundleName> [-D]
```
- stop-service
Stops a ServiceAbility.
Stops a ServiceAbility.
| Name| Description|
| -------- | -------- |
| -h/--help | Help information.|
| -d | Device ID. Optional.|
| -a | Ability name. Mandatory.|
| -b | Bundle name. Mandatory.|
**Return value**
Returns "stop service ability successfully." if the ServiceAbility is stopped; returns "error: failed to stop service ability." otherwise.
**Method**
```bash
aa stop-service [-d <deviceId>] -a <abilityName> -b <bundleName>
```
| -b | Bundle name. Mandatory.|
**Return value**
Returns "stop service ability successfully." if the ServiceAbility is stopped; returns "error: failed to stop service ability." otherwise.
**Method**
```bash
aa stop-service [-d <deviceId>] -a <abilityName> -b <bundleName>
```
- dump
Prints information about an application component.
Prints information about an application component.
| Name| Level-2 Parameter| Description|
| -------- | -------- | -------- |
| -h/--help | - | Help information.|
| -a/--all | - | Application component information in all missions.|
| -l/--mission-list | type (All logs are printed if this parameter is left unspecified.)| Mission stack information.<br>The following values are available for **type**:<br>- NORMAL<br>- DEFAULT_STANDARD<br>- DEFAULT_SINGLE<br>- LAUNCHER |
| -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, 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 **standard** 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. |
| -e/--extension | elementName | Extended component information.|
| -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**.|
| -d/--data | - | DataAbility information.|
| -i/--ability | AbilityRecord ID | Detailed information about an application component.|
| -i/--ability | AbilityRecord ID | Detailed information about an application component.|
| -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**.|
**Method**
```bash
aa dump -a
```
![aa-dump-a](figures/aa-dump-a.png)
```bash
aa dump -l
```
```bash
aa dump -a
```
![aa-dump-l](figures/aa-dump-l.png)
![aa-dump-a](figures/aa-dump-a.png)
```bash
aa dump -i 12
```
```bash
aa dump -l
```
![aa-dump-i](figures/aa-dump-i.png)
- force-stop
![aa-dump-l](figures/aa-dump-l.png)
Forcibly stops a process based on the bundle name.
**Return value**
Returns "force stop process successfully." if the process is forcibly stopped; returns "error: failed to force stop process." otherwise.
**Method**
```bash
aa dump -i 12
```
![aa-dump-i](figures/aa-dump-i.png)
```bash
aa force-stop <bundleName>
```
- force-stop
Forcibly stops a process based on the bundle name.
**Return value**
Returns "force stop process successfully." if the process is forcibly stopped; returns "error: failed to force stop process." otherwise.
**Method**
```bash
aa force-stop <bundleName>
```
# Advanced Notification Manager
The Advanced Notification Manager provides the notification debugging and testing capabilities that enable you to print notifications and set notification parameters. With this tool, you can send commands (started with **anm**) in the hdc shell to perform various system operations, such as printing notification details, setting the number of cached notifications, and enabling the notification capability.
The Advanced Notification Manager enables you to print notifications and set notification parameters. It provides the notification debugging and testing capabilities, for example, printing published notification details, setting the number of notification caches, and enabling the notification functionality.
> **NOTE**
>
> Before using this tool, you must obtain the [hdc tool](../../device-dev/subsystems/subsys-toolchain-hdc-guide.md) and run the hdc shell command.
### help
......
# Bundle Manager
The Bundle Manager provides the bundle debugging and testing capabilities that enable you to install, uninstall, update, and query a bundle (application). With this tool, you can send commands (started with **bm**) in the hdc shell to perform various system operations, such as installing and uninstalling a bundle and querying bundle information.
The 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.
> **NOTE**
>
> Before using this tool, you must obtain the [hdc tool](../../device-dev/subsystems/subsys-toolchain-hdc-guide.md) and run the hdc shell command.
**Table 1** bm commands
......@@ -41,6 +46,7 @@ bm help
bm install [-h] [-p path] [-u userId] [-r] [-w waitting-time]
```
**Table 3** Installation command parameters
| Name| Mandatory| Description|
......@@ -67,6 +73,7 @@ install bundle successfully.
bm uninstall [-h help] [-n bundleName] [-m moduleName] [-u userId] [-k]
```
**Table 4** Uninstall command parameters
| Name| Mandatory| Description|
......@@ -81,7 +88,7 @@ bm uninstall [-h help] [-n bundleName] [-m moduleName] [-u userId] [-k]
Example
```bash
bm uninstall -n com.ohos.app -m com.ohos.app.EntryAbility -u 100 -k
bm uninstall -n com.ohos.app -m com.ohos.app.MainAbility -u 100 -k
// The execution result is as follows:
uninstall bundle successfully.
```
......@@ -96,6 +103,7 @@ bm dump [-h help] [-a] [-n bundleName] [-s shortcutInfo] [-u userId] [-d deviceI
If **-u** is not specified, the command applies to all users.
**Table 5** Dump command parameters
| Name| Mandatory| Description|
......@@ -131,6 +139,7 @@ bm clean [-h] [-c] [-n bundleName] [-d] [-u userId]
If **-u** is not specified, the command applies to all active users.
**Table 6** Clean command parameters
| Name| Description|
......@@ -164,6 +173,7 @@ bm enable [-h] [-n bundleName] [-a abilityName] [-u userId]
If **-u** is not specified, the command applies to all active users.
**Table 7** Enable command parameters
| Name| Description|
......@@ -178,7 +188,7 @@ Example
```bash
# Enable a bundle.
bm enable -n com.ohos.app -a com.ohos.app.EntryAbility -u 100
bm enable -n com.ohos.app -a com.ohos.app.MainAbility -u 100
// The execution result is as follows:
enable bundle successfully.
```
......@@ -193,6 +203,7 @@ bm disable [-h] [-n bundleName] [-a abilityName] [-u userId]
If **-u** is not specified, the command applies to all active users.
**Table 8** Disabled command parameters
| Name| Description|
......@@ -206,7 +217,7 @@ Example
```bash
# Disable a bundle.
bm disable -n com.ohos.app -a com.ohos.app.EntryAbility -u 100
bm disable -n com.ohos.app -a com.ohos.app.MainAbility -u 100
// The execution result is as follows:
disable bundle successfully.
```
......@@ -218,6 +229,7 @@ disable bundle successfully.
bm get [-h] [-u]
```
**Table 9** Parameters used in the command for obtaining the UDID
| Name| Description|
......@@ -243,6 +255,7 @@ udid of current device is :
bm quickfix [-h] [-a -f filePath] [-q -b bundleName]
```
**Table 10** Parameters used in the command for quick fix
| Name| Description|
......
# Common Event Manager
The Common Event Manager provides the common event debugging and testing capabilities that enable you to print common event information and publish common events. With this tool, you can send commands (started with **cem**) in the hdc shell to perform various system operations, such as printing all common event subscribers, sent common events, and recipients, as well as publishing common events.
The Common Event Manager enables you to print common event information and publish common events. It provides the common event debugging and testing capabilities, for example, printing all public event subscribers, sent public events, and recipients, and simulating public event release.
> **NOTE**
>
> Before using this tool, you must obtain the [hdc tool](../../device-dev/subsystems/subsys-toolchain-hdc-guide.md) and run the hdc shell command.
## Commands
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册