Unable to remount on the self build Android

Which Khadas SBC do you use?

VIM3 pro

Which system do you use? Android, Ubuntu, OOWOW or others?

Android

Which version of system do you use? Khadas official images, self built images, or others?

self built images

Please describe your issue below:

can’t remount on AOSP

Post a console log of your issue below:

D:>adb remount
avb_user_verity.c:179: ERROR: Data from ‘vbmeta’ does not look like a vbmeta header.
Error setting verity state
Could not acquire IImageManager: Invalid path


--------- beginning of kernel
01-01 00:15:08.673 0 0 I logd : logdr: UID=0 GID=0 PID=5244 b tail=0 logMask=99 pid=0 start=0ns deadline=0ns
--------- beginning of main
08-18 18:23:54.765 5248 5248 I remount : [libfstab] Using Android DT directory /proc/device-tree/firmware/android/
08-18 18:23:54.773 5248 5248 E remount : Error setting verity state
01-01 00:15:17.361 0 0 I servicemanager: Since ‘gsiservice’ could not be found (requested by debug pid 5248), trying to start it as a lazy AIDL service. (if it’s not configured to be a lazy service, it may be stuck starting or still starting).
01-01 00:15:17.376 0 0 I init : starting service ‘gsid’…
08-18 18:23:54.813 5253 5253 I AidlLazyServiceRegistrar: Registering service gsiservice
01-01 00:15:17.383 0 0 I init : … started service ‘gsid’ has pid 5253
01-01 00:15:17.385 0 0 I init : Control message: Processed ctl.interface_start for ‘aidl/gsiservice’ from pid: 269 (/system/bin/servicemanager)
01-01 00:15:17.397 0 0 I BpBinder: onLastStrongRef automatically unlinking death recipients:
01-01 00:15:17.404 0 0 I servicemanager: Notifying gsiservice they do (previously: don’t) have clients when we now have a record of a client
--------- beginning of system
08-18 18:23:54.833 5253 5253 E gsid : realpath failed for metadata: /metadata/gsi/remount: No such file or directory
08-18 18:23:54.833 5253 5255 I AidlLazyServiceRegistrar: Process has 1 (of 1 available) client(s) in use after notification gsiservice has clients: 1
08-18 18:23:54.833 5248 5248 E remount : Could not acquire IImageManager: Invalid path
08-18 18:23:54.833 5248 5248 W remount : Failed to allocate scratch on /data, fallback to use free space on super
08-18 18:23:54.833 5248 5248 E remount : [liblp] Device size does not match (got 1879048192, expected 2415919104)
08-18 18:23:54.834 5248 5248 I remount : [liblp] Partition scratch will resize from 0 bytes to 536870912 bytes
08-18 18:23:54.834 5248 5248 E remount : [liblp] Block device super size mismatch (expected2415919104, got 1879048192)
08-18 18:23:54.834 5248 5248 E remount : [libfs_mgr] add partition scratch
08-18 18:23:54.834 5248 5248 E remount : Failed to create scratch partition
08-18 18:23:54.834 5248 5248 E remount : Could not allocate backing storage for overlays
08-18 18:23:54.834 5248 5248 E remount : Overlayfs setup for /system failed, skipping
08-18 18:23:54.838 5253 5256 E gsid : realpath failed for metadata: /metadata/gsi/remount: No such file or directory
08-18 18:23:54.838 5248 5248 E remount : Could not acquire IImageManager: Invalid path
08-18 18:23:54.838 5248 5248 W remount : Failed to allocate scratch on /data, fallback to use free space on super
08-18 18:23:54.839 5248 5248 E remount : [liblp] Device size does not match (got 1879048192, expected 2415919104)
08-18 18:23:54.839 5248 5248 I remount : [liblp] Partition scratch will resize from 0 bytes to 536870912 bytes
08-18 18:23:54.839 5248 5248 E remount : [liblp] Block device super size mismatch (expected2415919104, got 1879048192)
08-18 18:23:54.839 5248 5248 E remount : [libfs_mgr] add partition scratch
08-18 18:23:54.839 5248 5248 E remount : Failed to create scratch partition
08-18 18:23:54.839 5248 5248 E remount : Could not allocate backing storage for overlays
08-18 18:23:54.839 5248 5248 E remount : Overlayfs setup for /vendor failed, skipping
08-18 18:23:54.839 5248 5248 W remount : No remountable partitions were found.
08-18 18:23:54.839 5248 5248 E remount : Remount failed
08-18 18:23:56.215 5253 5256 I AidlLazyServiceRegistrar: Process has 0 (of 1 available) client(s) in use after notification gsiservice has clients: 0
08-18 18:23:56.215 5253 5256 I AidlLazyServiceRegistrar: Trying to shut down the service. No clients in use for any service in process.
01-01 00:15:18.792 0 0 I servicemanager: Notifying gsiservice they don’t (previously: do) have clients when we now have no record of a client
01-01 00:15:18.799 0 0 I servicemanager: Unregistering gsiservice
01-01 00:15:18.803 0 0 I BpBinder: onLastStrongRef automatically unlinking death recipients:
08-18 18:23:56.227 5253 5256 I AidlLazyServiceRegistrar: Unregistered all clients and exiting
01-01 00:15:18.813 0 0 I init : Service ‘gsid’ (pid 5253) exited with status 0 oneshot service took 1.432000 seconds in background
01-01 00:15:18.821 0 0 I init : Sending signal 9 to service ‘gsid’ (pid 5253) process group…
01-01 00:15:18.829 0 0 I libprocessgroup: Successfully killed process cgroup uid 0 pid 5253 in 0ms

