cfig / Android_boot_image_editor

Parsing and re-packing Android boot.img/vbmeta.img/payload.bin, supporting Android 15
Apache License 2.0
1.06k stars 234 forks source link

Error when unpack mi14 pro payload.bin #135

Closed 5n0wfish closed 10 months ago

5n0wfish commented 10 months ago

By the below, the v14r2 couldn‘t decompress it and the partition couldn't be specified.

boot_editor_v14r2$ ./gradlew unpack -Dpart=vendor_boot
20:33:43.952 [main] WARN  cfig.packable.PackableLauncher - [payload.bin] will be handled by [PayloadBinParser]
20:33:44.042 [main] WARN  cfig.packable.PackableLauncher - 'unpack' sequence initialized
20:33:44.045 [main] INFO  cfig.packable.IPackable - deleting build/unzip_boot/ ...
20:33:44.110 [main] INFO  cc.cfig.droid.ota.Payload - payload.bin size info check PASS
20:33:44.137 [main] INFO  cc.cfig.droid.ota.Payload - calc meta hash: 62a503b2a789aea13903da1592a32b296e0150582fa40c058adccd2ef3722a16
20:34:01.729 [main] INFO  cc.cfig.droid.ota.Payload - calc payload hash: 09acc68d9213a237857f5b37ee1e03273ccc239660baa093a257bc3077237f6d
20:34:01.732 [main] INFO  cc.cfig.droid.ota.Payload - Found sig count: 1
20:34:01.733 [main] INFO  cc.cfig.droid.ota.Payload - <ByteString@58ebfd03 size=256 contents="f]\253c\264\237\343@g\246\371\321\252\212Y\337\334\255g\221c&1\231w\021\355\333x>\017\336\323\001\f\006\032\215\326=\301a\"\240T15...">
20:34:01.733 [main] INFO  cc.cfig.droid.ota.Payload - sig_data size = 256
20:34:01.734 [main] INFO  cc.cfig.droid.ota.Payload - 665dab63b49fe34067a6f9d1aa8a59dfdcad6791632631997711eddb783e0fded3010c061a8dd63dc16122a0543135b38f7e98e822dac94eaba488bfd112cfc958be42b0a94436cb411b5dfd31f8ab753ae575a0cb912abe121ab3b6bed70df8c14a9f2670240a969e38d4dbb88988625535fb871b21b1ade7979181d05712db4815b36b52088756238b5dffec9b6a10d13de27f77f49e87ccc4f0f49386a4a9e6f07b340f46ff044c2c3e28b7f6dfe7abf5861dd342aae35758ba73054e273ae6b7611dcaaa60553692c0d07b095a1fed796f63c6b5cfb6ad96af849079de0cc2f675780fdfe638414ec3e972861e09ae8719f8542659ed39dd3587ebbf5164
20:34:01.736 [main] INFO  cc.cfig.droid.ota.Payload - Removing build/payload/
20:34:01.849 [main] INFO  cc.cfig.droid.ota.Payload - Creating build/payload/
20:34:02.023 [main] INFO  cc.cfig.droid.ota.Payload -   header  info dumped to build/payload/header.json
20:34:02.044 [main] INFO  cc.cfig.droid.ota.Payload -  manifest info dumped to build/payload/manifest.json
20:34:02.051 [main] INFO  cc.cfig.droid.ota.Payload - signature info dumped to build/payload/signatures.txt
20:34:02.056 [main] INFO  cc.cfig.droid.ota.Payload - There are 40 partitions [abl, aop, aop_config, bluetooth, boot, cpucp, cpucp_dtb, devcfg, dsp, dtbo, featenabler, hyp, imagefv, init_boot, keymaster, modem, modemfirmware, multiimgqti, odm, product, qupfw, recovery, shrm, spuservice, system, system_dlkm, system_ext, tz, uefi, uefisecapp, vbmeta, vbmeta_system, vendor, vendor_boot, vendor_dlkm, vm-bootsys, xbl, xbl_config, xbl_ramdump, mi_ext]
20:34:02.056 [main] INFO  cc.cfig.droid.ota.Payload - dumping images to build/payload/
20:34:02.057 [main] INFO  cc.cfig.droid.ota.Payload - [ 1/40] extracting           abl.img (1 ops)
20:34:02.101 [main] INFO  cc.cfig.droid.ota.Payload - [ 2/40] extracting           aop.img (1 ops)
20:34:02.119 [main] INFO  cc.cfig.droid.ota.Payload - [ 3/40] extracting    aop_config.img (1 ops)
20:34:02.128 [main] INFO  cc.cfig.droid.ota.Payload - [ 4/40] extracting     bluetooth.img (1 ops)
20:34:02.164 [main] INFO  cc.cfig.droid.ota.Payload - [ 5/40] extracting          boot.img (48 ops)
20:34:03.616 [main] INFO  cc.cfig.droid.ota.Payload - [ 6/40] extracting         cpucp.img (1 ops)
20:34:03.629 [main] INFO  cc.cfig.droid.ota.Payload - [ 7/40] extracting     cpucp_dtb.img (1 ops)
20:34:03.638 [main] INFO  cc.cfig.droid.ota.Payload - [ 8/40] extracting        devcfg.img (1 ops)
20:34:03.646 [main] INFO  cc.cfig.droid.ota.Payload - [ 9/40] extracting           dsp.img (32 ops)
20:34:04.899 [main] INFO  cc.cfig.droid.ota.Payload - [10/40] extracting          dtbo.img (4 ops)
20:34:04.952 [main] INFO  cc.cfig.droid.ota.Payload - [11/40] extracting   featenabler.img (1 ops)
20:34:04.961 [main] INFO  cc.cfig.droid.ota.Payload - [12/40] extracting           hyp.img (1 ops)
20:34:05.001 [main] INFO  cc.cfig.droid.ota.Payload - [13/40] extracting       imagefv.img (4 ops)
20:34:05.053 [main] INFO  cc.cfig.droid.ota.Payload - [14/40] extracting     init_boot.img (4 ops)
20:34:05.223 [main] INFO  cc.cfig.droid.ota.Payload - [15/40] extracting     keymaster.img (1 ops)
20:34:05.241 [main] INFO  cc.cfig.droid.ota.Payload - [16/40] extracting         modem.img (60 ops)
20:34:09.506 [main] INFO  cc.cfig.droid.ota.Payload - [17/40] extracting modemfirmware.img (101 ops)
20:34:14.065 [main] INFO  cc.cfig.droid.ota.Payload - [18/40] extracting   multiimgqti.img (1 ops)
20:34:14.073 [main] INFO  cc.cfig.droid.ota.Payload - [19/40] extracting           odm.img (789 ops)
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at kotlin.reflect.jvm.internal.calls.CallerImpl$Method.callMethod(CallerImpl.kt:97)
        at kotlin.reflect.jvm.internal.calls.CallerImpl$Method$Instance.call(CallerImpl.kt:113)
        at kotlin.reflect.jvm.internal.KCallableImpl.call(KCallableImpl.kt:108)
        at cfig.packable.PackableLauncherKt.main(PackableLauncher.kt:110)
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 2 (Exit value: 2)
        at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
        at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
        at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:153)
        at cc.cfig.droid.ota.Payload.decompress(Payload.kt:195)
        at cc.cfig.droid.ota.Payload.unpackInternal(Payload.kt:213)
        at cc.cfig.droid.ota.Payload.unpack(Payload.kt:248)
        at cfig.packable.PayloadBinParser.unpack(PayloadBinParser.kt:34)
        ... 8 more
cfig commented 10 months ago

"the partition couldn't be specified."

The wrapper script needs to be updated like this: https://github.com/cfig/Android_boot_image_editor/blob/bin/gradlew

"couldn‘t decompress"

Can you check if "bzcat" and "xzcat" available?

cfig commented 10 months ago

Fixed in latest master branch and new release https://github.com/cfig/Android_boot_image_editor/releases/tag/v14_r3

5n0wfish commented 10 months ago

Thank you!!