9 Star 64 Fork 186

OpenHarmony / developtools_packing_tool

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0

打包拆包工具使用说明

简介

packing_tool子系统用于生成打包工具和拆包工具,其中打包工具用于hap,app,hqf,appqf,har,hsp包的生成,拆包工具用于对hap,app,hqf,appqf,har,hsp包的拆包及对hap,hsp,app,appqf的解析。具体的功能介绍如下:

打包工具子系统架构图如下:

1. 打包指令说明

1.1 hap包模式打包指令

1.1.1 示例

  • Stage模型的打包命令示例:
java -jar app_packing_tool.jar --mode hap --json-path <option> --resources-path <option> --ets-path <option> --index-path <option> --pack-info-path <option> --out-path path\out\srcEntrance.hap --force true --compress-level 5 --pkg-context-path <option>
  • FA模型的打包命令示例:
java -jar app_packing_tool.jar --mode hap --json-path <option> --maple-so-path [option] --profile-path [option] --maple-so-dir [option] --dex-path [option] --lib-path [option] --resources-path [option] --index-path [option] --out-path <option> --force [option] --compress-level 5

1.1.2 参数含义及规范

指令 是否必选项 选项 描述 备注
--mode hap 打包类型。 NA
--json-path NA .json文件路径,FA模型文件名必须为config.json;stage模型文件名必须为module.json。 NA
--profile-path NA CAPABILITY.profile文件路径。 NA
--maple-so-path NA maple so文件输入路径,so文件路径,文件名必须以.so为后缀。如果是多个so需要用“,”分隔。 NA
--maple-so-dir NA maple so目录输入路径。 NA
--dex-path NA 1.dex文件路径,文件名必须以.dex为后缀。如果是多个dex需要用“,”分隔。2.dex文件路径也可以为目录。 NA
--lib-path NA lib库文件路径。 NA
--resources-path NA resources资源包路径。 NA
--index-path NA .index文件路径,文件名必须为resources.index。 NA
--pack-info-path NA pack.info文件路径,文件名必须为pack.info。 NA
--rpcid-path NA rpcid.sc文件路径,文件名必须为rpcid.sc。 NA
--js-path NA 存放js文件目录路径。 仅stage模型生效
--ets-path NA 存放ets文件目录路径。 仅stage模型生效
--out-path NA 目标文件路径,文件名必须以.hap为后缀。 NA
--force true或者false 默认值为false,如果为true,表示当目标文件存在时,强制删除。 NA
--an-path NA 存放an文件的路径。 仅stage模型生效
--ap-path NA 存放ap文件的路径。 仅stage模型生效
--dir-list NA 可指定目标文件夹列表,将其打入hap包内。 NA
--compress-level number 压缩等级,默认值1,可选等级1-9。在应用配置compressNativeLibs参数为true的情况下生效,数值越大压缩率越高、压缩速度越慢。 NA
--pkg-context-path NA 可指定语境信息表文件路径,文件名必须为pkgContextInfo.json。 仅stage模型生效

1.2 har包模式打包指令

1.2.1 示例

java -jar app_packing_tool.jar --mode har --json-path [option] --jar-path [option] --lib-path [option] --resources-path [option] --out-path [option] --force [option]

1.2.2 参数含义及规范

指令 是否必选项 选项 描述
--mode har 打包类型。
--json-path NA .json文件路径,FA模型文件名必须为config.json;stage模型文件名必须为module.json。
--jar-path NA 1.jar文件路径,文件名必须以.jar为后缀。如果是多个jar需要用“,”分隔。2.jar文件路径也可以为目录。
--lib-path NA lib库文件路径。
--resource-path NA resources资源包路径。
--out-path NA 目标文件路径,文件名必须以.har为后缀。
--force true或者false 默认值为false,如果为true,表示当目标文件存在时,强制删除。

1.3 app包模式打包指令

1.3.1 示例

java -jar app_packing_tool.jar --mode app --hap-path <option> --hsp-path <option> --out-path [option] --signature-path [option] --certificate-path [option] --pack-info-path [option] --force [option]

1.3.2 参数含义及规范

指令 是否必选项 选项 描述
--mode app 多个hap需满足hap的合法性校验。
--hap-path NA 1.hap包文件路径,文件名必须以.hap为后缀。如果时多个hap包需要用“,”分隔。2.hap包文件路径也可以是目录。
--hsp-path NA 1.hsp包文件路径,文件名必须以.hsp为后缀。如果时多个hsp包需要用“,”分隔。2.hsp包文件路径也可以是目录。
--pack-info-path NA 文件名必须为pack.info。
--out-path NA 目标文件路径,文件名必须以.app为后缀。
--signature-path NA 签名路径。
--certificate-path NA 证书路径。
--force true或者false 默认值为false,如果为true,表示当目标文件存在时,强制删除。

1.3.3 打包app时hap的合法性校验

在对工程内的hap包打包生成app包时,需要保证被打包的每个hap在json文件中配置的bundleName,versionCode和versionName,minCompatibleVersionCode相同,minAPIVersion,targetAPIVersion,apiReleaseType相同,moduleName唯一,对于fa模型,还需要保证json文件中配置的package唯一。

1.4 多工程打包

1.4.1 示例

java -jar app_packing_tool.jar --mode multiApp --hap-list 1.hap,2.hap --app-list 1.app,2.app --out-path final.app

1.4.2 参数含义及规范

指令 是否必选项 选项 描述
--mode multiApp 打包类型,在将多个hap打入同一个app时,需保证每个hap满足合法性校验规则。
--hap-list hap的路径 1.hap包文件路径,文件名必须以.hap为后缀。如果是多个hap包需要”,“分隔。2.hap文件路径也可以是目录。
--hsp-list hsp的路径 1.hsp包文件路径,文件名必须以.hsp为后缀。如果是多个hsp包需要”,“分隔。2.hsp文件路径也可以是目录。
--app-list app的路径 1.app文件路径,文件名必须以.app为后缀。如果是多个app包需要用”,“分隔。2.app文件路径也可以是目录。3.--hap-list,--hsp-list,--app-list不可以都不传。
--out-path NA 目标文件路径,文件名必须以.app为后缀。
--force 默认值为false 默认值为false,如果为true,表示当目标文件存在时,强制删除。

1.4.3 多工程打包hap合法性校验

需要保证被打包的每个hap在json文件中配置的bundleName,versionCode和versionName,minCompatibleVersionCode相同,minAPIVersion,targetAPIVersion,apiReleaseType相同,moduleName唯一,同一设备entry唯一,对于fa模型,还需要保证json文件中配置的package唯一。

1.5 hqf模式打包指令

1.5.1 示例

java -jar app_packing_tool.jar --mode hqf --json-path <option> --lib-path <option> --ets-path <option> --out-path <option>

1.5.2 参数含义及规范

指令 是否必选项 选项 描述
--mode hqf 打包类型。
--json-path NA .json文件路径,文件名必须为patch.json。
--lib-path NA lib库文件的路径。
--ets-path NA 存放ets文件目录路径。
--out-path NA 目标文件路径,文件名必须以.hqf为后缀。
--force true或者false 默认值为false,如果为true,表示当目标文件存在时,强制删除。

1.6 appqf模式打包指令

1.6.1 示例

java -jar app_packing_tool.jar --mode appqf --hqf-list <option> --out-path <option>

1.6.2 参数含义及规范

指令 是否必选项 选项 描述
--mode appqf 打包类型。
--hqf-list NA hqf文件路径,多个hqf以英文逗号隔开。
--out-path NA 目标文件路径,文件名必须以.appqf为后缀。
--force true或者false 默认值为false,如果为true,表示当目标文件存在时,强制删除。

1.7 hsp模式打包指令

1.7.1 示例

java -jar path\app_packing_tool.jar --mode hsp --json-path <option> --resources-path <option> --ets-path <option> --index-path <option> --pack-info-path <option> --out-path path\out\library.hsp --force true --compress-level 5 --pkg-context-path <option>

1.7.2 参数含义及规范

指令 是否必选项 选项 描述
--mode hsp 打包类型。
--json-path NA .json文件路径,文件名必须为module.json。
--profile-path NA CAPABILITY.profile文件路径。
--dex-path NA 1.dex文件路径,文件名必须以.dex为后缀。如果是多个dex需要用“,”分隔。2.dex文件路径也可以为目录。
--lib-path NA lib库文件路径。
--resources-path NA resources资源包路径。
--index-path NA .index文件路径,文件名必须为resources.index。
--pack-info-path NA pack.info文件路径,文件名必须为pack.info。
--js-path NA 存放js文件目录路径。
--ets-path NA 存放ets文件目录路径。
--out-path NA 目标文件路径,文件名必须以.hsp为后缀。
--force true或者false 默认值为false,如果为true,表示当目标文件存在时,强制删除。
--an-path NA 存放an文件的路径。
--ap-path NA 存放ap文件的路径。
--dir-list NA 可指定目标文件夹列表,将其打入hap包内
--compress-level number 压缩等级,默认值1,可选等级1-9。在应用配置compressNativeLibs参数为true的情况下生效,数值越大压缩率越高、压缩速度越慢。
--pkg-context-path NA 可指定语境信息表文件路径,文件名必须为pkgContextInfo.json。

1.8 versionNormalize模式指令

如果一个应用由多个团队开发,当只有一个hap或hsp需要修改升级时,可以调用此命令,将多个hap、hsp的版本统一。本命令会修改所传入的hap、hsp的版本号和版本名称,并在指定目录生成修改后的同名hap、hsp,以及一个version_record.json文件,用于记录所有hap、hsp原有的版本号、版本名称。

1.8.1 示例

java -jar path\app_packing_tool.jar --mode versionNormalize --input-list 1.hap,2.hsp --version-code 1000001 --version-name 1.0.1 --out-path path\out\

1.8.2 参数含义及规范

指令 是否必选项 选项 描述
--mode versionNormalize 命令类型。
--input-list hap或hsp的路径 1.hap或hsp包文件路径,文件名必须以.hap或.hsp为后缀。如果是多个hap包需要”,“分隔。2.hap包或hsp包目录。
--version-code 版本号 指定的版本号,hap、hsp的版本号会被修改为该版本。需要为整数,且不小于所有传入的hap、hsp的版本号。
--version-name 版本名称 指定的版本名称,hap、hsp的版本名称会被修改为该版本名称。
--out-path NA 目标文件路径,需要为一个目录。

2. 拆包指令说明

2.1 hap包模式拆包指令

2.1.1 示例

java -jar app_unpacking_tool.jar --mode <option> --hap-path <options> --out-path [option] --force [option]

2.1.2 参数含义及规范

指令 是否必选项 选项 描述
--mode hap 拆包类型。
--hap-path NA hap包路径。
--rpcid true或者false 是否单独将rpcid文件从hap包中提取到指定目录,如果为true,将仅提取rpcid文件,不对hap包进行拆包。
--out-path NA 拆包目标文件路径。
--force true或者false 默认值为false,如果为true,表示当目标文件存在时,强制删除。

2.2 har包模式拆包指令

2.2.1 示例

java -jar app_unpacking_tool.jar --mode <options> --har-path <option> --out-path [option] --force [option]

2.2.2 参数含义及规范

指令 是否必选项 选项 描述
--mode har 拆包类型。
--har-path NA har包路径。
--out-path NA 拆包目标文件路径。
--force true或者false 默认值为false,如果为true,表示当目标文件存在时,强制删除。

2.3 app包模式拆包指令

2.3.1 示例

java -jar app_unpacking_tool.jar --mode <options> --app-path <option> --out-path [option] --force [option]

2.3.2 参数含义及规范

指令 是否必选项 选项 描述
--mode app 拆包类型。
--app-path NA app包路径。
--out-path NA 拆包目标文件路径。
--force true或者false 默认值为false,如果为true,表示当目标文件存在时,强制删除。

2.4 从hap包中获取rpcid文件

2.4.1 示例

java -jar app_unpacking_tool.jar --mode hap --rpcid true --hap-path <option> --out-path <option> --force true

2.4.2 参数含义及规范

指令 是否必选项 选项 描述
--mode hap 拆包类型
--rpcid true或者false 是否单独将rpcid文件从hap包中提取到指定目录,如果为true,将仅提取rpcid文件,不对hap包进行拆包。
--hap-path NA hap包路径
--out-path NA 拆包rpcid目标文件路径
--force true或者false 默认值为false,如果为true,表示当目标文件存在时,强制删除。

2.5 hsp包模式拆包指令

2.5.1 示例

java -jar app_unpacking_tool.jar --mode <option> --hsp-path <options> --out-path [option] --force [option]

2.5.2 参数含义及规范

指令 是否必选项 选项 描述
--mode hsp 拆包类型。
--hsp-path NA hsp包路径。
--out-path NA 拆包目标文件路径。
--force true或者false 默认值为false,如果为true,表示当目标文件存在时,强制删除。

2.6 appqf模式拆包指令

2.6.1 示例

java -jar app_unpacking_tool.jar --mode <option> --appqf-path <options> --out-path [option] --force [option]

2.6.2 参数含义及规范

指令 是否必选项 选项 描述
--mode appqf 拆包类型。
--appqf-path NA appqf包路径。
--out-path NA 拆包目标文件路径。
--force true或者false 默认值为false,如果为true,表示当目标文件存在时,强制删除。

3. 包解析接口

3.1 接口目录

类名 接口原型 类型 接口详细描述
UncompressEntrance UncomperssResult parseApp(String appPath,String parseMode,String deviceType,String hapName) Java接口 接口功能:根据参数解析app包的pack.info信息 输入参数:app包路径,解析参数 返回值:UncomperssResult
UncompressEntrance UncomperssResult parseApp(InputStream input,String parseMode,String deviceType,String hapName,String outPath) Java接口 接口功能:根据参数解析app包的pack.info信息 输入参数:app文件流,解析参数 返回值:UncomperssResult
UncompressEntrance UncomperssResult parseHap(String hapPath) Java接口 接口功能:根据参数解析app包的json配置文件 输入参数:hap包路径,解析参数 返回值:UncomperssResult
UncompressEntrance UncomperssResult parseHap(InputStream input) Java接口 接口功能:根据参数解析app包的json配置文件 输入参数:hap包文件流,解析参数 返回值:UncomperssResult

4. 拆包工具信息字段

4.1 UncomperssResult(Bundle信息)结构体信息

字段 类型 描述 备注
result boolean 标识此次解析是否成功 NA
message String 解析失败时返回失败原因 NA
packInfos List<PackInfo> bundle中pack.info文件的packages信息 NA
profileInfos List<profileInfo> 应用的配置信息 NA
profileInfosStr List<String> 应用的配置信息 NA
icon String 返回入口组件的icon路径,如果没有入口组件,则返回第一个组件的icon信息 NA
label String 返回入口组件的label,如果没有入口组件,则返回第一个组件的label信息 NA

4.2 PackInfo结构体信息

字段 类型 描述 备注
name String 包名 NA
moduleName String Hap名称 NA
moduleType String module的类型 NA
deviceType List<String> 表示当前hap包所支持的设备类型 NA
deliveryWithInstall boolean 标识当前hap是否在用户主动安装的时候安装 NA

4.3 ProfileInfo结构体信息

字段 类型 描述 备注
hapName String 标识当前解析的hap包名称 NA
appInfo AppInfo结构体(见下述AppInfo) 标识APP信息的结构体(见下述AppInfo信息) NA
deviceConfig Map<String,DeviceConfig> 标识设备信息 存储类型为Map<String,String>,存储设备类型名称及对应设备类型的信息,在stage模型中,这个字段存储在app结构体中
hapInfo HapInfo结构体(见下述HapInfo) 标识hap包中module信息(见下述HapInfo信息) NA

4.4 AppInfo结构体信息

字段 类型 描述 备注
bundleName String 标识app的包名称 NA
vendor String 标识app的供应商信息 NA
relatedBundleName String 标识app相关bundle的包名 NA
versionName String 标识app中的versionName信息 NA
versionCode String 标识app中的versionCode信息 NA
targetApiVersion int 标识应用运行需要的API目标版本 NA
compatibleApiVersion int 标识应用兼容的API版本 NA
appName String 标识显示在桌面上的ability的label NA
appNameEN String 标识显示在桌面上的ability的label NA
releaseType String 标识应用运行需要的API目标版本的类型 NA
shellVersionCode String 标识HarmonyOS中的API版本 NA
shellVersionName String 标识HarmonyOS中的API版本名称 NA
multiFrameworkBundle String 标识bundleName NA
debug boolean 标识应用是否可调试 NA
icon String 标识应用的图标路径 NA
label String 标识应用的label NA
description String 标识应用的描述信息 stage模型新增
minCompatibleVersionCode int 标识应用能够兼容的最低版本号 NA
distributedNotificationEnabled boolean 标记该应用是否开启分布式通知 stage模型新增
bundleType String 标识bundle的类型,取值:
- app:普通应用
- atomicService:元服务
- shared:应用间共享库
NA
compileSdkVersion String 标识编译该应用时使用的sdk版本 stage模型新增
compileSdkType String 标识编译该应用时使用的sdk类别 stage模型新增
labels HashMap<String, String> 标识多语言应用程序AppJson的标签。 NA
descriptions HashMap<String, String> 标识多语言应用程序AppJson的说明。 NA
compileSdkVersion String 标识编译该应用时使用的sdk版本 NA
compileSdkType String 标识编译该应用时使用的sdk类别 NA

4.5 HapInfo结构体信息

字段 类型 描述 备注
appModel AppModel枚举值 标识应用的框架模型
- FA:FA模型
- STAGE:Stage模型
NA
packageStr String 标识应用的包信息 FA模型特有
name String 标识当前module的名字 NA
description String 标识hap包的描述信息 FA模型特有
supportedModes List<String> 标识hap包的支持的模式 NA
abilities List<AbilityInfo> 标识hap包ability信息 NA
defPermissions List<DefPermission> 标识hap包DefPermission信息 NA
definePermissions List<DefinePermission> 标识hap包DefinePermission信息 NA
defPermissionsGroups List<DefPermissionsGroups> 标识hap包DefPermissionsGroups 信息 NA
distro Distro结构体 标识hap包的distro信息 NA
reqCapabilities List<String> 标识hap包reqCapabilities信息 NA
deviceType List<String> 标识hap可以运行在哪类设备上 对应stage模型中的deviceTypes
metaData MetaData结构体(见下述metaData) 标识hap的自定义元信息 NA
dependencies List<DependencyItem> 标识hap包DependencyItem信息 NA
isJs boolean 标识该应用是否是js应用 FA模型特有
reqPermissions list<ReqPermission> 标识应用申请的权限的集合 对应stage模型的requestPermissions
commonEvents CommonEvent结构体(见下述CommentEvent) 标识静态事件 NA
shortcuts list<Shortcut> 标识应用的shortcuts信息 NA
distroFilter DistroFilter结构体 标识应用市场按设备形态分发的信息 NA
srcEntrance String 标识应用对应的入口代码路径 stage模型新增
process String 标识hap的进程名 stage模型新增
mainElement String 标识hap的入口ability名称或者extension名称 stage模型新增,FA模型将mainAbility的值赋值给mainElement
uiSyntax String 定义该JS Component的语法类型 stage模型新增
pages List<String> 列举JS Component中每个页面信息 stage模型新增
extensionAbilityInfos List<ExtensionAbilityInfo> 描述extensionAbility的配置信息 stage模型新增
moduleAtomicService ModuleAtomicService结构体(见下述ModuleAtomicService) 描述hap的元服务信息 NA
formInfos List<AbilityFormInfo> 描述卡片的信息 NA
descriptions HashMap<String, String> 标识hap的说明信息 NA

4.6 AbilityInfo结构体信息

字段 类型 描述 备注
name String 标识当前ability的逻辑名 NA
description String 标识ability的描述 NA
descriptionRes String 标识ability资源的描述 NA
icon String 标识ability图标 NA
iconPath String 标识ability图标路径 NA
label String 标识ability对用户显示的名称 NA
labelRes String 标识ability对用户显示的名称资源 NA
type String 标识ability类型 Stage模型下该值直接赋予page类型
formsEnabled boolean 标识ability卡片是否使能 NA
formInfo FormInfo结构体 描述卡片的信息 NA
uri String 标识ability的uri信息 FA模型支持
launchType String 标识ability中的launcherType信息 NA
orientation String 标识ability中的orientation信息 NA
visible boolean 标识ability中的visible信息 NA
grantPermission boolean 标识ability中的grantPermission信息 NA
readPermission String 标识ability中的readPermission信息 NA
writePermission String 标识ability中的writePermission信息 NA
uriPermissionMode String 标识ability中的uriPermissionMode信息 NA
uriPermissionPath String 标识ability中的uriPermissionPath信息 NA
directLaunch boolean 标识ability中的directLaunch信息 NA
mission String 标识ability中的mission信息 NA
targetAbility String 标识ability中的targetAbility信息 NA
multiUserShared boolean 标识ability中的multiUserShared信息 NA
supportPipMode boolean 标识ability中的supportPipMode信息 NA
srcLanguage String 标识ability中的srcLanguage信息 NA
srcPath String 标识ability中的srcPath信息 NA
srcEntrance String 标识ability中的srcEntrance信息 NA
continuable boolean 标识ability中的continuable信息 NA
metaData MetaData结构体(见下述MetaData) 标识ability的自定义元信息 NA
configChanges List<String> 标识ability中的configChanges信息 NA
formInfos List<AbilityFormInfo> 标识ability中的forms信息 NA
permissions List<String> 标识ability中的permissions信息 NA
skills List<SkillInfo> 标识ability中的skills信息 NA
backgroundModes List<String> 标识ability中的backgroundModes信息 NA
labels HashMap<String, String> 标识多语言下ability对用户显示的名称 NA
descriptions HashMap<String, String> 标识多语言下ability的描述 NA

4.7 Distro结构体信息

字段 类型 描述 备注
moduleName String 标识当前module的名字 对应Stage模型中module结构体中的moduleName字段
moduleType String 标识当前hap的类型 对应Stage模型中module结构体中的moduleType字段
deliveryWithInstall boolean 标识当前hap是否在用户主动安装的时候安装 对应Stage模型中module结构体中的deliveryWithInstall字段
installationFree int 标识当前hap是否支持免安装特性 对应Stage模型中module结构体中的installationFree字段,json文件中如果配置了该字段为true,返回1,配置为false,返回0,未配置返回2
virtualMachine String 标识当前hap运行的目标虚拟机类型,供云端分发使用,如应用市场和分发中心 对应Stage模型中module结构体中的virtualMachine字段

4.8 MetaData结构体信息

字段 类型 描述 备注
parameters List<MetaDataInfo> 标识Metadata的参数信息 FA模型特有,stage模型废弃
results List<MetaDataInfo> 标识Metadata的results信息 FA模型特有,stage模型废弃
customizeDatas List<CustomizeData> 标识Metadata的customizeDatas信息 NA

4.9 MetaDataInfo结构体信息

字段 类型 描述 备注
name String 标识MetaDataInfo的name信息 FA模型特有,stage模型废弃
description String 标识MetaDataInfo的description信息 FA模型特有,stage模型废弃
type String 标识MetaDataInfo的type信息 FA模型特有,stage模型废弃

4.10 CustomizeData结构体信息

字段 类型 描述 备注
name String 标识CustomizeData的name信息 对应stage模型的metadata
value String 标识CustomizeData的value信息 对应stage模型的metadata
extra String 标识CustomizeData的extra信息 对应stage模型的metadata

4.11 ReqPermission结构体信息

字段 类型 描述 备注
name String 标识ReqPermission的名称信息 NA
reason String 当申请的权限为user_grant权限时此字段必填,描述申请权限的原因 NA
usedScene UsedScene结构体(见下述UsedScene) 描述权限使用的场景和时机。场景类型有:ability、调用时机(when),可配置多个ability NA
reasons HashMap<String, String> 当申请的权限为user_grant权限时此字段必填,描述申请权限的原因 NA

4.12 UsedScene结构体信息

字段 类型 描述 备注
ability List<String> 标识需要使用到该权限的元能力(ability),该标签值为数组形式 NA
when String 标识使用该权限的时机,值为inuse/always,表示为仅允许前台使用和前后台都可使用 NA

4.13 Shortcut结构体信息

字段 类型 描述 备注
shortcutId String 标识ShortCut的Id NA
label String 标识ShortCut的标签信息 NA
icon String 标识ShortCut的图标信息 NA
intents List<IntentInfo> 标识快捷方式内定义的目标intent信息集合,每个intent可配置两个子标签,targetClass,targetBundle NA
labels HashMap<String, String> 标识多语言下ShortCut对用户显示的名称 NA

4.14 IntentInfo结构体信息

字段 类型 描述 备注
targetClass String 快捷方式目标类型 NA
targetBundle String 快捷方式目标包名 NA

4.15 DistroFilter结构体信息

字段 类型 描述 备注
apiVersion ApiVersion结构体 标识DistroFilter中的apiVersion信息 NA
screenShape ScreenShape结构体 标识DistroFilter中的screenShape信息 NA
screenDensity ScreenDensity结构体 标识DistroFilter中的screenDensity信息 NA
screenWindow ScreenWindow结构体 标识DistroFilter中的screenWindow信息 NA
countryCode CountryCode结构体 标识DistroFilter中的countryCode信息 NA

4.16 ApiVersion结构体信息

字段 类型 描述 备注
policy String 标识结构体中的policy信息 NA
value List<String> 标识结构体中的value信息 NA

4.17 ScreenShape结构体信息

字段 类型 描述 备注
policy String 标识结构体中的policy信息 NA
value List<String> 标识结构体中的value信息 NA

4.18 ScreenDensity结构体信息

字段 类型 描述 备注
policy String 标识结构体中的policy信息 NA
value List<String> 标识结构体中的value信息 NA

4.19 ScreenWindow结构体信息

字段 类型 描述 备注
policy String 标识结构体中的policy信息 NA
value List<String> 标识结构体中的value信息 NA

4.20 CountryCode结构体信息

字段 类型 描述 备注
policy String 标识结构体中的policy信息 NA
value List<String> 标识结构体中的value信息 NA

4.21 ExtensionAbilityInfo结构体信息

字段 类型 描述 备注
name String 标识当前extensionAbility的逻辑名 stage模型支持
srcEntrance String 标识extensionAbility所对应的js代码路径 stage模型支持
icon String 标签标识extensionAbility图标 stage模型支持
label String 标识extensionAbility对用户显示的名称 stage模型支持
description String 标识extensionAbility的描述 stage模型支持
type String 标识extensionAbility的类型:form、workScheduler、inputMethod、service、accessibility、dataShare、fileShare、wallpaper、backup stage模型支持,目前仅解析了form、staticSubscriber的信息、其他类型(如:workScheduler、inputMethod、service、accessibility、dataShare、fileShare、wallpaper、backup)暂未解析
permissions List<String> 标识被其它应用的ability调用时需要申请的权限的集合 stage模型支持
readPermission String 标识读取ability的数据所需的权限 stage模型支持
writePermission String 标识向ability写数据所需的权限 stage模型支持
visible boolean 标识extensionAbility是否可以被其它应用调用 stage模型支持
skills List<SkillInfo> 标识extensionAbility能够接收的意图的特征集 stage模型支持
metadataInfos List<ModuleMetadataInfo> 标识extensionAbility能够接收的元数据信息 stage模型支持
metadata MetaData结构体 标识extensionAbility的元信息 将metadata中的信息赋值到CustomizeData中
uri String 标识extensionAbility提供的数据uri stage模型支持
descriptions HashMap<String, String> 标识多语言下extensionAbility的描述 NA
labels HashMap<String, String> 标识多语言下extensionAbility对用户显示的名称 NA

4.22 SkillInfo结构体信息

字段 类型 描述 备注
actions List<String> 标识能够接收的意图的action值的集合 NA
entities List<String> 标识能够接收的意图的元能力的类别集合 NA

4.23 UriInfo结构体信息

字段 类型 描述 备注
schema String 标识ModuleUriInfo的范式信息 NA
host String 标识ModuleUriInfo的宿主信息 NA
port String 标识ModuleUriInfo的端口信息 NA
pathStartWith String 标识ModuleUriInfo的路径前缀 NA
pathRegex String 标识ModuleUriInfo的路径正则信息 NA
path String 标识ModuleUriInfo的路径信息 NA
type String 标识ModuleUriInfo的种类 NA

4.24 AbilityFormInfo结构体信息

字段 类型 描述 备注
name String 标识forms的名称 NA
type String 标签标识卡片的类型 NA
updateEnabled boolean 标识该卡片是否支持定时刷新 NA
scheduledUpdateTime String 标签标识卡片顶点刷新的时间,采用24小时计数,精确到分钟 NA
updateDuration int 标识卡片定时刷新的更新频率,单位为30分钟,取值为30的倍数值 NA
supportDimensions List<String> 标识卡片外观规格,取值为”1 * 2“,”2 * 2“,”2 * 4“,”4 * 4“ NA
defaultDimension String 标识卡片默认外观规格,取值必须在supportDimensions配置的列表中 NA
MetaData MetaData 标识卡片的自定义信息 NA
description String 标识forms的描述 stage模型新增
src String 标签JS卡片对应的UI代码 NA
windowInfo ModuleWindowInfo结构体 标签能力窗体的窗口。 NA
isDefault boolean 标识该卡片是否为默认卡片,每个hap有且只能有一个默认卡片 NA
colorMode String 标识卡片的色调,取值为auto、dark、light其中之一 NA
formConfigAbility String 标识卡片调整的Ability名称 NA
formVisibleNotify String 标识卡片是否被允许使用卡片可见性通知 NA
providerAbility String 卡片的提供方所在的Ability或者extension名称,1.FA模型:如果卡片配置在service类型的ability中,providerAbility配置为mainAbility 2.FA模型:如果卡片配置在Page类型的Ability中,providerAbility配置为当前Ability 3.FA模型:如果没有配置mainAbility,providerAbility配置为当前hap包中的优先使用system.home,否则第一个page的Ability 4.stage模型中(follow上述规则),providerAbility配置为mainElement NA
descriptions HashMap<String, String> 标识多语言下ability的描述 NA

4.25 CommonEvent结构体信息

