-
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
prepatch full GKI fail. #102
Comments
Sorry, I don't quite understand what you are asking for. Could you explain a bit more? Are you asking for a new option in avbroot that allows any partition to be replaced? |
yes replace vendor_boot , vendor_dlkm , dtbo , boot also I have followed all step in my pixel 6 for flash stock rom using patched magisk boot for test I have do : I flash : Flash the boot images that were extractedfor image in extracted/*.img; do
done Flash the AVB signing public keyfastboot erase avb_custom_key reboot , rom boot properly but its impossible to relock bootloader I get error I have go in recovery and doing adb sideload patched rom , its boot again but still impossible to lock bootloader |
OK, got it. I think that should be pretty simple to implement. I'll look into it soon.
Hmm, I have no idea what would cause this. I searched around for the I did see someone mention that restoring to stock with https://flash.android.com/ once resolved the issue (instead of factory image + |
I have doing search its mean bootloader detect not all partition is in "stock state" ( boot modified like kernelsu , any mod , problem avb ... ) for avoid brick its abort by this error . I need relook what is wrong in payload.bin patching process for my device payload.bin is no properly patched for my bootloader. |
https://flash.android.com/ just not work in my devices ) error detection device ... but I have find solution : - download factory rom - change slot of bootloader & flash_all.sh flash avbroot patch : flash boot.img , vendor_boot.img , vbmeta.img & avb custom key , now its work ! thanks for avbroot project ! |
Great, glad you got it working! |
Hi I have created simple script for wait its replace in payload.bin boot.img,vendor_boot.img,vendor_dlkm,dtbo.img I need. its only simple script I patch payload.bin before using avbroot I guess --argument prepatch can be modified in avbroot for allow that . `import os def replace_files(payload_bin, boot_img, vendor_boot_img, vendor_dlkm_img, dtbo_img): Args: Raises: if not os.path.exists(payload_bin): with open(payload_bin, "rb") as payload_bin_file: with open(boot_img, "rb") as boot_img_file: with open(vendor_boot_img, "rb") as vendor_boot_img_file: with open(vendor_dlkm_img, "rb") as vendor_dlkm_img_file: with open(dtbo_img, "rb") as dtbo_img_file: new_contents = contents[:] with open(payload_bin, "wb") as payload_bin_file: if name == "main": replace_files(payload_bin, boot_img, vendor_boot_img, vendor_dlkm_img, dtbo_img) print("The files have been replaced successfully.")` |
This commit adds support for replacing any partition image within the payload with a custom image. This is useful, for example, to add a custom kernel to an OTA, which may involve partitions that wouldn't normally be touched (eg. `vendor_dlkm`). Any image specified via `--replace` will have its corresponding descriptor in the vbmeta image updated. This is handled recursively. For example, replacing `vendor_dlkm` would update both `vbmeta_vendor` and `vbmeta`. This requires all vbmeta images to be extracted during the patching process so that a complete dependency graph can be computed. The performance hit in doing so is negligible, but does require the checksums of the stripped images to be updated for the tests. Fixes: #102 Signed-off-by: Andrew Gunnerson <[email protected]>
Could you give #103 a try? With the new changes, you should be able to do this: avbroot \
--prepatched boot.img \
--boot-partition @gki_kernel \
--replace dtbo dtbo.img \
--replace vendor_boot vendor_boot.img \
--replace vendor_dlkm vendor_dlkm.img \
# Remaining args...
|
its working ! for documentation you should add in case image is not a vbmeta valid ( compiled from kernel source for ex only boot have hash ) its require for other image : 1 ) avbroot/external/avb/avbtool.py add_hash_footer --image myimage.img --partition_name mypartition --partition_size or --dynamic_partition_size 2 ) avbroot |
ok its have created vbmeta corruption something is no patched properly in --replace dtbo dtbo.img
|
This commit adds support for replacing any partition image within the payload with a custom image. This is useful, for example, to add a custom kernel to an OTA, which may involve partitions that wouldn't normally be touched (eg. `vendor_dlkm`). Any image specified via `--replace` will have its corresponding descriptor in the vbmeta image updated. This is handled recursively. For example, replacing `vendor_dlkm` would update both `vbmeta_vendor` and `vbmeta`. This requires all vbmeta images to be extracted during the patching process so that a complete dependency graph can be computed. The performance hit in doing so is negligible, but does require the checksums of the stripped images to be updated for the tests. Fixes: #102 Signed-off-by: Andrew Gunnerson <[email protected]>
I just pushed a change that might fix this. I accidentally messed up the dependency solver, so it might have patched |
ok thanks I will re-test |
Oh, by the way, vendor_dlkm must use I've never built a GKI before. Does the GKI build system have a way to automatically add the vbmeta footers? |
no in kernel build environment of google its only for boot.img ( for gki ) https://android.googlesource.com/kernel/gs/+/refs/heads/android-gs-pantah-5.10-t-qpr3-beta-3/build.config.gs101#72 google assume you compile only ROM for enable AVB ... |
This commit adds support for replacing any partition image within the payload with a custom image. This is useful, for example, to add a custom kernel to an OTA, which may involve partitions that wouldn't normally be touched (eg. `vendor_dlkm`). Any image specified via `--replace` will have its corresponding descriptor in the vbmeta image updated. This is handled recursively. For example, replacing `vendor_dlkm` would update both `vbmeta_vendor` and `vbmeta`. This requires all vbmeta images to be extracted during the patching process so that a complete dependency graph can be computed. The performance hit in doing so is negligible, but does require the checksums of the stripped images to be updated for the tests. Fixes: #102 Signed-off-by: Andrew Gunnerson <[email protected]>
This commit adds support for replacing any partition image within the payload with a custom image. This is useful, for example, to add a custom kernel to an OTA, which may involve partitions that wouldn't normally be touched (eg. `vendor_dlkm`). Any image specified via `--replace` will have its corresponding descriptor in the vbmeta image updated. This is handled recursively. For example, replacing `vendor_dlkm` would update both `vbmeta_vendor` and `vbmeta`. This requires all vbmeta images to be extracted during the patching process so that a complete dependency graph can be computed. The performance hit in doing so is negligible, but does require the checksums of the stripped images to be updated for the tests. Fixes: #102 Signed-off-by: Andrew Gunnerson <[email protected]>
This commit adds support for replacing any partition image within the payload with a custom image. This is useful, for example, to add a custom kernel to an OTA, which may involve partitions that wouldn't normally be touched (eg. `vendor_dlkm`). Any image specified via `--replace` will have its corresponding descriptor in the vbmeta image updated. This is handled recursively. For example, replacing `vendor_dlkm` would update both `vbmeta_vendor` and `vbmeta`. This requires all vbmeta images to be extracted during the patching process so that a complete dependency graph can be computed. The performance hit in doing so is negligible, but does require the checksums of the stripped images to be updated for the tests. Fixes: #102 Signed-off-by: Andrew Gunnerson <[email protected]>
hi, so lets explain my problems I have build full gki witch kernelsu (and other mod) its result 4 img generated : boot.img , vendor_boot.img , vendor_dlkm.img , dtbo.img . flashing only boot.img will no boot regarding to change I made.
I see avbroot support only --prepatched for boot. could you look into it ?
The text was updated successfully, but these errors were encountered: