Old otacerts.zip not found in image
olbb opened this issue · 2 comments
Hello,
I got the error "old otacerts.zip not found in image" when trying to use avbroot version 3.2.3.
I noticed you added "patching otacerts.zip" in version 3.0.0, so I tried using version 2.3.3 and it worked fine.
How should I handle this, or skip "patching otacerts.zip"?
Here is the link to the ota.zip used, and the log output of otaroot.
link:
direct
logs:
avbroot.exe ota patch --input .\ota.zip --key-avb .\avb.key --key-ota .\ota.key --cert-ota .\ota.crt --magisk .\Magisk-v27.0.apk --magisk-preinit-device metadata
0.006s INFO Replacing zip entry: META-INF/com/android/otacert
0.006s INFO Patching zip entry: payload.bin--magisk .\Magisk-v27.0.apk --magisk-preinit-device metadata
0.009s INFO Extracting from original payload: boot
0.412s INFO Extracting from original payload: vbmeta_system
0.413s INFO Extracting from original payload: system
4.255s INFO Extracting from original payload: recovery
4.840s INFO Extracting from original payload: vbmeta
4.841s INFO Patching boot images: boot, recovery
7.767s INFO Patching system image: system
7.990s ERROR Failed to patch OTA zip
Caused by:
0: Failed to patch payload: payload.bin
1: Failed to patch system image: system
2: Old otacerts.zip not found in image
Thanks for reporting this. It's a known incompatibility. OnePlus stock ROMs put otacerts.zip
in the my_engineering
partition instead of the system
partition and they set up AVB for that partition in an unusual way that makes it very complicated to patch.
If it helps at all, I can add a new option like --skip-otacerts-patch
. I hadn't done that yet because there are so few OnePlus devices that properly support custom AVB keys nowadays. I assumed that nobody really used avbroot on OnePlus devices anymore.