• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Unpacking Tool
2
3
4The unpacking tool is a commissioning tool used to unpack HAP (an application package), HAR (statically shared library), HSP (dynamically 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.
5
6
7The **app_unpacking_tool.jar** package can be found in the OpenHarmony SDK downloaded locally.
8
9
10## Unpacking Commands
11
12### Unpacking Commands for HAP Files
13
14You can use the JAR package of the unpacking tool to unpack an HAP file by importing unpacking options and file paths.
15
16#### Example
17
18```
19java -jar app_unpacking_tool.jar --mode <option> --hap-path <options> --out-path [option] --force [option]
20```
21
22#### Parameters
23
24| Name      | Mandatory| Option         | Description                                                        |
25| ---------- | ---------- | ------------- | ------------------------------------------------------------ |
26| --mode     | Yes        | hap           | Unpacking mode.                                                  |
27| --hap-path | Yes        | NA            | Path of the HAP file.                                                 |
28| --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.|
29| --out-path | Yes        | NA            | Path of the target files.                                          |
30| --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. |
31
32### Unpacking Commands for HAR Files
33
34You can use the JAR package of the unpacking tool to unpack an HAR file by importing unpacking options and file paths.
35
36#### Example
37
38```
39java -jar app_unpacking_tool.jar --mode <options> --har-path <option> --out-path [option] --force [option]
40```
41
42#### Parameters
43
44| Name      | Mandatory| Option         | Description                                                       |
45| ---------- | ---------- |-------------| ----------------------------------------------------------- |
46| --mode     | Yes        | har         | Unpacking mode.                                                 |
47| --har-path | Yes        | NA          | Path of the HAR file.                                                |
48| --out-path | Yes        | NA          | Path of the target files.                                         |
49| --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.|
50
51### Unpacking Commands for APP Files
52
53You can use the JAR package of the unpacking tool to unpack an APP file by importing unpacking options and file paths.
54
55#### Example
56
57```
58java -jar app_unpacking_tool.jar --mode <options> --app-path <option> --out-path [option] --force [option]
59```
60
61#### Parameters
62
63| Name      | Mandatory| Option         | Description                                                       |
64| ---------- | ---------- |-------------| ----------------------------------------------------------- |
65| --mode     | Yes        | app         | Unpacking mode.                                                 |
66| --app-path | Yes        | NA          | Path of the APP file.                                                |
67| --out-path | Yes        | NA          | Path of the target files.                                         |
68| --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.|
69
70### Obtaining the rpcid File from the HAP File
71
72You 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.
73
74#### Example
75
76```
77java -jar app_unpacking_tool.jar --mode hap --rpcid true --hap-path <option> --out-path <option> --force true
78```
79
80#### Parameters
81
82| Name      | Mandatory| Option         | Description                                                        |
83| ---------- | ---------- | ------------- | ------------------------------------------------------------ |
84| --mode     | Yes        | hap           | Unpacking mode.                                                    |
85| --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.|
86| --hap-path | Yes        | NA            | Path of the HAP file.                                                   |
87| --out-path | Yes        | NA            | Path of the target rpcid file.                                       |
88| --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. |
89
90### Unpacking Commands for HSP Files
91
92You can use the JAR package of the unpacking tool to unpack an HSP file by importing unpacking options and file paths.
93
94#### Example
95
96```
97java -jar app_unpacking_tool.jar --mode <option> --hsp-path <options> --out-path [option] --force [option]
98```
99
100#### Parameters
101
102| Name        | Mandatory| Option         | Description                                |
103|------------| ---------- | ------------- |------------------------------------|
104| --mode     | Yes        | hsp           | Unpacking mode.                             |
105| --hsp-path | Yes        | NA            | Path of the HSP file.                           |
106| --out-path | Yes        | NA            | Path of the target files.                         |
107| --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.|
108
109### Unpacking Commands for APPQF Files
110
111You can use the JAR package of the unpacking tool to unpack an APPQF file by importing unpacking options and file paths.
112
113#### Example
114
115```
116java -jar app_unpacking_tool.jar --mode <option> --appqf-path <options> --out-path [option] --force [option]
117```
118
119#### Parameters
120
121| Name          | Mandatory| Option         | Description                                |
122|--------------| ---------- |-------------|------------------------------------|
123| --mode       | Yes        | appqf       | Unpacking mode.                             |
124| --appqf-path | Yes        | NA          | Path of the APPQF file.                         |
125| --out-path   | Yes        | NA          | Path of the target files.                         |
126| --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.|
127
128## Package Parsing APIs
129
130The package parsing APIs are used by the application market to parse an HAP, APP, or HSP file and obtain information such as the configuration file.
131
132### Available APIs
133
134| Class              | Prototype                                                    | Type    | Description                                                           |
135| ------------------ | ------------------------------------------------------------ | -------- |-------------------------------------------------------------------|
136| UncompressEntrance | UncompressResult 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: **UncompressResult**.|
137| UncompressEntrance | UncompressResult 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: **UncompressResult**.|
138| UncompressEntrance | UncompressResult 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: **UncompressResult**.   |
139| UncompressEntrance | UncompressResult 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: **UncompressResult**.  |
140
141## Fields of the Unpacking Tool
142
143### UncompressResult (Bundle Information) Struct
144
145| Field           | Type              | Description                                    | Remarks|
146| ----------------| ------------------ |----------------------------------------| ---- |
147| result          | boolean            | Whether the parsing is successful.                            | NA   |
148| message         | String             | Failure cause returned if the parsing fails.                           | NA   |
149| packInfos       | List\<PackInfo>    | Information about **packages** in the **pack.info** file of the bundle.         | NA   |
150| profileInfos    | List\<profileInfo> | Configuration information of the application.                               | NA   |
151| profileInfosStr | List\<String>      | Configuration information of the application.| NA   |
152| icon            | String             | Path of the icon of the entry component. If there is no entry component, the icon path of the first component is returned.| NA   |
153| label           | String             | Label of the entry component. If there is no entry component, the label of the first component is returned.| NA   |
154
155### PackInfo Struct
156
157| Field               | Type         | Description                                   | Remarks|
158| ------------------- | ------------- | --------------------------------------- | ---- |
159| name                | String        | Bundle name.                                   | NA   |
160| moduleName          | String        | HAP (module) name.                                | NA   |
161| moduleType          | String        | Module type.                           | NA   |
162| deviceType          | List\<String> | Device type supported by the current HAP.          | NA   |
163| deliveryWithInstall | boolean       | Whether the HAP is installed when the user installs the application.| NA   |
164
165### ProfileInfo Struct
166
167| Field        | Type                          | Description                                      | Remarks                                                        |
168| ------------ | ------------------------------ | ------------------------------------------ | ------------------------------------------------------------ |
169| hapName      | String                         | Name of the HAP file that is being parsed.                   | NA                                                           |
170| appInfo      | AppInfo struct (see **AppInfo Struct** below)| Struct of the application information. For details, see **AppInfo Struct** below.  | NA                                                           |
171| 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.|
172| hapInfo      | HapInfo struct (see **HapInfo Struct** below)| Module information in the HAP file. For details, see **HapInfo Struct** below.| NA                                                           |
173
174### AppInfo Struct
175
176| Field                            | Type     | Description                                                                           | Remarks         |
177|--------------------------------|---------|-------------------------------------------------------------------------------|-------------|
178| bundleName                     | String  | Bundle name of the application.                                                                    | NA          |
179| vendor                         | String  | Vendor of the application.                                                                  | NA          |
180| relatedBundleName              | String  | Related bundle name of the application.                                                             | NA          |
181| versionName                    | String  | Version name of the application.                                                         | NA          |
182| versionCode                    | String  | Version code of the application.                                                         | NA          |
183| targetApiVersion               | int     | Target API version required for running the application.                                                             | NA          |
184| compatibleApiVersion           | int     | API version compatible with the application.                                                                 | NA          |
185| appName                        | String  | Label of the ability displayed on the home screen.                                                       | NA          |
186| appNameEN                      | String  | Label of the ability displayed on the home screen.                                                       | NA          |
187| releaseType                    | String  | Release type of the target API version required for running the application.                                                          | NA          |
188| shellVersionCode               | String  | API version number of the application.                                                         | NA          |
189| shellVersionName               | String  | API version name of the application.                                                         | NA          |
190| multiFrameworkBundle           | boolean | Application framework.                                                        | NA          |
191| debug                          | boolean | Whether the application can be debugged.                                                                    | NA          |
192| icon                           | String  | Path of the application icon.                                                                    | NA          |
193| label                          | String  | Label of the application.                                                                   | NA          |
194| description                    | String  | Description of the application.                                                                    | This field is newly added to the stage model.  |
195| minCompatibleVersionCode       | int     | Earliest compatible version of the application.                                                               | NA          |
196| distributedNotificationEnabled | boolean | Whether the distributed notification feature is enabled for the application.                                                             | This field is newly added to the stage model.  |
197| bundleType                     | String  | Bundle type.<br>- **app**: The bundle is used for an application.<br>- **atomicService**: The bundle is used for an atomic service.<br>- **shared**: The bundle is used for a shared library.| NA   |
198| compileSdkVersion              | String  | SDK version used for compiling the application.                                                             | This field is valid only for API version 10 and later.  |
199| compileSdkType                 | String  | SDK type used for compiling the application.                                                             | This field is valid only for API version 10 and later.  |
200| labels                         | HashMap\<String, String> | Labels of the application in multiple languages.| NA          |
201| descriptions                   | HashMap\<String, String> | Descriptions of the application in multiple languages.| NA          |
202
203### HapInfo Struct
204
205| Field                | Type                                         | Description                              | Remarks                                  |
206| ---------------------|-----------------------------------------------|------------------------------------| ---------------------------------------|
207| appModel             | AppModel enumerated value                               | Application framework model.<br>- FA: FA model<br>- STAGE: stage model| NA |
208| packageStr           | String                                        | Package information about the application.                   | This field is unique to the FA model.            |
209| name                 | String                                        | Name of the module.               | NA                 |
210| description          | String                                        | Description of the HAP.                | This field is unique to the FA model.                      |
211| supportedModes       | List\<String>                                 | Modes supported by the HAP.              | NA                           |
212| abilities            | List\<AbilityInfo>                            | Ability information of the HAP file.               | NA                             |
213| defPermissions       | List\<DefPermission>                          | Default permissions of the HAP.         | NA                             |
214| definePermissions    | List\<DefinePermission>                       | Defined permissions of the HAP.      | NA                             |
215| defPermissionsGroups | List\<DefPermissionsGroups>                   | Default permission groups of the HAP. | NA                             |
216| distro               | Distro struct                                 | Distro description of the HAP file.              | NA                             |
217| reqCapabilities      | List\<String>                                 | Required capabilities of the HAP.       | NA                           |
218| deviceType           | List\<String>                                 | Type of devices on which the HAP can run.        | This field corresponds to **deviceTypes** in the stage model.      |
219| metaData             | metaData struct (see **metaData Struct** below)             | Custom metadata of the HAP.               | NA           |
220| dependencies         | List\<DependencyItem>                         | Dependencies of the HAP.        | NA                             |
221| isJs                 | boolean                                       | Whether the application is a JS application.             | This field is unique to the FA model.           |
222| reqPermissions       | list\<ReqPermission>                          | Permissions requested by the application.            | This field corresponds to **requestPermissions** in the stage model.|
223| commonEvents         | CommonEvent struct (see **CommonEvent Struct** below)      | Static event.                        | NA     |
224| shortcuts            | list\<Shortcut>                               | Shortcuts used by the application.             | NA                  |
225| distroFilter         | DistroFilter struct                           | Information distributed by the application market by device form.    | NA               |
226| srcEntrance          | String                                        | Entry code path of the application.          | This field is newly added to the stage model.         |
227| process              | String                                        | Process name of the HAP.                     | This field is newly added to the stage model.      |
228| 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**.|
229| uiSyntax             | String                                        | Syntax type of a JS component.        | This field is newly added to the stage model.      |
230| pages                | List\<String>                                 | Information about each page in a JS component.      | This field is newly added to the stage model.      |
231| extensionAbilityInfos| List\<ExtensionAbilityInfo>                   | Information about the ExtensionAbility.      | This field is newly added to the stage model.       |
232| moduleAtomicService  | ModuleAtomicService struct (see **ModuleAtomicService Struct** below)| Atomic service information of the HAP.         | NA              |
233| formInfos            | List\<AbilityFormInfo>                        | Widget information.                      | NA              |
234| descriptions         | HashMap\<String, String>                      | Description of the HAP.                   | NA             |
235
236### AbilityInfo Struct
237
238| Field               | Type                      | Description                                             | Remarks                       |
239|-------------------|--------------------------| ------------------------------------------------- | ------------------------------- |
240| name              | String                   | Logical name of the ability.                          | NA                              |
241| description       | String                   | Description of the ability.                                | NA                              |
242| descriptionRes    | String                   | Description of the ability.                            | NA                              |
243| icon              | String                   | Icon of the ability.                                  | NA                              |
244| iconPath          | String                   | Path of the ability icon.                              | NA                              |
245| label             | String                   | Ability name visible to users.                      | NA                              |
246| labelRes          | String                   | Ability name visible to users.                  | NA                              |
247| type              | String                   | Ability type.                                  | In the stage model, the value is directly assigned to the **page** field.|
248| formsEnabled      | boolean                  | Whether the widget is enabled for the ability.                          | NA                              |
249| formInfo          | FormInfo structure          | Widget information.                                   | NA                              |
250| uri               | String                   | URI of the ability.                             | This field is supported only in the FA model.                     |
251| launchType        | String                   | Launcher type of the ability.                  | NA                              |
252| orientation       | String                   | Orientation of the ability.                   | NA                              |
253| visible           | boolean                  | Whether the ability is visible.                       | NA                              |
254| grantPermission   | boolean                  | Granted permissions of the ability.               | NA                              |
255| readPermission    | String                   | Read permissions of the ability.                | NA                              |
256| writePermission   | String                   | Write permissions of the ability.               | NA                              |
257| uriPermissionMode | String                   | URI permission mode of the ability.             | NA                              |
258| uriPermissionPath | String                   | URI permission path of the ability.             | NA                              |
259| directLaunch      | boolean                  | Whether the ability can be directly launched.                  | NA                              |
260| mission           | String                   | Mission of the ability.                       | NA                              |
261| targetAbility     | String                   | Target ability of the ability.                 | NA                              |
262| multiUserShared   | boolean                  | Whether the ability can be shared by multiple users.               | NA                              |
263| supportPipMode    | boolean                  | Whether the ability supports the PIP mode.                | NA                              |
264| srcLanguage       | String                   | Source language of the ability.                   | NA                              |
265| srcPath           | String                   | Source path of the ability.                       | NA                              |
266| srcEntrance       | String                   | Source entrance of the ability.                   | NA                              |
267| continuable       | boolean                  | Whether the ability can be continued on another device.                   | NA                              |
268| metaData          | MetaData struct (see **MetaData Struct** below)| Custom metadata of the ability.                 | NA                             |
269| configChanges     | List\<String>            | Configuration changes of the ability.                 | NA                              |
270| formInfos         | List\<AbilityFormInfo>   | Widgets of the ability.                         | NA                              |
271| permissions       | List\<String>            | Permissions of the ability.                   | NA                              |
272| skills            | List\<SkillInfo>         | Skills of the ability.                        | NA                              |
273| backgroundModes   | List\<String>            | Background modes of the ability.               | NA                              |
274| labels            | HashMap\<String, String> | Names of the ability displayed to users in multiple languages.               | NA                             |
275| descriptions      | HashMap\<String, String> | Descriptions of the ability in multiple languages.                        | NA                              |
276
277### Distro Struct
278
279| Field               | Type   | Description                                   | Remarks                                                        |
280| ------------------- |---------| --------------------------------------- | ------------------------------------------------------------ |
281| moduleName          | String  | Name of the module.                   | This field corresponds to the **moduleName** field under the **module** struct in the stage model.                |
282| moduleType          | String  | Type of the HAP.                      | This field corresponds to the **moduleType** field under the **module** struct in the stage model.                |
283| 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.        |
284| 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.|
285| 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.|
286
287### MetaData Struct
288
289| Field          | Type                | Description                            | Remarks                     |
290| -------------- |----------------------| -------------------------------- | ------------------------- |
291| parameters     | List\<MetaDataInfo>  | Metadata information.          | This field is unique to the FA model. It is deprecated in the stage model. |
292| results        | List\<MetaDataInfo>  | Result information of the metadata.       | This field is unique to the FA model. It is deprecated in the stage model. |
293| customizeDatas | List\<CustomizeData> | Custom data of the metadata.| NA                         |
294
295### MetaDataInfo Struct
296
297| Field       | Type  | Description                             | Remarks                     |
298| ----------- | ------ | --------------------------------- | ------------------------- |
299| name        | String | Name of the **MetaDataInfo** struct.       | This field is unique to the FA model. It is deprecated in the stage model. |
300| description | String | Description of the **MetaDataInfo** struct.| This field is unique to the FA model. It is deprecated in the stage model. |
301| type        | String | Type of the **MetaDataInfo** struct.       | This field is unique to the FA model. It is deprecated in the stage model. |
302
303### CustomizeData Struct
304
305| Field | Type  | Description                        | Remarks                   |
306| ----- | ------ | ---------------------------- | ----------------------- |
307| name  | String | Name of the **CustomizeData** struct. | This field corresponds to **metadata** in the stage model.|
308| value | String | Value of the **CustomizeData** struct.| This field corresponds to **metadata** in the stage model.|
309| extra | String | Extra information of the **CustomizeData** struct.| This field corresponds to **metadata** in the stage model.|
310
311### ReqPermission Struct
312
313| Field     | Type                              | Description                                                      | Remarks|
314| --------- | ---------------------------------- |------------------------------------------------------------| ---- |
315| name      | String                             | Name of the requested permission.                                | NA   |
316| reason    | String                             | Reason for requesting the permission. This field is mandatory for a user_grant permission.| NA   |
317| 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   |
318| reasons   | HashMap\<String, String>           | Reason for requesting the permission. This field is mandatory for a user_grant permission.| NA    |
319
320### UsedScene Struct
321
322| Field   | Type         | Description                                                        | Remarks|
323| ------- | ------------- | ------------------------------------------------------------ | ---- |
324| ability | List\<String> | Abilities that use the permission. The value is an array.  | NA   |
325| 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   |
326
327### Shortcut Struct
328
329| Field      | Type                  | Description                                                        | Remarks|
330| ---------- | ---------------------- | :----------------------------------------------------------- | ---- |
331| shortcutId | String                 | ID of the **ShortCut** struct.                                            | NA   |
332| label      | String                 | Label of the **ShortCut** struct.                                      | NA   |
333| icon       | String                 | Icon of the **ShortCut** struct.                                      | NA   |
334| intents    | List\<IntentInfo>      | Intents to which the shortcut points. The attribute consists of the **targetClass** and **targetBundle** sub-attributes.| NA   |
335| labels     | HashMap\<String, String> | Shortcut names displayed to users in multiple languages.                       | NA   |
336
337### IntentInfo Struct
338
339| Field        | Type  | Description            | Remarks|
340| ------------ | ------ | ---------------- | ---- |
341| targetClass  | String | Class name for the target ability of the shortcut.| NA   |
342| targetBundle | String | Target bundle name of the shortcut.| NA   |
343
344### DistroFilter Struct
345
346| Field         | Type               | Description                                 | Remarks|
347| ------------- | ------------------- | ------------------------------------- | ---- |
348| apiVersion    | ApiVersion struct   | API version of the **DistroFilter** struct.   | NA   |
349| screenShape   | ScreenShape struct  | Screen shape of the **DistroFilter** struct.  | NA   |
350| screenDensity | ScreenDensity struct| Screen density of the **DistroFilter** struct.| NA   |
351| screenWindow  | ScreenWindow struct | Screen window of the **DistroFilter** struct. | NA   |
352| countryCode   | CountryCode struct  | Country code of the **DistroFilter** struct.  | NA   |
353
354### ApiVersion Struct
355
356| Field  | Type         | Description                    | Remarks|
357| ------ | ------------- | ------------------------ | ---- |
358| policy | String        | Policy information in the struct.| NA   |
359| value  | List\<String> | Value information in the struct. | NA   |
360
361### ScreenShape Struct
362
363| Field  | Type         | Description                    | Remarks|
364| ------ | ------------- | ------------------------ | ---- |
365| policy | String        | Policy information in the struct.| NA   |
366| value  | List\<String> | Value information in the struct. | NA   |
367
368### ScreenDensity Struct
369
370| Field  | Type         | Description                    | Remarks|
371| ------ | ------------- | ------------------------ | ---- |
372| policy | String        | Policy information in the struct.| NA   |
373| value  | List\<String> | Value information in the struct. | NA   |
374
375### ScreenWindow Struct
376
377| Field  | Type         | Description                    | Remarks|
378| ------ | ------------- | ------------------------ | ---- |
379| policy | String        | Policy information in the struct.| NA   |
380| value  | List\<String> | Value information in the struct. | NA   |
381
382### CountryCode Struct
383
384| Field  | Type         | Description                    | Remarks|
385| ------ | ------------- | ------------------------ | ---- |
386| policy | String        | Policy information in the struct.| NA   |
387| value  | List\<String> | Value information in the struct. | NA   |
388
389### ExtensionAbilityInfo Struct
390
391| Field           | Type                    | Description                                                 | Remarks                               |
392| --------------- | ------------------------ | ----------------------------------------------------- | ----------------------------------- |
393| name            | String                   | Logical name of the ExtensionAbility.                     | This field is supported only in the stage model.                     |
394| srcEntrance     | String                   | JS code path of the ExtensionAbility.               | This field is supported only in the stage model.                     |
395| icon            | String                   | Icon ID of the ExtensionAbility.                         | This field is supported only in the stage model.                     |
396| label           | String                   | ExtensionAbility name visible to users.                 | This field is supported only in the stage model.                     |
397| description     | String                   | Description of the ExtensionAbility.                           | This field is supported only in the stage model.                     |
398| 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.       |
399| 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.                     |
400| readPermission  | String                   | Permission required for reading data in the ExtensionAbility.                        | This field is supported only in the stage model.                   |
401| writePermission | String                   | Permission required for writing data to the ExtensionAbility.                          | This field is supported only in the stage model.                  |
402| visible         | boolean                  | Whether the ExtensionAbility can be called by other applications.             | This field is supported only in the stage model.                  |
403| skills          | List\<SkillInfo>         | Skills of the Want that the extensionAbility can receive.             | This field is supported only in the stage model.                   |
404| metadataInfos   | List\<ModuleMetadataInfo>| Metadata that the ExtensionAbility can receive.               | This field is supported only in the stage model.                   |
405| metadata        | MetaData Struct          | Metadata of the ExtensionAbility.                           | The information in **metadata** is assigned to **CustomizeData**.|
406| uri             | String                   | URI of the data provided by the ExtensionAbility.                      | This field is supported only in the stage model.                          |
407| descriptions    | HashMap\<String, String> | Descriptions of the ExtensionAbility in multiple languages.                     | NA                              |
408| labels          | HashMap\<String, String> | Names of the ExtensionAbility displayed to users in multiple languages.           | NA                             |
409
410### SkillInfo Struct
411
412| Field    | Type               | Description                  | Remarks|
413| -------- | ------------------- |----------------------| ---- |
414| actions  | List\<String>       | Actions of the Want that the ExtensionAbility can receive.| NA   |
415| entities | List\<String>       | Entities of the Want that the ExtensionAbility can receive.  | NA   |
416
417### UriInfo Struct
418
419| Field         | Type  | Description                    | Remarks|
420| ------------- | ------ |------------------------| ---- |
421| schema        | String | Schema information of the **ModuleUriInfo** struct.  | NA   |
422| host          | String | Host of the **ModuleUriInfo** struct.  | NA   |
423| port          | String | Port of the **ModuleUriInfo** struct.  | NA   |
424| pathStartWith | String | Path prefix of the **ModuleUriInfo** struct.  | NA   |
425| pathRegex     | String | Path regular expression of the **ModuleUriInfo** struct.| NA   |
426| path          | String | Path information of the **ModuleUriInfo** struct.  | NA   |
427| type          | String | Type of the **ModuleUriInfo** struct.    | NA   |
428
429### AbilityFormInfo Struct
430
431| Field               | Type                    | Description                                                        | Remarks       |
432| ------------------- | -------------------------| ------------------------------------------------------------ |-----------|
433| name                | String                   | Name of the widget.                                             | NA        |
434| type                | String                   | Type of the widget.                                          | NA        |
435| updateEnabled       | boolean                  | Whether the widget supports scheduled refresh.                                  | NA        |
436| scheduledUpdateTime | String                   | Scheduled time to update the widget. The value is in 24-hour format and accurate to the minute.      | NA        |
437| updateDuration      | int                      | Interval to update the widget. The unit is 30 minutes. The value is a multiple of 30.  | NA        |
438| supportDimensions   | List\<String>            | Dimensions supported by the widget, which can be **1 * 2**, **2 * 2**, **2 * 4**, or **4 * 4**.  | NA        |
439| defaultDimension    | String                   | Default dimensions of the widget. The value must be available in the **supportDimensions** array of the widget.| NA        |
440| MetaData            | MetaData                 | Custom data of the widget.                                        | NA        |
441| description         | String                   | Description of the widget.                                             | This field is newly added to the stage model.|
442| src                 | String                   | JS code of the widget.                                      | NA        |
443| windowInfo          | ModuleWindowInfo struct  | Window information of the ability.                                      | NA        |
444| isDefault           | boolean                  | Whether the widget is a default one. Each HAP has only one default widget.     | NA        |
445| colorMode           | String                   | Color mode of the widget, which can be **auto**, **dark**, or **light**.             | NA        |
446| formConfigAbility   | String                   | Ability name for widget adjustment.                                   | NA        |
447| formVisibleNotify   | String                   | Whether the widget is allowed to use the visibility notification.                        | NA        |
448| 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 |
449| descriptions        | HashMap\<String, String> | Descriptions of the ability in multiple languages.                                    | NA     |
450
451
452### CommonEvent Struct
453
454| Field      | Type         | Description                                  | Remarks                                            |
455| ---------- | ------------- | -------------------------------------- | ------------------------------------------------ |
456| name       | String        | Name of the class corresponding to the current static common event.            | In the stage model, the value is obtained from the StaticSubscriberExtensionAbility.|
457| permission | String        | Permissions required to implement the static common event.  | In the stage model, the value is obtained from the StaticSubscriberExtensionAbility.|
458| 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.|
459| type       | List\<String> | Type array for configuring the static common event.        | In the stage model, the value is obtained from the StaticSubscriberExtensionAbility.|
460| events     | List\<String> | Events of the Want that the ExtensionAbility can receive.     | In the stage model, the value is obtained from the StaticSubscriberExtensionAbility.|
461
462### DependencyItem Struct
463
464| Field          | Type  | Description          | Remarks|
465|--------------| ------ |--------------| ---- |
466| bundleName   | String | Bundle name of the shared package.| NA   |
467| moduleName   | String | Module name of the shared package.| NA   |
468| versionCode  | String | Version number of the shared bundle.     | NA   |
469
470### ModuleAtomicService Struct
471
472| Field        | Type                  | Description          | Remarks|
473|--------------|------------------------|----------------| ---- |
474| preloadItems | list\<PreloadItem>     | Preloaded objects.    | NA   |
475
476### PreloadItem Struct
477
478| Field        | Type  | Description          | Remarks|
479|--------------|--------|----------------| ---- |
480| moduleName   | String | Name of the preloaded module.| NA   |
481
482### DeviceConfig Struct
483
484| Field                          | Type   | Description                                    | Remarks|
485|--------------------------------|-------- |------------------------------------------| ---- |
486| targetReqSdk                   | String  | Target SDK version requested. | NA   |
487| compatibleReqSdk               | String  | Compatible SDK version requested. | NA   |
488| jointUserid                    | String  | Joint user ID.     | NA   |
489| process                        | String  | Process.            | NA   |
490| arkFlag                        | String  | ArkCompiler flag.         | NA   |
491| targetArkVersion               | String  | Target ArkCompiler version.| NA   |
492| compatibleArkVersion           | String  | Compatible ArkCompiler version.  | NA   |
493| directLaunch                   | boolean | Whether direct launch is supported.        | NA   |
494| distributedNotificationEnabled | boolean | Whether distributed notification is enabled.| NA   |
495
496### DefPermission Struct
497
498| Field          | Type                    | Description                                     | Remarks|
499|----------------|--------------------------|-------------------------------------------| ---- |
500| name           | String                   | Name of the default permission.              | NA   |
501| grantMode      | String                   | Grant mode of the default permission.             | NA   |
502| group          | String                   | Group of the default permission.                    | NA   |
503| label          | String                   | Label of the default permission.                  | NA   |
504| description    | String                   | Description of the default permission.                  | NA   |
505| availableScope | List\<String>            | Available scope of the default permission.              | NA   |
506| labels         | HashMap\<String, String> | Labels of the default permission in multiple languages.    | NA   |
507| descriptions   | HashMap\<String, String> | Descriptions of the default permission in multiple languages.    | NA   |
508
509### DefinePermission Struct
510
511| Field                  | Type                    | Description                                              | Remarks|
512|------------------------|--------------------------|----------------------------------------------------| ---- |
513| name                   | String                   | Name of the defined permission.                        | NA   |
514| grantMode              | String                   | Grant mode of the defined permission.                       | NA   |
515| availableLevel         | String                   | Group of the defined permission.                              | NA   |
516| provisionEnable        | boolean                  | Whether the defined permission is enabled.                          | NA   |
517| distributedSceneEnable | boolean                  | Whether the distributed scene is enabled for the defined permission.| NA   |
518| label                  | String                   | Label of the defined permission.                             | NA   |
519| description            | String                   | Description of the defined permission.                             | NA   |
520| descriptions           | HashMap\<String, String> | Descriptions of the defined permission in multiple languages.               | NA   |
521| labels                 | HashMap\<String, String> | Labels of the defined permission in multiple languages.               | NA   |
522
523### DefPermissionsGroups Struct
524
525| Field       | Type   | Description                        | Remarks|
526|-------------|---------|------------------------------| ---- |
527| name        | String  | Name of the default permission group.| NA   |
528| order       | String  | Sequence of the default permission group. | NA   |
529| icon        | String  | Icon of the default permission group.| NA   |
530| label       | String  | Label of the default permission group.| NA   |
531| description | String  | Description of the default permission group.| NA   |
532| request     | boolean | Request for the default permission group.| NA   |
533
534### FormInfo Struct
535
536| Field         | Type         | Description                    | Remarks|
537|---------------|---------------|--------------------------| ---- |
538| formEntity    | List\<String> | Widget entity.| NA   |
539| minHeight     | String        | Minimum height of the widget.  | NA   |
540| defaultHeight | String        | Default height of the widget.  | NA   |
541| minWidth      | String        | Minimum width of the widget  | NA   |
542| defaultWidth  | String        | Default width of the widget.  | NA   |
543
544### ModuleMetadataInfo Struct
545
546| Field    | Type   | Description                        | Remarks|
547|----------|---------|------------------------------| ---- |
548| name     | String  | Name of the ModuleMetadataInfo.| NA   |
549| value    | String  | Value of the ModuleMetadataInfo.  | NA   |
550| resource | String  | Resource of the ModuleMetadataInfo.| NA   |
551
552### ModuleWindowInfo Struct
553
554| Field           | Type   | Description                               | Remarks|
555|-----------------|---------|-------------------------------------| ---- |
556| designWidth     | int     | Designed width of the used scene of the module.          | NA   |
557| autoDesignWidth | boolean | Automatically designed width of the used scene of the module.| NA   |
558