@xiong.zhang I tried the whole setup and found missing partition outputs looking to serial console. Is any previous step I need to perform to get proper partition table?
Logs from last step (flashing img files):
Flashing sparse image at offset 304128
Flashing Sparse Image
… wrote 782131200 bytes to ‘super’
Starting download of 29675668 bytes
…
…
…
…
downloading of 29675668 bytes finished
Flashing sparse image at offset 304128
Flashing Sparse Image
… wrote 30224384 bytes to ‘super’
** Bad device specification mmc userdata_a **
** Bad device specification mmc userdata_a **
Couldn’t find partition mmc userdata_a
Starting download of 2314516 bytes
…
downloading of 2314516 bytes finished
Flashing sparse image at offset 6628352
Flashing Sparse Image
… wrote 19013632 bytes to ‘userdata’
** Bad device specification mmc dtbo_a_a **
** Bad device specification mmc dtbo_a_a **
Couldn’t find partition mmc dtbo_a_a
Starting download of 4600 bytes
downloading of 4600 bytes finished
Flashing Raw Image
… wrote 4608 bytes to ‘dtbo_a’
** Bad device specification mmc dtbo_b_a **
** Bad device specification mmc dtbo_b_a **
Couldn’t find partition mmc dtbo_b_a
Starting download of 4600 bytes
downloading of 4600 bytes finished
Flashing Raw Image
… wrote 4608 bytes to ‘dtbo_b’
** Bad device specification mmc misc_a **
** Bad device specification mmc misc_a **
Couldn’t find partition mmc misc_a
Erasing blocks 5120 to 6144 due to alignment
… erased 524288 bytes from ‘misc’
** Bad device specification mmc frp_a **
** Bad device specification mmc frp_a **
Couldn’t find partition mmc frp_a
Erasing blocks 6144 to 7168 due to alignment
… erased 524288 bytes from ‘frp’
** Bad device specification mmc metadata_a **
** Bad device specification mmc metadata_a **
Couldn’t find partition mmc metadata_a
Starting download of 45132 bytes
downloading of 45132 bytes finished
Flashing sparse image at offset 6595584
Flashing Sparse Image
… wrote 45056 bytes to ‘metadata’
** Bad device specification mmc vbmeta_a_a **
** Bad device specification mmc vbmeta_a_a **
Couldn’t find partition mmc vbmeta_a_a
Starting download of 4096 bytes
downloading of 4096 bytes finished
Flashing Raw Image
… wrote 4096 bytes to ‘vbmeta_a’
** Bad device specification mmc vbmeta_b_a **
** Bad device specification mmc vbmeta_b_a **
Couldn’t find partition mmc vbmeta_b_a
Starting download of 4096 bytes
downloading of 4096 bytes finished
Flashing Raw Image
… wrote 4096 bytes to ‘vbmeta_b’
Hi, I’ve just uploaded the binaries to the board with some modifications to add a new system service, and a new app to test the system service. What’s happening is that when I open the ADB and try to execute almost any default common command, I’ve got the following error:
I’ve just followed all the processes described in the post, is there anything I need to add to the compilation?
I have done that step and double checked that force_avb is 1 after reset.
Here is the last log:
Model: Khadas VIM3
SoC: Amlogic Meson G12B (A311D) Revision 29:b (10:2)
DRAM: 2 GiB (effective 3.8 GiB)
Core: 410 devices, 36 uclasses, devicetree: separate
MMC: sd@ffe03000: 0, sd@ffe05000: 1, mmc@ffe07000: 2
Loading Environment from MMC... OK
In: usbkbd,serial
Out: vidconsole,serial
Err: vidconsole,serial
Net: eth0: ethernet@ff3f0000
Hit any key to stop autoboot: 0
Verify GPT: success!
dev: pinctrl@14
dev: pinctrl@40
gpio: pin 88 (gpio 88) value is 1
syntax error
Loading Android boot partition...
switch to partitions #0, OK
mmc2(part 0) is current device
misc partition number:0x2
Android boot failed, error -22.
A/B cmdline addition: androidboot.slot_suffix=_
## Android Verified Boot 2.0 version 1.1.0
read_is_device_unlocked not supported yet
Can't find partition 'vbmeta_'
Can't find partition 'boot_'
avb_slot_verify.c:638: ERROR: boot_: Error loading footer.
I/O error occurred during verification
AVB verification failed.
mmc - MMC sub system
Usage:
mmc info - display info of the current MMC device
mmc read addr blk# cnt
mmc write addr blk# cnt
mmc erase blk# cnt
mmc rescan [mode]
mmc part - lists available partition on current mmc device
mmc dev [dev] [part] [mode] - show or set current mmc device [partition] and set mode
- the required speed mode is passed as the index from the following list
[MMC_LEGACY, MMC_HS, SD_HS, MMC_HS_52, MMC_DDR_52, UHS_SDR12, UHS_SDR25,
UHS_SDR50, UHS_DDR50, UHS_SDR104, MMC_HS_200, MMC_HS_400, MMC_HS_400_ES]
mmc list - lists available devices
mmc wp [PART] - power on write protect boot partitions
arguments:
PART - [0|1]
: 0 - first boot partition, 1 - second boot partition
if not assigned, write protect all boot partitions
mmc hwpartition <USER> <GP> <MODE> - does hardware partitioning
arguments (sizes in 512-byte blocks):
USER - <user> <enh> <start> <cnt> <wrrel> <{on|off}>
: sets user data area attributes
GP - <{gp1|gp2|gp3|gp4}> <cnt> <enh> <wrrel> <{on|off}>
: general purpose partition
MODE - <{check|set|complete}>
: mode, complete set partitioning completed
WARNING: Partitioning is a write-once setting once it is set to complete.
Power cycling is required to initialize partitions after set to complete.
mmc setdsr <value> - set DSR register value
Failed to boot Android...
build/make/core/version_util.mk:29: warning: Invalid TARGET_PLATFORM_VERSION ‘userdebug’, must be one of
In file included from build/make/core/config.mk:359:
In file included from build/make/core/envsetup.mk:68:
In file included from build/make/core/version_defaults.mk:110:
build/make/core/version_util.mk:30: error: UP1A UP1B UP2A UP2B UD1A UD1B UD2A UD2B UQ1A UQ1B UQ2A UQ2B UQ3A UQ3B VP1A.
18:13:13 dumpvars failed with: exit status 1
@xiong.zhang At the end of compiling, I notice a error:
2024-11-25 12:21:46 - build_super_image.py - INFO : Building super image from info dict...
2024-11-25 12:21:46 - common.py - INFO : Running: "/home/XXX/android/khadas-aosp-14/out/host/linux-x86/bin/lpmake --metadata-size 65536 --super-name super --metadata-slots 3 --virtual-ab --device super:3221225472 --group db_dynamic_partitions_a:1600126976 --group db_dynamic_partitions_b:1600126976 --partition system_a:readonly:1413971968:db_dynamic_partitions_a --image system_a=out/target/product/yukawa/system.img --partition system_b:readonly:33308672:db_dynamic_partitions_b --image system_b=out/target/product/yukawa/system_other.img --partition vendor_a:readonly:149164032:db_dynamic_partitions_a --image vendor_a=out/target/product/yukawa/vendor.img --partition vendor_b:readonly:0:db_dynamic_partitions_b --sparse --output out/target/product/yukawa/super.img"
2024-11-25 12:21:48 - common.py - INFO : lpmake I 11-25 12:21:46 1598765 1598765 builder.cpp:1093] [liblp] Partition system_a will resize from 0 bytes to 1413971968 bytes
lpmake I 11-25 12:21:46 1598765 1598765 builder.cpp:1093] [liblp] Partition system_b will resize from 0 bytes to 33308672 bytes
lpmake I 11-25 12:21:46 1598765 1598765 builder.cpp:1093] [liblp] Partition vendor_a will resize from 0 bytes to 149164032 bytes
Invalid sparse file format at header magic
Invalid sparse file format at header magic
Invalid sparse file format at header magic
2024-11-25 12:21:48 - build_super_image.py - INFO : Done writing image out/target/product/yukawa/super.img
There are several Invalid sparse file format at header magic in the log, will this affect the result making artifacts wrong? Or this make no sense to the result?