OpenHarmony-Launcher安装及部件更新
-
详细步骤参考仓库的README.md文档[https://gitee.com/openharmony/applications_launcher],下面是注意事项:
-
1.下载全量SDK,解压到新建文件夹sdk,并将原来的sdk目录下的
license
文件也放到sdk目录下; -
2.签名部分:把p7b文件替换为项目工程目录下的文件;
-
3.相册应用安装需要在
sdk/toolchains/lib/
目录下:-
(1).修改
UnsgnedReleasedProfileTemplate.json
文件:-
改为系统级应用:
"bundle-name":"com.ohos.photos", "apl":"system_basic", "app-feature":"hos_system_app"
-
增加安装应用权限:
"acls":{ "allowed-acls":[ "ohos.permission.INSTALL_BUNDLE" ] },
-
-
(2).运行命令重新生成p7b文件替换原来的p7b;
- 重新生成p7b文件命令:
java -jar hap-sign-tool.jar sign-profile -keyAlias "openharmony application profile release" -signAlg "SHA256withECDSA" -mode "localSign" -profileCertFile "OpenHarmonyProfileRelease.pem" -inFile "UnsgnedReleasedProfileTemplate.json" -keystoreFile "OpenHarmony.p12" -outFile "myApplication_ohos_Provision.p7b" -keyPwd "123456" -keystorePwd "123456"
-
-
-
部件更新命令:
hdc target mount
hdc shell rm -rf /data/misc_de/0/mdds/0/default/bundle_manager_service;
hdc shell rm -rf /data/accounts;
hdc shell mount -o remount,rw /;
hdc file send Launcher.hap /system/app/com.ohos.launcher/Launcher.hap;
hdc file send Launcher_Settings.hap /system/app/com.ohos.launcher/Launcher_Settings.hap;
pause
hdc shell mount -o remount,rw /;
hdc shell rm /data/* -rf;
hdc shell sync /system/bin/udevadm trigger;
hdc shell reboot;