字段 类型 描述 备注
name String 当前静态公共事件对应的类名 Stage模型从staticSubscriber类型的Extension中获取
permission String 标识实现该静态公共事件需要申请的权限 Stage模型从staticSubscriber类型的Extension中获取
data List<String> 当前静态公共时间需要携带的额外数据数组 Stage模型从staticSubscriber类型的Extension中获取
type List<String> 配置当前静态公共时间的类别数组 Stage模型从staticSubscriber类型的Extension中获取
events List<String> 标识能够接收的意图的event值的集合 Stage模型从staticSubscriber类型的Extension中获取

4.26 DependencyItem结构体信息

字段 类型 描述 备注
bundleName String 共享包的bundleName NA
moduleName String 共享包的moduleName NA
versionCode String 共享包的版本号 NA

4.27 ModuleAtomicService结构体信息

字段 类型 描述 备注
preloadItems list<PreloadItem> 预加载对象 NA

4.28 PreloadItem结构体信息

字段 类型 描述 备注
moduleName String 预加载的模块名 NA

4.29 DeviceConfig结构体信息

字段 类型 描述 备注
targetReqSdk String 标识应用程序DeviceConfig的目标请求Sdk版本 NA
compatibleReqSdk String 标识应用程序DeviceConfig的兼容请求Sdk版本 NA
jointUserid String 标识应用程序DeviceConfig的jointUserid NA
process String 标识应用程序DeviceConfig的进程 NA
arkFlag String 标识应用程序DeviceConfig的arkFlag NA
targetArkVersion String 标识应用程序DeviceConfig的targetArkVersion NA
compatibleArkVersion String 标识应用程序DeviceConfig的兼容ArkVersion NA
directLaunch boolean 标识应用程序DeviceConfig的直接启动 NA
distributedNotificationEnabled boolean 标识应用程序AppJson的distributedNotificationEnabled NA

4.30 DefPermission结构体信息

字段 类型 描述 备注
name String 标识指示DefPermission的名称 NA
grantMode String 标识DefPermission的grantMode NA
group String 标识DefPermission的组 NA
label String 标识DefPermission的标签 NA
description String 标识DefPermission的描述 NA
availableScope List<String> 标识DefPermission的可用范围 NA
labels HashMap<String, String> 标识多语言应用程序DefPermission的标签 NA
descriptions HashMap<String, String> 标识多语言应用程序DefPermission的说明 NA

4.31 DefinePermission结构体信息

字段 类型 描述 备注
name String 标识DefPermission的名称 NA
grantMode String 标识DefPermission的grantMode NA
availableLevel String 标识DefPermission的组 NA
provisionEnable boolean 标识模块定义权限的提供启用 NA
distributedSceneEnable boolean 标识ModuleDefinePermissions的distributedSceneEnable NA
label String 标识DefPermission的标签 NA
description String 标识DefPermission的描述 NA
descriptions HashMap<String, String> 标识多语言应用程序DefPermission的说明 NA
labels HashMap<String, String> 标识多语言应用程序DefPermission的标签 NA

4.32 DefPermissionsGroups结构体信息

字段 类型 描述 备注
name String 标识DefPermissionGroup的名称 NA
order String 标识DefPermissionGrou的顺序 NA
icon String 标识DefPermissionGroup的图标 NA
label String 标识DefPermissionGroup的标签 NA
description String 标识DefPermissionGroup的描述 NA
request boolean 标识DefPermissionGroup的请求 NA

4.33 FormInfo结构体信息

字段 类型 描述 备注
formEntity List<String> 标识formInfo的formEntity NA
minHeight String 标识formInfo的最小高度 NA
defaultHeight String 标识formInfo的默认高度 NA
minWidth String 标识formInfo的最小宽度 NA
defaultWidth String 标识formInfo的默认宽度 NA

4.34 ModuleMetadataInfo结构体信息

字段 类型 描述 备注
name String 标识ModuleMetadataInfo的名称 NA
value String 标识ModuleMetadataInfo的值 NA
resource String 标识ModuleMetadataInfo的资源 NA

4.35 ModuleWindowInfo结构体信息

字段 类型 描述 备注
designWidth int 标识模块已用场景的设计宽度 NA
autoDesignWidth boolean 标识ModuleUsedScene的autoDesignWidth NA
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS

简介

暂无描述 展开 收起
Java 等 5 种语言
Apache-2.0
取消

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/openharmony/developtools_packing_tool.git
git@gitee.com:openharmony/developtools_packing_tool.git
openharmony
developtools_packing_tool
developtools_packing_tool
master

搜索帮助