It seems the userdata is not accepted by the Android OS and it's formatted on first boot with SD card. I could see some security and partition signature related errors in bootloader, but could not find the root cause.
I have attached the Boot log file.
- If you check like 55 to 65 of the boot log; You will see some issue in the bootloader with partition table magic numbers and it tries to reset metadata.
Hit any key to stop autoboot: 0
In boota get fastboot lock status error. Set lock status
Error validating A/B metadata from disk. Resetting and writing new A/B metadata to disk.
Writing A/B metadata to disk.
Kernel load addr 0x40480000 size 52437 KiB
kernel @ 40480000 (55246848)
ramdisk @ 44680000 (12502925)
Moving Image from 0x40480000 to 0x40600000, end=43ab0000
- Also when the kernel is booted, if you check the logs between line 2069 and 2228 the userdata partition is formatted as it was considered corrupted earlier.
[ 64.723192][ T229] EXT4-fs (dm-9): Using encoding defined by superblock: utf8-12.1.0 with flags 0x0
[ 64.723192][ T229] EXT4-fs (dm-9): Using encoding defined by superblock: utf8-12.1.0 with flags 0x0
[ 64.746778][ T229] JBD2: no valid journal superblock found
[ 64.746778][ T229] JBD2: no valid journal superblock found
[ 64.758304][ T229] EXT4-fs (dm-9): error loading journal
[ 64.758304][ T229] EXT4-fs (dm-9): error loading journal
[ 64.773262][ T179] init: Unable to set property 'ro.boottime.init.mount.data' from uid:0 gid:0 pid:229: Read-only property was already set
[ 64.773262][ T179] init: Unable to set property 'ro.boottime.init.mount.data' from uid:0 gid:0 pid:229: Read-only property was already set
[ 64.828382][ T229] e2fsck: WARNING: linker: Warning: "[vdso]" unused DT entry: unknown processor-specific (type 0x70000001 arg 0x0) (ignoring)
[ 64.828382][ T229] e2fsck: WARNING: linker: Warning: "[vdso]" unused DT entry: unknown processor-specific (type 0x70000001 arg 0x0) (ignoring)
[ 64.857711][ T229] e2fsck: e2fsck 1.45.4 (23-Sep-2019)
[ 64.857711][ T229] e2fsck: e2fsck 1.45.4 (23-Sep-2019)
[ 64.874894][ T229] e2fsck: Superblock has an invalid journal (inode 8).
[ 64.874894][ T229] e2fsck: Superblock has an invalid journal (inode 8).
[ 64.888429][ T229] e2fsck: Clear? yes
[ 64.888429][ T229] e2fsck: Clear? yes
[ 64.896057][ T229] e2fsck:
[ 64.896057][ T229] e2fsck:
[ 64.901915][ T229] e2fsck: *** journal has been deleted ***
[ 64.901915][ T229] e2fsck: *** journal has been deleted ***
We are currently using ./imx-sdcard-partition.sh provided in imx android build along with all the android images when I build android. Also sharing SD card creating log.