androidu-bootfastboot

Android: current-slot:no bootable slot - where is the A/B info stored?


I'm building Android for a custom iMX8 board. Android is working fine when booting from the SD card.

I've used uuu to put the exact same partition images on the onboard eMMC flash.

I can see the partitions on the eMMC (and SD card) after booting Android from the SD card:

smarc_mx8mq:/dev/block # ls
by-name loop5        mmcblk0boot1 mmcblk0p14 mmcblk0p4 mmcblk1    mmcblk1p14 mmcblk1p4 platform ram13 ram5 zram0
loop0   loop6        mmcblk0p1    mmcblk0p15 mmcblk0p5 mmcblk1p1  mmcblk1p15 mmcblk1p5 ram0     ram14 ram6
loop1   loop7        mmcblk0p10   mmcblk0p16 mmcblk0p6 mmcblk1p10 mmcblk1p16 mmcblk1p6 ram1     ram15 ram7
loop2   loop8        mmcblk0p11   mmcblk0p17 mmcblk0p7 mmcblk1p11 mmcblk1p17 mmcblk1p7 ram10    ram2  ram8
loop3   mmcblk0      mmcblk0p12   mmcblk0p2  mmcblk0p8 mmcblk1p12 mmcblk1p2  mmcblk1p8 ram11    ram3  ram9
loop4   mmcblk0boot0 mmcblk0p13   mmcblk0p3  mmcblk0p9 mmcblk1p13 mmcblk1p3  mmcblk1p9 ram12    ram4  vold

When I try to boot from eMMC I get the error:

fsl_avb_ab_flow.c:1182: ERROR: No bootable slots found.

I can boot to u-boot from the eMMC and use the command fastboot usb 0 to put it in fastboot mode.

Using fastboot flash boot boot.img from the host PC fails too, with a similar error:

error: Failed to identify current slot.

Diffing the results of fastboot getvar all with SD card, compared to eMMC, I see the following differences:

8c8
< (bootloader) erase-block-size:0x200
---
> (bootloader) erase-block-size:0x80000
40c40
< (bootloader) partition-size:all:0x3b5980000
---
> (bootloader) partition-size:all:0xece000000
75c75
< (bootloader) current-slot:a
---
> (bootloader) current-slot:no bootable slot
77c77
< (bootloader) slot-successful:a:yes
---
> (bootloader) slot-successful:a:no
79,80c79,80
< (bootloader) slot-unbootable:a:no
< (bootloader) slot-unbootable:b:no
---
> (bootloader) slot-unbootable:a:yes
> (bootloader) slot-unbootable:b:yes
82c82
< (bootloader) slot-retry-count:b:7
---
> (bootloader) slot-retry-count:b:0
84c84
< finished. total time: 0.009s
---
> finished. total time: 0.005s

So there's definitely a problem with the A/B slots on the eMMC.

I've tried fastboot --set-active=a, while it outputs:

Setting current slot to 'a'...
OKAY [  0.007s]
finished. total time: 0.007s

it doesn't fix anything.

My questions are:


Solution

  • I was able to fix this with fastboot --set-active=a followed immediately by fastboot flash boot boot.img and all the other partitions.