提交 357b8ac5 编写于 作者: E ester.zhou

update bundle-management.md

Signed-off-by: Nester.zhou <ester.zhou@huawei.com>
上级 65ad2d8d
...@@ -11,7 +11,7 @@ Below is the architecture of the Bundle Management subsystem. ...@@ -11,7 +11,7 @@ Below is the architecture of the Bundle Management subsystem.
## Responsibilities of Modules ## Responsibilities of Modules
| Module Name | Description | | Module | Description |
| ---------------- | ------------------------------------------------------------ | | ---------------- | ------------------------------------------------------------ |
| Bundle management interface module | 1. Provides external interfaces for installation, update, uninstallation, and notification.<br>2. Provides external interfaces for querying bundle, component, and permission information.<br>3. Provides external interfaces for querying application permissions.<br>4. Provides external interfaces for clearing data.| | Bundle management interface module | 1. Provides external interfaces for installation, update, uninstallation, and notification.<br>2. Provides external interfaces for querying bundle, component, and permission information.<br>3. Provides external interfaces for querying application permissions.<br>4. Provides external interfaces for clearing data.|
| Scanning module | 1. Scans pre-installed applications.<br>2. Scans installed third-party applications.<br>3. Parses bundle configuration files.| | Scanning module | 1. Scans pre-installed applications.<br>2. Scans installed third-party applications.<br>3. Parses bundle configuration files.|
...@@ -27,24 +27,24 @@ Below is the architecture of the Bundle Management subsystem. ...@@ -27,24 +27,24 @@ Below is the architecture of the Bundle Management subsystem.
## Directory Structure ## Directory Structure
``` ```
foundation/appexecfwk/standard foundation/bundlemanager/bundle_framework
├── kits ├── bundle_tool # bm code
│   └── appkit # Core code for Appkit implementation ├── distributed_bundle_framework # Framework code of the distributed bundle management service
├── common ├── common
   └── log # Log component └── log # Log component
