The packing tool packs compiled files for installation and release. The packing tool supports the generation of application packages (HAP), application sets (APP) to launch to the application market, quick fix packages (HQF), quick fix packages (APPQF) to launch to the application market, static shared libraries (HAR), and dynamic shared libraries (HSP). The unpacking tool is used to unpack the HAP, APP, HQF, APPQF, HAR, and HSP files and parse the HAP, HSP, APP, and APPQF files. Generally, the packing process is automatically carried out in DevEco Studio. However, you can also use the JAR package of the packing tool to pack files. The JAR package is stored in the **toolchains** directory in the SDK path.
The packing tool packs compiled files for installation and release. The packing tool supports the generation of HAP (an application package), APP (application set to launch to the application market), HQF (quick fix package), APPQF (quick fix package to launch to the application market ), HAR (static shared library), and HSP (dynamic shared library) files. The unpacking tool is used to unpack the HAP, APP, HQF, APPQF, HAR, and HSP files and parse the HAP, HSP, APP, and APPQF files. Generally, the packing process is automatically carried out in DevEco Studio. However, you can also use the JAR package of the packing tool to pack files. The JAR package is stored in the **toolchains** directory in the SDK path.
## Packing Commands
...
...
@@ -15,7 +15,7 @@ You can use the JAR package of the packing tool to generate an HAP file by impor
You can use the JAR package of the packing tool to generate an APP file by importing packing options and file paths. The APP file is used to release the application to the application market.
You can use the JAR package of the packing tool to generate an APP file by importing packing options and file paths. The APP file is used to release the application to the application market.
| --hap-path | Yes | NA | Path of the HAP file. The file name extension must be .hap. If there are multiple HAP files, separate them with commas (,).<br>The value can also be the directory (folder) where the HAP file is stored.|
| --hsp-path | No | NA | Path of the HSP file. The file name extension must be .hsp. If there are multiple HSP files, separate them with commas (,).<br>The value can also be the directory (folder) where the HSP file is stored.|
| --pack-info-path | Yes | NA | Path of the **pack.info** file. The file name must be **pack.info**. |
| --out-path | No | NA | Path of the target file. The file name extension must be .app. |
| --out-path | Yes | NA | Path of the target file. The file name extension must be .app. |
| --signature-path | No | NA | Path of the signature file. |
| --certificate-path | No | NA | Path of the certificate file. |
| --force | No | true or false| The default value is **false**. If the value is **true**, an existing target file will be forcibly deleted during packing. |
#### HAP Validity Check During APP Packing
When packing the HAP files in a project to generate an APP file, ensure that the values of **bundleName**, **versionCode**, **versionName**, **minCompatibleVersionCode**, **minAPIVersion**, **targetAPIVersion**, and **apiReleaseType** configured in each JSON file of the HAP are the same, and the value of **moduleName** is unique in all the JSON files. For the FA model, you must also ensure that the value of **package** is unique in all the JSON files.
When packing the HAP files in a project to generate an APP file, ensure that the values of **bundleName**, **versionCode**, **versionName**, **minCompatibleVersionCode**, **debug**, **minAPIVersion**, **targetAPIVersion**, and **apiReleaseType** configured in each JSON file of the HAP are the same, and the value of **moduleName** is unique in all the JSON files. For the FA model, you must also ensure that the value of **package** is unique in all the JSON files.
### Multi-project Packing
...
...
@@ -105,7 +105,7 @@ If multiple teams develop the same application but it is inconvenient to share c
| --hap-list | No | Path of the HAP files | Path of the HAP files. The file name extension must be .hap. If there are multiple HAP files, separate them with commas (,).<br>The value can also be the directory (folder) where the HAP file is stored. |
| --hsp-list | No | Path of the HSP files | Path of the HSP files. The file name extension must be .hsp. If there are multiple HSP files, separate them with commas (,).<br>The value can also be the directory (folder) where the HSP file is stored. |
| --app-list | No | Path of the APP files | Path of the APP files. The file name extension must be .app. If there are multiple APP files, separate them with commas (,).<br>The value can also be the directory (folder) where the APP file is stored.<br>You must specify **--hap-list**, **--hsp-list**, or **--app-list**, or any of their combinations.|
| --out-path | Yes | NA | Path of the target file. The file name extension must be .hqf.|
| --force | No | true or false| The default value is **false**. If the value is **true**, an existing target file will be forcibly deleted during packing. |
#### HAP Validity Check During Multi-project Packing
Ensure that the values of **bundleName**, **versionCode**, **versionName**, **minCompatibleVersionCode**, **minAPIVersion**, **targetAPIVersion**, and **apiReleaseType** configured in each JSON file of the HAP are the same, the value of **moduleName** is unique in all the JSON files, and the value of **entry** is unique for the same device. For the FA model, you must also ensure that the value of **package** is unique in all the JSON files.
Ensure that the values of **bundleName**, **versionCode**, **versionName**, **minCompatibleVersionCode**, **debug**, **minAPIVersion**, **targetAPIVersion**, **apiReleaseType**, **compileSdkVersion**, and **compileSdkType** configured in each JSON file of the HAP are the same, the value of **moduleName** is unique in all the JSON files, and the value of **entry** is unique for the same device. For the FA model, you must also ensure that the value of **package** is unique in all the JSON files.
### Packing Commands for HQF Files
...
...
@@ -129,7 +130,7 @@ If you find detects in the application and want to rectify the defects quickly,
| --json-path | Yes | NA | Path of the JSON file. The file name must be **patch.json**. |
| --lib-path | No | NA | Path of the library file. |
| --ets-path | No | NA | Path of the ETS file. |
| --ets-path | Yes | NA | Path of the ETS file. |
| --out-path | Yes | NA | Path of the target file. The file name extension must be .hqf. |
| --force | No | true or false| The default value is **false**. If the value is **true**, an existing target file will be forcibly deleted during packing.|
| --out-path | Yes | NA | Path of the target file. The file name extension must be .hsp. |
| --force | No | true or false| The default value is **false**. If the value is **true**, an existing target file will be forcibly deleted during packing. |
## Unpacking Commands
### Unpacking Commands for HAP Files
You can use the JAR package of the unpacking tool to unpack an HAP file by importing unpacking options and file paths.
| --rpcid | No | true or false| Whether to extract the rpcid file from the HAP file to a specified directory. If the value is **true**, only the rpcid file is extracted and the HAP file is not unpacked.|
| --out-path | Yes | NA | Path of the target files. |
| --force | No | true or false| The default value is **false**. If the value is **true**, an existing target file will be forcibly deleted during unpacking. |
### Unpacking Commands for HAR Files
You can use the JAR package of the unpacking tool to unpack an HAR file by importing unpacking options and file paths.
| --out-path | Yes | NA | Path of the target files. |
| --force | No | true or false| The default value is **false**. If the value is **true**, an existing target file will be forcibly deleted during unpacking.|
### Unpacking Commands for APP Files
You can use the JAR package of the unpacking tool to unpack an APP file by importing unpacking options and file paths.
| --out-path | Yes | NA | Path of the target files. |
| --force | No | true or false| The default value is **false**. If the value is **true**, an existing target file will be forcibly deleted during unpacking.|
### Obtaining the rpcid File from the HAP File
You can use the JAR package of the unpacking tool to unpack an HAP file to obtain the rpcid file by importing unpacking options and file paths.
| --rpcid | No | true or false| Whether to extract the rpcid file from the HAP file to a specified directory. If the value is **true**, only the rpcid file is extracted and the HAP file is not unpacked.|
| --hap-path | Yes | NA | Path of the HAP file. |
| --out-path | Yes | NA | Path of the target rpcid file. |
| --force | No | true or false| The default value is **false**. If the value is **true**, an existing target file will be forcibly deleted during unpacking. |
### Unpacking Commands for HSP Files
You can use the JAR package of the unpacking tool to unpack an HSP file by importing unpacking options and file paths.
| --out-path | Yes | NA | Path of the target files. |
| --force | No | true or false| The default value is **false**. If the value is **true**, an existing target file will be forcibly deleted during unpacking.|
### Unpacking Commands for APPQF Files
You can use the JAR package of the unpacking tool to unpack an APPQF file by importing unpacking options and file paths.
| --appqf-path | Yes | NA | Path of the APPQF file. |
| --out-path | Yes | NA | Path of the target files. |
| --force | No | true or false| The default value is **false**. If the value is **true**, an existing target file will be forcibly deleted during unpacking.|
## Package Parsing APIs
The package parsing APIs are used to parse an HAP file and obtain information such as the configuration file.
| UncompressEntrance | UncomperssResult parseApp(String appPath,String parseMode,String deviceType,String hapName) | Java| Function: Parses **pack.info** in the APP file.<br>Input parameters: **appPath**, which specifies the path of the APP file.<br>Return value: **UncomperssResult**.|
| UncompressEntrance | UncomperssResult parseApp(InputStream input,String parseMode,String deviceType,String hapName,String outPath) | Java| Function: Parses **pack.info** in the APP file.<br>Input parameters: **input**, which specifies the stream of the APP file.<br>Return value: **UncomperssResult**.|
| UncompressEntrance | UncomperssResult parseHap(String hapPath) | Java| Function: Parses the JSON file in the APP file.<br>Input parameters: **hapPath**, which specifies the path of the HAP file.<br>Return value: **UncomperssResult**. |
| UncompressEntrance | UncomperssResult parseHap(InputStream input) | Java| Function: Parses the JSON file in the APP file.<br>Input parameters: **input**, which specifies the stream of the HAP file.<br>Return value: **UncomperssResult**. |
| hapName | String | Name of the HAP file that is being parsed. | NA |
| appInfo | AppInfo struct (see **AppInfo Struct** below)| Struct of the application information. For details, see **AppInfo Struct** below. | NA |
| deviceConfig | Map\<String,DeviceConfig> | Device information. | The storage type is Map\<String,String>, which indicates the device type name and device type value, respectively. In the stage model, this field is stored in the **app** struct.|
| hapInfo | HapInfo struct (see **HapInfo Struct** below)| Module information in the HAP file. For details, see **HapInfo Struct** below.| NA |
| bundleName | String | Bundle name of the application. | NA |
| bundleType | String | Bundle type.<br>- **app**: The bundle is used for a common application.<br>- **atomicService**: The bundle is used for an atomic service.<br>- **shared**: The bundle is used for a shared library.| NA |
| vendor | String | Vendor of the application. | NA |
| releatedBundleName | String | Related bundle name of the application. | NA |
| versionName | String | Version name of the application. | NA |
| versionCode | String | Version code of the application. | NA |
| targetApiVersion | int | Target API version required for running the application. | NA |
| compatibleApiVersion | int | API version compatible with the application. | NA |
| appName | String | Label of the ability displayed on the home screen. | NA |
| releaseType | String | Release type of the target API version required for running the application. | NA |
| shellVersionCode | String | API version in HarmonyOS. | NA |
| shellVersionName | String | API version name in HarmonyOS. | NA |
| multiFrameworkBundle | String | Bundle name of the application in the dual-framework scenario. | NA |
| debug | boolean | Whether the application can be debugged. | NA |
| icon | String | Path of the application icon. | NA |
| label | String | Label of the application. | NA |
| description | String | Description of the application. | This field is newly added to the stage model.|
| minCompatibleVersionCode | int | Earliest compatible version of the application. | NA |
| distributedNotificationEnabled | boolean | Whether the distributed notification feature is enabled for the application. | This field is newly added to the stage model.|
| jointUserid | String | Shared user ID. | This field is unique to the FA model. |
| process | String | Process name of the application. | This field is unique to the FA model. |
| directLaunch | String | Whether the application can be started when the screen is locked. | NA |
| distributedNotificationEnabled | boolean | Whether the distributed notification feature is enabled for the application. | This field is unique to the stage model.|
| packageStr | String | Package information about the application. | This field is unique to the FA model. |
| name | String | Name of the module. | NA |
| description | String | Description of the HAP file. | This field is unique to the FA model. |
| supporteModes | List\<String> | Mode supported by the HAP file. | NA |
| abilities | Array of AbilityInfo | Ability information of the HAP file. | NA |
| distro | Distro Struct | Distro description of the HAP file. | NA |
| deviceType | List\<String> | Type of devices on which the HAP can run. | This field corresponds to **deviceTypes** in the stage model. |
| metadata | metaData struct (see **metaData Struct** below) | Custom metadata of the HAP. | NA |
| isJs | boolean | Whether the application is a JS application. | This field is unique to the FA model. |
| reqPermissions | ReqPermission struct array (see **ReqPermission** below) | Permissions requested by the application. | This field corresponds to **requestPermissions** in the stage model. |
| commonEvents | CommonEvent struct (see **CommonEvent Struct** below) | Static event. | NA |
| shortcuts | Shortcut struct array (see **Shortcut** below) | Shortcuts information of the application. | NA |
| distrofilter | DistroFilter struct | Information distributed by the application market by device form. | NA |
| srcEntrance | String | Entry code path of the application. | This field is newly added to the stage model. |
| process | String | Process name of the HAP. | This field is newly added to the stage model. |
| mainElement | String | Entry ability name or ExtensionAbility name of the HAP file.| This field is newly added to the stage model. In the FA model , the value of **mainAbility** is automatically assigned to **mainElement**.|
| unSyntax | String | Syntax type of a JS component. | This field is newly added to the stage model. |
| pages | List\<String> | Information about each page in a JS component. | This field is newly added to the stage model. |
| extensionAbilities | List\<ExtensionAbilityInfo> | ExtensionAbility information. | This field is newly added to the stage model. |
| abilityFormInfos | List\<AbilityFormInfo> | Widget information. | NA |
| moduleAtomicService| ModuleAtomicService struct (see **ModuleAtomicService Struct** below)| Atomic service information of the HAP. | NA |
| moduleName | String | Name of the module. | This field corresponds to the **moduleName** field under the **module** struct in the stage model. |
| moduleType | String | Type of the module. | This field corresponds to the **moduleType** field under the **module** struct in the stage model. |
| deliveryWithInstall | boolean | Whether the HAP is installed when the user installs the application. | This field corresponds to the **deliveryWithInstall** field under the **module** struct in the stage model. |
| installationFree | int | Whether the HAP supports the installation-free feature. | This parameter corresponds to the **installationFree** field under the **module** struct in the stage model. In the JSON file, if this parameter is set to **true**, **1** is returned; if this parameter is set to **false**, **0** is returned; if this parameter is not set, **2** is returned.|
| virtualMachine | String | Type of the target virtual machine (VM) where the HAP is running. It is used for cloud distribution, such as the application market and distribution center.| This field corresponds to the **virtualMachine** field under the **module** struct in the stage model. |
| name | String | Name of the **ReqPermission** struct. | NA |
| reason | String | Reason for requesting the permission. This field is mandatory for a user_grant permission. | NA |
| usedScene | UsedScene struct (see **UsedScene Struct** below)| Application scenario of the permission. The value can be **ability** or **when**. Multiple abilities can be configured.| NA |
| ability | List\<String> | Abilities that use the permission. The value is an array. | NA |
| when | String | Time when the permission is used. The value can be **inuse** (the permission can be used only in the foreground) or **always** (the permission can be used in foreground and background).| NA |
| shortcutId | String | ID of the **ShortCut** struct. | NA |
| label | String | Label of the **ShortCut** struct. | NA |
| icon | String | Icon of the **ShortCut** struct. | NA |
| intents | List of IntentInfo structs| Intents to which the shortcut points. The attribute consists of the **targetClass** and **targetBundle** sub-attributes.| NA |
| name | String | Logical name of the ExtensionAbility. | This field is supported only in the stage model. |
| srcEntrance | String | JS code path of the ExtensionAbility. | This field is supported only in the stage model. |
| icon | String | Icon ID of the ExtensionAbility. | This field is supported only in the stage model. |
| label | String | ExtensionAbility name visible to users. | This field is supported only in the stage model. |
| description | String | Description of the ExtensionAbility. | This field is supported only in the stage model. |
| type | String | Type of the ExtensionAbility, which can be **form**, **workScheduler**, **inputMethod**, **service**, **accessibility**, **dataShare**, **fileShare**, **wallpaper**, or **backup**.| This field is supported only in the stage model. Currently, only **form** and **staticSubscriber** information is parsed. The information of other types is not parsed.|
| permissions | List\<String> | Permissions required when the ExtensionAbility is called by the ability of another application. | This field is supported only in the stage model. |
| readPermission | String | Permission required for reading data in the ExtensionAbility. | This field is supported only in the stage model. |
| writePermission | String | Permission required for writing data to the ExtensionAbility. | This field is supported only in the stage model. |
| visible | boolean | Whether the ExtensionAbility can be called by other applications. | This field is supported only in the stage model. |
| skills | SkillInfo array | Skills of the Want that the extensionAbility can receive. | This field is supported only in the stage model. |
| metadata | CustomizeData information| Metadata of the ExtensionAbility. | The information in **metadata** is assigned to **CustomizeData**. |
| uri | String | URI of the data provided by the ExtensionAbility. | This field is supported only in the stage model. |
| description | String | Description of the widget. | This field is newly added to the stage model.|
| type | String | Type of the widget. | NA |
| src | String | JS code of the widget. | NA |
| isDefault | boolean | Whether the widget is a default one. Each HAP has only one default widget. | NA |
| colorMode | String | Color mode of the widget, which can be **auto**, **dark**, or **light**. | NA |
| updateEnabled | boolean | Whether the widget supports scheduled refresh. | NA |
| scheduledUpdateTime | String | Scheduled time to update the widget. The value is in 24-hour format and accurate to the minute. | NA |
| updateDuration | int | Interval to update the widget. The unit is 30 minutes. The value is a multiple of 30. | NA |
| supportDimensions | List\<String> | Dimensions supported by the widget, which can be **1 * 2**, **2 * 2**, **2 * 4**, or **4 * 4**. | NA |
| defaultDimension | String | Default dimensions of the widget. The value must be available in the **supportDimensions** array of the widget.| NA |
| formConfigAbility | String | Ability name for widget adjustment. | NA |
| formVisibleNotify | String | Whether the widget is allowed to use the visibility notification. | NA |
| MetaData | MetaData | Custom data of the widget. | NA |
| providerAbility | String | Ability or ExtensionAbility name of the widget.<br>1. FA model: If the widget is configured in an ability of the Service type, set **providerAbility** to **mainAbility**.<br>2. FA model: If the widget is configured in an ability of the Page type, set **providerAbility** to the current ability.<br>3. FA model: If **mainAbility** is not configured, set **providerAbility** to the ability that preferentially uses **system.home** in the current HAP. Otherwise, set **providerAbility** to the ability of the first page.<br>4. Stage model: Set **providerAbility** to **mainElement**.| NA |
| name | String | Name of the class corresponding to the current static common event. | In the stage model, the value is obtained from the StaticSubscriberExtensionAbility.|
| permission | String | Permissions required to implement the static common event. | In the stage model, the value is obtained from the StaticSubscriberExtensionAbility.|
| data | List\<String> | Additional data array to be carried in the static common event.| In the stage model, the value is obtained from the StaticSubscriberExtensionAbility.|
| type | List\<String> | Type array for configuring the static common event. | In the stage model, the value is obtained from the StaticSubscriberExtensionAbility.|
| events | List\<String> | Events of the Want that the ExtensionAbility can receive. | In the stage model, the value is obtained from the StaticSubscriberExtensionAbility.|
### DependencyItem Struct
| Field | Type | Description | Remarks|
|--------------| ------ |--------------| ---- |
| bundleName | String | Bundle name of the shared package.| NA |
| moduleName | String | Module name of the shared package.| NA |
| versionCode | String | Version number of the shared bundle. | NA |
The unpacking tool is a commissioning tool provided by OpenHarmony. It can split a HAP file into folders or split an App Pack into HAP files in command line mode.
The unpacking tool is a commissioning tool used to unpack HAP (an application package), HAR (static shared library), HSP (dynamic shared library), and APP (application set to launch to the application market) files. It also provides Java APIs to parse the HAP, APP, and HSP files.
The **app_unpacking_tool.jar** package can be found in the OpenHarmony SDK downloaded locally.
| --mode | Yes| Unpacking mode. In this scenario, set this parameter to **hap**.|
| --hap-path | Yes| Path of the HAP file.|
| --rpcid | No| Whether to extract the rpcid file from the HAP file to a specified directory. If the value is **true**, only the rpcid file is extracted and the HAP file is not unpacked.|
| --out-path | Yes| Path of the target file.|
| --force | No| The default value is **false**. If the value is **true**, an existing target file will be forcibly deleted during unpacking.|
| --mode | Yes| Unpacking mode. In this scenario, set this parameter to **hap**.|
| --rpcid | No| Whether to extract the rpcid file from the HAP file to a specified directory. If the value is **true**, only the rpcid file is extracted and the HAP file is not unpacked.|
| --out-path | Yes| Path of the target file.|
| --hap-path | Yes| Path of the HAP file.|
## Unpacking Commands
### Unpacking Commands for HAP Files
You can use the JAR package of the unpacking tool to unpack an HAP file by importing unpacking options and file paths.
| --rpcid | No | true or false| Whether to extract the rpcid file from the HAP file to a specified directory. If the value is **true**, only the rpcid file is extracted and the HAP file is not unpacked.|
| --out-path | Yes | NA | Path of the target files. |
| --force | No | true or false| The default value is **false**. If the value is **true**, an existing target file will be forcibly deleted during unpacking. |
### Unpacking Commands for HAR Files
You can use the JAR package of the unpacking tool to unpack an HAR file by importing unpacking options and file paths.
| --out-path | Yes | NA | Path of the target files. |
| --force | No | true or false| The default value is **false**. If the value is **true**, an existing target file will be forcibly deleted during unpacking.|
### Unpacking Commands for APP Files
You can use the JAR package of the unpacking tool to unpack an APP file by importing unpacking options and file paths.
| --out-path | Yes | NA | Path of the target files. |
| --force | No | true or false| The default value is **false**. If the value is **true**, an existing target file will be forcibly deleted during unpacking.|
### Obtaining the rpcid File from the HAP File
You can use the JAR package of the unpacking tool to unpack an HAP file to obtain the rpcid file by importing unpacking options and file paths.
| --rpcid | No | true or false| Whether to extract the rpcid file from the HAP file to a specified directory. If the value is **true**, only the rpcid file is extracted and the HAP file is not unpacked.|
| --hap-path | Yes | NA | Path of the HAP file. |
| --out-path | Yes | NA | Path of the target rpcid file. |
| --force | No | true or false| The default value is **false**. If the value is **true**, an existing target file will be forcibly deleted during unpacking. |
### Unpacking Commands for HSP Files
You can use the JAR package of the unpacking tool to unpack an HSP file by importing unpacking options and file paths.
| --out-path | Yes | NA | Path of the target files. |
| --force | No | true or false| The default value is **false**. If the value is **true**, an existing target file will be forcibly deleted during unpacking.|
### Unpacking Commands for APPQF Files
You can use the JAR package of the unpacking tool to unpack an APPQF file by importing unpacking options and file paths.
| --appqf-path | Yes | NA | Path of the APPQF file. |
| --out-path | Yes | NA | Path of the target files. |
| --force | No | true or false| The default value is **false**. If the value is **true**, an existing target file will be forcibly deleted during unpacking.|
## Package Parsing APIs
The package parsing APIs are used to parse an HAP, APP, or HSP file and obtain information such as the configuration file.
| UncompressEntrance | UncomperssResult parseApp(String appPath,String parseMode,String deviceType,String hapName) | Java| Function: Parses **pack.info** in the APP file.<br>Input parameters: **appPath**, which specifies the path of the APP file.<br>Return value: **UncomperssResult**.|
| UncompressEntrance | UncomperssResult parseApp(InputStream input,String parseMode,String deviceType,String hapName,String outPath) | Java| Function: Parses **pack.info** in the APP file.<br>Input parameters: **input**, which specifies the stream of the APP file.<br>Return value: **UncomperssResult**.|
| UncompressEntrance | UncomperssResult parseHap(String hapPath) | Java| Function: Parses the JSON file in the APP file.<br>Input parameters: **hapPath**, which specifies the path of the HAP file.<br>Return value: **UncomperssResult**. |
| UncompressEntrance | UncomperssResult parseHap(InputStream input) | Java| Function: Parses the JSON file in the APP file.<br>Input parameters: **input**, which specifies the stream of the HAP file.<br>Return value: **UncomperssResult**. |
| hapName | String | Name of the HAP file that is being parsed. | NA |
| appInfo | AppInfo struct (see **AppInfo Struct** below)| Struct of the application information. For details, see **AppInfo Struct** below. | NA |
| deviceConfig | Map\<String,DeviceConfig> | Device information. | The storage type is Map\<String,String>, which indicates the device type name and device type value, respectively. In the stage model, this field is stored in the **app** struct.|
| hapInfo | HapInfo struct (see **HapInfo Struct** below)| Module information in the HAP file. For details, see **HapInfo Struct** below.| NA |
| bundleName | String | Bundle name of the application. | NA |
| vendor | String | Vendor of the application. | NA |
| relatedBundleName | String | Related bundle name of the application. | NA |
| versionName | String | Version name of the application. | NA |
| versionCode | String | Version code of the application. | NA |
| targetApiVersion | int | Target API version required for running the application. | NA |
| compatibleApiVersion | int | API version compatible with the application. | NA |
| appName | String | Label of the ability displayed on the home screen. | NA |
| appNameEN | String | Label of the ability displayed on the home screen. | NA |
| releaseType | String | Release type of the target API version required for running the application. | NA |
| shellVersionCode | String | API version in HarmonyOS. | NA |
| shellVersionName | String | API version name in HarmonyOS. | NA |
| multiFrameworkBundle | String | Bundle name of the application in the dual-framework scenario. | NA |
| debug | boolean | Whether the application can be debugged. | NA |
| icon | String | Path of the application icon. | NA |
| label | String | Label of the application. | NA |
| description | String | Description of the application. | This field is newly added to the stage model. |
| minCompatibleVersionCode | int | Earliest compatible version of the application. | NA |
| distributedNotificationEnabled | boolean | Whether the distributed notification feature is enabled for the application. | This field is newly added to the stage model. |
| bundleType | String | Bundle type.<br>- **app**: The bundle is used for a common application.<br>- **atomicService**: The bundle is used for an atomic service.<br>- **shared**: The bundle is used for a shared library.| NA |
| compileSdkVersion | String | SDK version used for compiling the application. | This field is valid only for API version 10 and later. |
| compileSdkType | String | SDK type used for compiling the application. | This field is valid only for API version 10 and later. |
| labels | HashMap\<String, String> | Labels of the application in multiple languages.| NA |
| descriptions | HashMap\<String, String> | Descriptions of the application in multiple languages.| NA |
| appModel | AppModel enumerated value | Application framework model.<br>- FA: FA model<br>- STAGE: stage model| NA |
| packageStr | String | Package information about the application. | This field is unique to the FA model. |
| name | String | Name of the module. | NA |
| description | String | Description of the HAP. | This field is unique to the FA model. |
| supportedModes | List\<String> | Modes supported by the HAP. | NA |
| abilities | List\<AbilityInfo> | Ability information of the HAP file. | NA |
| defPermissions | List\<DefPermission> | Default permissions of the HAP. | NA |
| definePermissions | List\<DefinePermission> | Defined permissions of the HAP. | NA |
| defPermissionsGroups | List\<DefPermissionsGroups> | Default permission groups of the HAP. | NA |
| distro | Distro struct | Distro description of the HAP file. | NA |
| reqCapabilities | List\<String> | Required capabilities of the HAP. | NA |
| deviceType | List\<String> | Type of devices on which the HAP can run. | This field corresponds to **deviceTypes** in the stage model. |
| metaData | metaData struct (see **metaData Struct** below) | Custom metadata of the HAP. | NA |
| dependencies | List\<DependencyItem> | Dependencies of the HAP. | NA |
| isJs | boolean | Whether the application is a JS application. | This field is unique to the FA model. |
| reqPermissions | list\<ReqPermission> | Permissions requested by the application. | This field corresponds to **requestPermissions** in the stage model.|
| commonEvents | CommonEvent struct (see **CommonEvent Struct** below) | Static event. | NA |
| shortcuts | list\<Shortcut> | Shortcuts used by the application. | NA |
| distroFilter | DistroFilter struct | Information distributed by the application market by device form. | NA |
| srcEntrance | String | Entry code path of the application. | This field is newly added to the stage model. |
| process | String | Process name of the HAP. | This field is newly added to the stage model. |
| mainElement | String | Entry ability name or ExtensionAbility name of the HAP file.| This field is newly added to the stage model. In the FA model , the value of **mainAbility** is automatically assigned to **mainElement**.|
| uiSyntax | String | Syntax type of a JS component. | This field is newly added to the stage model. |
| pages | List\<String> | Information about each page in a JS component. | This field is newly added to the stage model. |
| extensionAbilityInfos| List\<ExtensionAbilityInfo> | Information about the ExtensionAbility. | This field is newly added to the stage model. |
| moduleAtomicService | ModuleAtomicService struct (see **ModuleAtomicService Struct** below)| Atomic service information of the HAP. | NA |
| formInfos | List\<AbilityFormInfo> | Widget information. | NA |
| descriptions | HashMap\<String, String> | Description of the HAP. | NA |
| moduleName | String | Name of the module. | This field corresponds to the **moduleName** field under the **module** struct in the stage model. |
| moduleType | String | Type of the HAP. | This field corresponds to the **moduleType** field under the **module** struct in the stage model. |
| deliveryWithInstall | boolean | Whether the HAP is installed when the user installs the application.| This field corresponds to the **deliveryWithInstall** field under the **module** struct in the stage model. |
| installationFree | int | Whether the HAP supports the installation-free feature. | This parameter corresponds to the **installationFree** field under the **module** struct in the stage model. In the JSON file, if this parameter is set to **true**, **1** is returned; if this parameter is set to **false**, **0** is returned; if this parameter is not set, **2** is returned.|
| virtualMachine | String | Type of the target virtual machine (VM) where the HAP is running. It is used for cloud distribution, such as the application market and distribution center.| This field corresponds to the **virtualMachine** field under the **module** struct in the stage model.|
| name | String | Name of the requested permission. | NA |
| reason | String | Reason for requesting the permission. This field is mandatory for a user_grant permission.| NA |
| usedScene | UsedScene struct (see **UsedScene Struct** below)| Application scenario of the permission. The value can be **ability** or **when**. Multiple abilities can be configured.| NA |
| reasons | HashMap\<String, String> | Reason for requesting the permission. This field is mandatory for a user_grant permission.| NA |
| ability | List\<String> | Abilities that use the permission. The value is an array. | NA |
| when | String | Time when the permission is used. The value can be **inuse** (the permission can be used only in the foreground) or **always** (the permission can be used in foreground and background).| NA |
| shortcutId | String | ID of the **ShortCut** struct. | NA |
| label | String | Label of the **ShortCut** struct. | NA |
| icon | String | Icon of the **ShortCut** struct. | NA |
| intents | List\<IntentInfo> | Intents to which the shortcut points. The attribute consists of the **targetClass** and **targetBundle** sub-attributes.| NA |
| labels | HashMap\<String, String> | Shortcut names displayed to users in multiple languages. | NA |
| name | String | Logical name of the ExtensionAbility. | This field is supported only in the stage model. |
| srcEntrance | String | JS code path of the ExtensionAbility. | This field is supported only in the stage model. |
| icon | String | Icon ID of the ExtensionAbility. | This field is supported only in the stage model. |
| label | String | ExtensionAbility name visible to users. | This field is supported only in the stage model. |
| description | String | Description of the ExtensionAbility. | This field is supported only in the stage model. |
| type | String | Type of the ExtensionAbility, which can be **form**, **workScheduler**, **inputMethod**, **service**, **accessibility**, **dataShare**, **fileShare**, **wallpaper**, or **backup**.| This field is supported only in the stage model. Currently, only **form** and **staticSubscriber** information is parsed. The information of other types is not parsed. |
| permissions | List\<String> | Permissions required when the ExtensionAbility is called by the ability of another application. | This field is supported only in the stage model. |
| readPermission | String | Permission required for reading data in the ExtensionAbility. | This field is supported only in the stage model. |
| writePermission | String | Permission required for writing data to the ExtensionAbility. | This field is supported only in the stage model. |
| visible | boolean | Whether the ExtensionAbility can be called by other applications. | This field is supported only in the stage model. |
| skills | List\<SkillInfo> | Skills of the Want that the extensionAbility can receive. | This field is supported only in the stage model. |
| metadataInfos | List\<ModuleMetadataInfo>| Metadata that the ExtensionAbility can receive. | This field is supported only in the stage model. |
| metadata | MetaData Struct | Metadata of the ExtensionAbility. | The information in **metadata** is assigned to **CustomizeData**.|
| uri | String | URI of the data provided by the ExtensionAbility. | This field is supported only in the stage model. |
| descriptions | HashMap\<String, String> | Descriptions of the ExtensionAbility in multiple languages. | NA |
| labels | HashMap\<String, String> | Names of the ExtensionAbility displayed to users in multiple languages. | NA |
| updateEnabled | boolean | Whether the widget supports scheduled refresh. | NA |
| scheduledUpdateTime | String | Scheduled time to update the widget. The value is in 24-hour format and accurate to the minute. | NA |
| updateDuration | int | Interval to update the widget. The unit is 30 minutes. The value is a multiple of 30. | NA |
| supportDimensions | List\<String> | Dimensions supported by the widget, which can be **1 * 2**, **2 * 2**, **2 * 4**, or **4 * 4**. | NA |
| defaultDimension | String | Default dimensions of the widget. The value must be available in the **supportDimensions** array of the widget.| NA |
| MetaData | MetaData | Custom data of the widget. | NA |
| description | String | Description of the widget. | This field is newly added to the stage model.|
| src | String | JS code of the widget. | NA |
| windowInfo | ModuleWindowInfo struct | Window information of the ability. | NA |
| isDefault | boolean | Whether the widget is a default one. Each HAP has only one default widget. | NA |
| colorMode | String | Color mode of the widget, which can be **auto**, **dark**, or **light**. | NA |
| formConfigAbility | String | Ability name for widget adjustment. | NA |
| formVisibleNotify | String | Whether the widget is allowed to use the visibility notification. | NA |
| providerAbility | String | Ability or ExtensionAbility name of the widget provider.<br>- FA model: If the widget is configured in an ability of the Service type, set **providerAbility** to **mainAbility**.<br/>- FA model: If the widget is configured in an ability of the Page type, set **providerAbility** to the current ability.<br/>- FA model: If **mainAbility** is not configured, set **providerAbility** to the ability that preferentially uses **system.home** in the current HAP. Otherwise, set **providerAbility** to the ability of the first page.<br/>- Stage model: Set **providerAbility** to **mainElement**. | NA |
| descriptions | HashMap\<String, String> | Descriptions of the ability in multiple languages. | NA |
| name | String | Name of the class corresponding to the current static common event. | In the stage model, the value is obtained from the StaticSubscriberExtensionAbility.|
| permission | String | Permissions required to implement the static common event. | In the stage model, the value is obtained from the StaticSubscriberExtensionAbility.|
| data | List\<String> | Additional data array to be carried in the static common event.| In the stage model, the value is obtained from the StaticSubscriberExtensionAbility.|
| type | List\<String> | Type array for configuring the static common event. | In the stage model, the value is obtained from the StaticSubscriberExtensionAbility.|
| events | List\<String> | Events of the Want that the ExtensionAbility can receive. | In the stage model, the value is obtained from the StaticSubscriberExtensionAbility.|
### DependencyItem Struct
| Field | Type | Description | Remarks|
|--------------| ------ |--------------| ---- |
| bundleName | String | Bundle name of the shared package.| NA |
| moduleName | String | Module name of the shared package.| NA |
| versionCode | String | Version number of the shared bundle. | NA |