Android OTA升级不成功,无法切换AB分区
reboot: Restarting system with command 'dm-verity device
OTA升级后重启,设备一直重启,多次重启后会正常进入slot A分区,升级不成功
VM Hyp calls not present
2, ChargerExProtocol:: EFI_ChargerExIsOffModeCharging HARD_RESET = 1 .KPDPWR = 0 PON1 = 0 USB_CHG = 0 CBLPWR = 0
Active Slot _b is bootable, retry count 5
Booting from slot (_b)
Booting Into Mission Mode
Loading Image Start : 2271 ms
Loading Image Done : 2272 ms
.....................
[ 7.509167] verity_verify_level+0x188/0x1b8
[ 7.513456] verity_hash_for_block+0xa4/0x100
[ 7.517827] verity_work+0x12c/0x570
[ 7.521416] process_one_work+0x278/0x458
[ 7.525440] worker_thread+0x26c/0x4c0
[ 7.529208] kthread+0x140/0x150
[ 7.532449] ret_from_fork+0x10/0x18
[ 7.536036] ---[ end trace bceb746cd1aca588 ]---
[ 7.540726] of_batterydata_get_best_profile:
[ 7.544607] reboot: Restarting system with command 'dm-verity device corrupted'
从log来看OTA升级是成功的,并且将启动b 分区,但是metadata 分区校验失败了,而校验数据是放在vbmeta.img 镜像文件中,所以可能是vbmeta 分区数据有问题。
-
保证制作的OTA包中含有vbmeta.img,目录为ota_target_files/IMAGES/vbmeta.img
-
保证需要升级的分区包含了vbmeta 分区,即AB_OTA_PARTITIONS 属性中含有vbmeta,
-
device/qcom/bengal/BoardConfig.mk
# Minimum partition set for automation to test recovery generation code
# Packages generated by using just the below flag cannot be used for updating a device. You must pass
# in the full set mentioned above as part of your make commandline
AB_OTA_PARTITIONS ?= boot vendor vbmeta
else
# Non-A/B section. Define cache and recovery partition variables.
BOARD_CACHEIMAGE_PARTITION_SIZE := 268435456
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4