-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ pixel 8 ] replace partition fail #201
Comments
I'll work on improving the error message to be clear. The problem is that you're adding a hash descriptor to You can inspect the descriptors using either avbroot:
or avbtool:
By the way, I would not recommend using |
I see I have corrupt vbmeta error I will recheck all image |
Issue: #201 Signed-off-by: Andrew Gunnerson <[email protected]>
Issue: #201 Signed-off-by: Andrew Gunnerson <[email protected]>
After more check image boot , system_dlkm , vendor_kernel_boot generated by compiler have fec error for avbtool and prevent my device to boot I'm still investigating why they are fec missing error for avbtool |
If you don't mind taking a bit of a different approach, you can use avbroot to handle all the AVB tasks. For example:
|
Haaa I will use your method more simple |
for system_dlkm its can't work " Error: Failed to write appended AVB image " " mage size is too small to fit header or footer " cause : google in newer sources have added 1 modules in system_dlkm so size is increased... I have edit manually avb.toml its still fail ... so I have after search find all tools nenessary for run avbtool https://android.googlesource.com/kernel/prebuilts/build-tools avbtool add_hashtree_footer --image system_dlkm.img /usr/bin/avbtool: Adding hashtree_footer failed: Image size of 11546624 exceeds maximum image size of 11481088 in order to fit in a partition size of 11751424.. Im out of idea for patch this new partition in pixel 8 ... |
avbtool info_image --image system_dlkm.img
|
It should be possible to increase the partition size since the Pixel 8 series uses dynamic partitions. You can just pick any size that works (either with At least on my Pixel 8 Pro, the total size for all dynamic partitions is ~7.9 GiB:
so you should be able to pick a larger size for |
/usr/bin/avbtool: Adding hashtree_footer failed: Image size of 11546624 exceeds maximum image size of 11493376 in order to fit in a partition size of 11763712.. mhmm ... |
Oh shoot, I forgot it also adds the hash tree and FEC data, which could be a couple megabytes... I think it's probably easier to just not be exact and pick something like 20 or 32 MiB. |
so I applied 16998400. avbtool add_hashtree_footer --image system_dlkm.img avbroot : so I use your method : I have modifed in avb.toml image size . avbroot avb pack -o modified.img -k ../../custom_rsa4096_private.pem avbroot ota patch reboot to recovery > adb sideload > device is corrupt error |
finally I found right step for system_dlkm thanks for all your help ! 1 ) I compile my compile here for the test its gki so I have boot & system_dlkm to replace 2 ) boot : avbtool add_hash_footer --image boot.img system_dlkm : avbtool add_hashtree_footer --image system_dlkm.img avbroot : avbroot ota patch adb sideload and its boot |
Great, thanks for reporting back with the solution! |
hi,
for replace partition I use this command :
avbroot ota patch
--input shiba-ota-ud1a.231105.004-49029a3a.zip
--replace boot boot.img.signed
--replace dtbo dtbo.img
--replace vendor_kernel_boot vendor_kernel_boot.img
--replace vendor_dlkm vendor_dlkm.img
--replace system_dlkm system_dlkm.img
--key-avb avb.key
--key-ota ota.key
--cert-ota ota.crt
--magisk Magisk-v26.4.apk
--magisk-preinit-device metadata
its return error :
[*] Patching vbmeta images: vbmeta_system, vbmeta_vendor, vbmeta
Error: Failed to patch OTA zip
Caused by:
0: Failed to patch payload: payload.bin
1: vbmeta_system's descriptor for system_dlkm must match system_dlkm's self descriptor
any idea for fix this error ?
I used after build :
avbtool add_hash_footer --image system_dlkm.img --partition_name system_dlkm --dynamic_partition_size
avbtool add_hash_footer --image dtbo.img --partition_name dtbo --partition_size --dynamic_partition_size
avbtool add_hashtree_footer --image vendor_dlkm.img --partition_name vendor_dlkm --do_not_generate_fec
avbtool add_hash_footer --image vendor_kernel_boot.img --partition_name vendor_kernel_boot --dynamic_partition_size
avbtool add_hash_footer --image boot.img --partition_name boot --dynamic_partition_size
The text was updated successfully, but these errors were encountered: