一、OTA升级
PS:代码框为文件内容
1、Android5.1 data分区未加密
a、adb push update.zip /data/
b、adb push command /cache/recovery/
--wipe_cache
--update_package=/data/update.zip
c、adb push last_flag /cache/recovery/
updating$path=/data/update.zip
d、adb reboot recovery
2、Android8.1 data分区加密
a、adb push update.zip /data/ota_package/update.zip
b、adb shell “uncrypt /data/ota_package/update.zip /cache/recovery/block.map”
c、adb push command /cache/recovery/
--update_package=@/cache/recovery/block.map
--locale=zh-CN
d、adb push last_flag /cache/recovery/
updating$path=/data/ota_package/update.zip
e、adb push uncrypt_file /cache/recovery/
/data/ota_package/update.zip
f、adb reboot recovery
二、重置
1、Android5.1
a、adb push command /cache/recovery/
--wipe_data
--wipe_cache
b、adb reboot recovery
2、Android8.1
a、adb push command /cache/recovery/
--wipe_data
--reason=MasterClearConfirm
--locale=zh-CN
b、adb reboot recovery
版权声明:本文为u014078917原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。