参考 A/B(无缝)系统更新
升级后的显著变化是 ro.build.date.utc 、和 版本号 发生变化。
ro.odm_dlkm.build.date=Thu Mar 28 01:09:45 UTC 2024
ro.odm_dlkm.build.date.utc=1711588185ro.odm.build.date=Thu Mar 28 01:09:45 UTC 2024
ro.odm.build.date.utc=1711588185ro.product.build.date=Thu Mar 28 01:09:45 UTC 2024
ro.product.build.date.utc=1711588185ro.system_dlkm.build.date=Thu Mar 28 01:09:45 UTC 2024
ro.system_dlkm.build.date.utc=1711588185ro.system.build.date=Thu Mar 28 01:09:45 UTC 2024
ro.system.build.date.utc=1711588185ro.build.date=Thu Mar 28 01:09:45 UTC 2024
ro.build.date.utc=1711588185ro.system_ext.build.date=Thu Mar 28 01:09:45 UTC 2024
ro.system_ext.build.date.utc=1711588185ro.vendor_dlkm.build.date=Thu Mar 28 01:09:45 UTC 2024
ro.vendor_dlkm.build.date.utc=1711588185ro.vendor.build.date=Thu Mar 28 01:09:45 UTC 2024
ro.vendor.build.date.utc=1711588185
应用执行A/B申请流程
待续
Selinux 权限问题
A/B 升级会有 Selinux 权限问题,会需要修改 update_engine.te 。
调试导致校验失败
A/B升级关键的 TAG 是 update_engine
。
升级时校验失败,log
04-12 16:34:43.879 653 653 E update_engine: Cannot create update snapshots with overlayfs setup. Run `adb enable-verity`, reboot, then try again.
04-12 16:34:43.881 653 653 E update_engine: [ERROR:dynamic_partition_control_android.cc(971)] Cannot create update snapshots: Error
04-12 16:34:43.884 653 653 E update_engine: [ERROR:dynamic_partition_control_android.cc(516)] PrepareSnapshotPartitionsForUpdate failed in Android mode
04-12 16:34:43.886 653 653 E update_engine: [ERROR:delta_performer.cc(744)] Unable to initialize partition metadata for slot B
04-12 16:34:43.888 653 653 E update_engine: [ERROR:download_action.cc(227)] Error ErrorCode::kInstallDeviceOpenError (7) in DeltaPerformer's Write method when processing the received payload -- Terminating processing
很显眼的 adb enable-verity
。
为了方便调试,之前有进行 adb root
、adb remount
,所以检验失败。
执行 adb root
、adb enable-verity
后可以校验、升级成功。
谨记:测试OTA时,打底软件不要做调试操作。
调试操作包括但不限于:
- adb root;adb remount
- 串口执行 mount -o rw,remount /system 等挂载命令