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

!15415 翻译完成:14305+14795 新增restool文档

Merge pull request !15415 from wusongqing/TR14305
......@@ -7,3 +7,4 @@
- [Unpacking Tool](unpacking-tool.md)
- [Common Event Manager](cem-tool.md)
- [Advanced Notification Manager](anm-tool.md)
- [restool](restool.md)
# 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
......
# 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|
......@@ -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|
......@@ -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|
......@@ -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
......
# restool
## Overview
restool is a resource compilation tool that creates resource indexes and parses resources by compiling resource files. The tool is stored in the **toolchains** subdirectory of the SDK installation directory.
## Description
The tool supports the following command options.
| Option| Default Value Allowed| Argument Carried| Description|
| -------- | -------- | -------- | -------- |
| -i | No| Yes| Resource directory or resource intermediate file directory to create. The same command can run multiple times.|
| -j | No| Yes| Path of the **config.json** or **module.json** file.|
| -o | No| Yes| Output path of the compiled resource.|
| -p | No| Yes| Bundle name of the compiled resource.|
| -r | No| Yes| Header file path of the resource. The header file can be in .txt, .js, or .h format.|
| -e | Yes| Yes| Start ID of the generated resource, for example, **0x01000000**. The value range is [0x01000000, 0x06FFFFFF),[0x08000000, 0x41FFFFFF).|
| -f | Yes| No| An existing output path will be forcibly deleted and a new one will be generated.|
| -h | Yes| No| Help information.|
| -m | Yes| Yes| Module name. During joint module compilation, multiple module names can be specified, separated by commas (,).|
| -x | Yes| Yes| Resource directory for generating intermediate files or a single resource path. The same command can run multiple times.|
| -z | Yes| No| Compilation result generated based on the resource directory.|
| -v | Yes| No| Tool version.|
| --ids | Yes| Yes| Output directory of the generated **id_defined.json** file.|
| --defined-ids | Yes| Yes| Path of the **id_defined.json** file. Generally, the file is generated by using **--ids**.<br>**id_defined.json** contains a list of resource types, names, and IDs.<br>You can customize resource IDs in **id_defined.json**.|
## Example
An example **entry** directory structure is as follows:
```
entry/src/main
| |----resource
| | |----base
| | | |----element
| | | |----media
| | | |----profile
| | |----rawfile
| |----config.json/module.json
```
Run the following command to build all resources:
```
restool -i entry/src/main -j entry/src/main/module.json -p com.ohos.demo -o out -r out/ResourceTable.txt -f
```
To build the resource incrementally (available only in preview mode), perform the following steps:
1. Generate resource middleware.
```
restool -x entry/src/main/resource -o out
```
2. Compile the middleware.
```
restool -i out1 -i out2 -o out -p com.ohos.demo -r out/ResourceTable.txt -j entry/src/main/module.json -f -z
```
The resource ID can be fixed in either of the following ways:
Method 1: Store the custom **id_defined.json** file in the **resource/base/element/** directory. After the build is successful, the generated ID is the same as the custom ID in the **id_defined.json** file.
Method 2: Run the **--ids** command to generate the **id_defined.json** file. The **--defined-ids** command specifies the **id_defined.json** file. After the build is successful, the generated ID is the same as the custom ID in the **id_defined.json** file.
Generate the **id_defined.json** file.
```
restool -i entry/src/main -j entry/src/main/module.json -p com.ohos.demo -o out -r out/ResourceTable.txt --ids out/id_defined.json -f
```
**id_defined.json** file with a fixed resource ID:
```
restool -i entry/src/main -j entry/src/main/module.json -p com.ohos.demo -o out1 -r out1/ResourceTable.txt --defined-ids out/id_defined.json -f
```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册