如何手动替换系统应用?

westinyang

沙发 发表于 2023-10-30 16:07:45

先备份launcher,如果有问题稍后可替换回去

hdc file recv /system/app/com.ohos.launcher

替换launcher,注意此操作会清空设备上的/data数据目录,已安装的应用、媒体文件等都会清空

hdc shell mount -o remount,rw /
hdc file send phone-launcher-default-signed.hap /system/app/com.ohos.launcher/Launcher.hap
hdc file send launcher_settings-phone-launcher-default-signed.hap /system/app/com.ohos.launcher/Launcher_Settings.hap
hdc shell rm -rf /data/
hdc shell reboot

深开鸿_王皓

板凳 发表于 2023-10-30 16:20:24
1、开启remount权限
hdcshell mount-o remount,nw!
2、推送新版本hap包到系统应用目录下
hdc file send C:\Users\huanxue\Desktop\systemapp\Settings.hap system/app/com.ohos.settings/Settings.hap
3、修改新推入hap包权限为777
hdc shell chmod 777 system/app/com.ohos.settings/Settings.hap
4、执行安装命令 (singleton应用需要在末尾追加-u0)
hdc shell bm install -r-p system/app/com.ohos.settings/Settings.hap 5、执行查询应用版本命令,查看是否更新完成
hdc shell bm dump-n com.ohos.settings

Copyright   ©2023  OpenHarmony开发者论坛  京ICP备2020036654号-3 |技术支持 Discuz!

返回顶部