├── interfaces ├── interfaces
│   └── innerkits # Internal interfaces │ ├── inner_api # Internal APIs
├── services │ └── kits # Application APIs
│   └── bundlemgr # Framework code of the bundle management service │ ├── js # JS APIs
│   └── dbms # Framework code of the distributed bundle management service │ └── native # C/C++ APIs
├── services # Framework code of the bundle management service
├── test # Testing ├── test # Testing
└── tools # bm commands
``` ```
### bm Commands ### bm Commands
bm is a tool used to facilitate debugging. It is encapsulated in the HDC tool. You can use it by running bm commands in the HDC shell. bm is a tool used to facilitate debugging. It is encapsulated in the HDC tool. You can use it by running bm commands in the HDC shell.
| Command| Description| | Command | Description |
| ------- | ---------- | | ------- | ---------- |
| help | Displays the commands supported by the bm tool.| | help | Displays the commands supported by the bm tool.|
| install | Installs an application.| | install | Installs an application.|
...@@ -55,7 +55,7 @@ bm is a tool used to facilitate debugging. It is encapsulated in the HDC tool. Y ...@@ -55,7 +55,7 @@ bm is a tool used to facilitate debugging. It is encapsulated in the HDC tool. Y
| disable | Disables an application.| | disable | Disables an application.|
| get | Obtains the UDID of a device.| | get | Obtains the UDID of a device.|
#### Help Command #### Help Command
| Command| Description| | Command | Description |
| ------- | ---------- | | ------- | ---------- |
| bm help | Displays the commands supported by the bm tool.| | bm help | Displays the commands supported by the bm tool.|
...@@ -66,11 +66,11 @@ bm help ...@@ -66,11 +66,11 @@ bm help
``` ```
#### Installation Command #### Installation Command
This command can be run with different options to achieve different purposes. The table below lists some examples. This command can be run with different options to achieve different purposes. The table below lists some examples.
| Command| Description| | Command | Description |
| ----------------------------------- | -------------------------- | | ----------------------------------- | -------------------------- |
| bm install -h | Displays the commands supported by **install**.| | bm install -h | Displays the commands supported by **install**.|
| bm install -p <hap-file-path>    | Installs HAPs. You can specify a path to install one or more HAPs at the same time.| | bm install -p <hap-file-path> | Installs HAPs. You can specify a path to install one or more HAPs at the same time.|
| bm install -p <hap-file-path> -u <user-id>   |Installs a HAP for a specified user.| | bm install -p <hap-file-path> -u <user-id> |Installs a HAP for a specified user.|
| bm install -r -p <hap-file-path> | Installs a HAP in overwrite mode.| | bm install -r -p <hap-file-path> | Installs a HAP in overwrite mode.|
| bm install -r -p <hap-file-path> -u <user-id> | Installs a HAP for a specified user in overwrite mode.| | bm install -r -p <hap-file-path> -u <user-id> | Installs a HAP for a specified user in overwrite mode.|
...@@ -83,23 +83,26 @@ bm install -p /data/app/ohosapp.hap -r ...@@ -83,23 +83,26 @@ bm install -p /data/app/ohosapp.hap -r
``` ```
#### Uninstallation Command #### Uninstallation Command
This command can be run with different options to achieve different purposes. The table below lists some examples. If **-u** is not specified, the command applies to all users. This command can be run with different options to achieve different purposes. The table below lists some examples. If **-u** is not specified, the command applies to all users.
| Command| Description| | Command | Description |
| ----------------------------- | ------------------------ | | ----------------------------- | ------------------------ |
| bm uninstall -h | Displays the commands supported by **uninstall**.| | bm uninstall -h | Displays the commands supported by **uninstall**.|
| bm uninstall -n <bundle-name> | Uninstalls an application based on the specified bundle name.| | bm uninstall -n <bundle-name> | Uninstalls an application based on the specified bundle name.|
| bm uninstall -n <bundle-name> -k | Uninstalls an application based on the specified bundle name, while retaining the data directory of the application.|
| bm uninstall -n <bundle-name> -u <user-id>| Uninstalls an application based on the specified bundle name and user.| | bm uninstall -n <bundle-name> -u <user-id>| Uninstalls an application based on the specified bundle name and user.|
| bm uninstall -n <bundle-name> -m <module-name> | Uninstalls a specific module of an application based on the specified bundle name.| | bm uninstall -n <bundle-name> -m <moudle-name> | Uninstalls a specific module of an application based on the specified bundle name.|
* Example * Example
```Bash ```Bash
# Uninstall a HAP. # Uninstall a HAP.
bm uninstall -n com.ohos.app bm uninstall -n com.ohos.app
# Uninstall a HAP while retaining its data directory.
bm uninstall -n com.ohos.app -k
# Uninstall an ability of the HAP. # Uninstall an ability of the HAP.
bm uninstall -n com.ohos.app -m com.ohos.app.MainAbility bm uninstall -n com.ohos.app -m com.ohos.app.MainAbility
``` ```
#### Query Command #### Query Command
This command can be run with different options to achieve different purposes. The table below lists some examples. If **-u** is not specified, the command applies to all users. This command can be run with different options to achieve different purposes. The table below lists some examples. If **-u** is not specified, the command applies to all users.
| Command| Description| | Command | Description |
| ---------- | -------------------------- | | ---------- | -------------------------- |
| bm dump -h | Displays the commands supported by **dump**.| | bm dump -h | Displays the commands supported by **dump**.|
| bm dump -a | Queries all applications installed in the system.| | bm dump -a | Queries all applications installed in the system.|
...@@ -117,8 +120,8 @@ bm dump -a ...@@ -117,8 +120,8 @@ bm dump -a
bm dump -n com.ohos.app bm dump -n com.ohos.app
``` ```
#### Clean Command #### Clean Command
If **-u** is not specified, the command applies to all active users. -If **-u** is not specified, the command applies to all active users.
| Command| Description| | Command | Description |
| ---------- | -------------------------- | | ---------- | -------------------------- |
| bm clean -h | Displays the commands supported by **clean**.| | bm clean -h | Displays the commands supported by **clean**.|
| bm clean -n <bundle-name> -c | Clears the cache data of the specified bundle.| | bm clean -n <bundle-name> -c | Clears the cache data of the specified bundle.|
...@@ -134,8 +137,8 @@ bm clean -n com.ohos.app -c ...@@ -134,8 +137,8 @@ bm clean -n com.ohos.app -c
bm clean -n com.ohos.app -d bm clean -n com.ohos.app -d
``` ```
#### Enable Command #### Enable Command
If **-u** is not specified, the command applies to all active users. -If **-u** is not specified, the command applies to all active users.
| Command| Description| | Command | Description |
| ---------- | -------------------------- | | ---------- | -------------------------- |
| bm enable -h | Displays the commands supported by **enable**.| | bm enable -h | Displays the commands supported by **enable**.|
| bm enable -n <bundle-name> | Enables the application that matches the specified bundle name.| | bm enable -n <bundle-name> | Enables the application that matches the specified bundle name.|
...@@ -148,8 +151,8 @@ If **-u** is not specified, the command applies to all active users. ...@@ -148,8 +151,8 @@ If **-u** is not specified, the command applies to all active users.
bm enable -n com.ohos.app bm enable -n com.ohos.app
``` ```
#### Disable Command #### Disable Command
If **-u** is not specified, the command applies to all active users. -If **-u** is not specified, the command applies to all active users.
| Command| Description| | Command | Description |
| ---------- | -------------------------- | | ---------- | -------------------------- |
| bm disable -h | Displays the commands supported by **disable**.| | bm disable -h | Displays the commands supported by **disable**.|
| bm disable -n <bundle-name> | Disables the application that matches the specified bundle name.| | bm disable -n <bundle-name> | Disables the application that matches the specified bundle name.|
...@@ -162,7 +165,7 @@ If **-u** is not specified, the command applies to all active users. ...@@ -162,7 +165,7 @@ If **-u** is not specified, the command applies to all active users.
bm disable -n com.ohos.app bm disable -n com.ohos.app
``` ```
#### Command for Obtaining the UDID #### Command for Obtaining the UDID
| Command| Description| | Command | Description |
| ---------- | -------------------------- | | ---------- | -------------------------- |
| bm get -h | Displays the commands supported by **get**.| | bm get -h | Displays the commands supported by **get**.|
| bm get -u | Obtains the UDID of a device.| | bm get -u | Obtains the UDID of a device.|
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册