chenxiaolong / avbroot

Sign (and root) Android A/B OTAs with custom keys while preserving Android Verified Boot
GNU General Public License v3.0
504 stars 42 forks source link

Failed to patch OTA zip #292

Closed hereblur closed 4 months ago

hereblur commented 4 months ago

I cannot patch the OTA. Is this my device not supported?

avbroot ota patch --input ota-9.zip --key-avb avb/avb1.key --key-ota avb/ota1.key --cert-ota avb/ota1.crt --rootless
  0.013s  INFO Copying zip entry: META-INF/CERT.RSA
  0.013s  INFO Copying zip entry: META-INF/CERT.SF
  0.013s  INFO Copying zip entry: META-INF/MANIFEST.MF
  0.013s  INFO Replacing zip entry: META-INF/com/android/otacert
  0.013s  INFO Copying zip entry: care_map.txt
  0.013s  INFO Copying zip entry: compatibility.zip
  0.013s  INFO Patching zip entry: payload.bin
  0.015s  INFO Extracting from original payload: boot
  0.066s  INFO Extracting from original payload: system
  4.031s  INFO Patching boot images: boot
  4.181s ERROR Failed to patch OTA zip

Caused by:
    0: Failed to patch payload: payload.bin
    1: Failed to patch boot images: boot
    2: AVB error
    3: Invalid VBMeta header magic: [65, 78, 68, 82]

I also tried

$ avbroot ota extract -i ota-9.zip -d extracted -a
  0.012s  INFO Extracting from the payload: aboot, boot, cmnlib, cmnlib64, devcfg, dsp, keymaster, mdtp, modem, rpm, sbl1, system, tz, vendor
  5.553s  INFO Successfully extracted OTA

$ avbroot avb info -i extracted/system.img 
  0.000s ERROR Failed to load AVB image: "extracted/system.img"

Caused by:
    Invalid VBMeta header magic: [0, 0, 0, 0]

Here's the link to ota file: https://xmfirmwareupdater.com/miui/daisy/stable/V10.0.13.0.PDLMIXM/

Thanks

chenxiaolong commented 4 months ago

Thanks for the logs and the OTA link. Unfortunately, your device won't work with avbroot because it uses AVB 1.0 instead of AVB 2.0.