Did you solve this? I can see the same with AOSP_14_r1 as well.

Hello,

I had the same problem:

[liblp] Device size does not match (got 1879048192, expected 2147483648)
[liblp] Block device super size mismatch (expected2147483648, got 1879048192)
[libfs_mgr] add partition scratch
Failed to create scratch partition
Could not allocate backing storage for overlays

I fixed this problem synchronizing the super partition on bootloader side

At the AOSP side, there is a variable on BoardConfig.mk:
—> BOARD_SUPER_PARTITION_SIZE := 2147483648 #2048M

This value should match with partition SUPER on bootloader size. As below:

PATH: include/configs/khadas-vim3_android.h

#define PARTS_DEFAULT
“uuid_disk=${uuid_gpt_disk};”
“name=logo,start=512K,size=2M,uuid=” LOGO_UUID
“name=misc,size=512K,uuid=${uuid_gpt_misc};”
“name=dtbo,size=8M,uuid=${uuid_gpt_dtbo};”
“name=vbmeta,size=512K,uuid=${uuid_gpt_vbmeta};”
“name=boot,size=32M,bootable,uuid=${uuid_gpt_boot};”
“name=recovery,size=64M,uuid=${uuid_gpt_recovery};”
“name=cache,size=256M,uuid=${uuid_gpt_cache};”
“name=super,size=2048M,uuid=${uuid_gpt_super};” \ <-----------THIS LINE
“name=userdata,size=12786M,uuid=${uuid_gpt_userdata};”
“name=rootfs,size=-,uuid=” ROOT_UUID
#endif

2 Likes

Thanks for the solution. I still have a question. After compiling uboot.bin according to the README of /device/amlogic/yukawa/bootloader, how to generate u-boot_kvim3_noab.bin similar to the original directory?

As you can see in the README.

Compile:
        export PATH=<path-to-toolchain>/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-elf/bin:$PATH
        export CROSS_COMPILE=aarch64-elf-
        git clone https://gitlab.baylibre.com/baylibre/amlogic/atv/u-boot.git
        cd u-boot
        git checkout u-boot/v2021.07/integ-20210712
        make [sei510|sei610|sei610_ab|khadas-vim3_android|khadas-vim3_android_ab|khadas-vim3l_android|khadas-vim3l_android_ab]_defconfig  <----- THIS LINE----
        make

There are many defconfigs, for VIM3 exist: khadas-vim3_android_defconfig and khadas-vim3_android_ab_defconfig.

To generate u-boot_kvim3_noab.bin, you need to pick the khadas-vim3_android_defconfig.

The final binary name is u-boot.bin, you can just rename to u-boot_kvim3_noab.bin (after FIP process).

PS: I never compiled u-boot using the Baylibre repository (just u-boot mainline), but the steps described in the README is very close that I use. So, I believe that is the result is the same.

Yes, that’s how I compiled it.
It seems that I need to refer to the README file to package the fip binary. Can I use the generate-bins-new.sh script to generate it? Or do you have a recommended FIP process script?

I am using this script to generate FIP binary:

Usage: ./build-fip.sh <bl33/u-boot.bin path> [output directory]

Ex: ./build-fip.sh khadas-vim3 …/u-boot/out/u-boot.bin out