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