cfig / Android_boot_image_editor

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

Error when pack recovery.img #126

Open mrx7014 opened 11 months ago

mrx7014 commented 11 months ago

I get this error when try to pack recovery.img again

FAILURE: Build failed with an exception. What went wrong: Execution failed for task ':pack'. > Process 'command '/usr/lib/jvm/java-17-openjdk-amd64/bin/java'' finished with non-zero exit value 1 Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. > Get more help at https://help.gradle.org.
BUILD FAILED in 11s 11 actionable tasks: 5 executed, 6 up-to-date

Hope to solve it.

THX For this tool :)

cfig commented 11 months ago

can you share your recovery.img ?

mrx7014 commented 11 months ago

can you share your recovery.img ?

Yes

https://drive.google.com/u/6/uc?id=16zgRVY5Fl675phi8LzrSTfNGK1KCak0i&export=download

mrx7014 commented 11 months ago

can you share your recovery.img ?

I tried with another img and error still not fixed

Rofikkernel commented 11 months ago

@mrx7014 i think is it caused that incorrect magic number Unpack log 18:13:40.379 [main] INFO cfig.utils.DTC - parsing DTB: build/unzip_boot/dtb FATAL ERROR: Blob has incorrect magic number 18:13:40.380 [main] ERROR cfig.utils.DTC - can not parse DTB: build/unzip_boot/dtb

Pack log Caused by: java.lang.IllegalArgumentException: do not support header version 358400 at cfig.packable.BootImgParser.pack(BootImgParser.kt:97)

cfig commented 11 months ago

That image uses 3.18 kernel + Android 6, it's a very old version. Its format doesn't follow AOSP spec, so i've no idea what the value really means.

mrx7014 commented 11 months ago

But i use this tool with it before

Rofikkernel commented 11 months ago

@mrx7014 is it worked before? or you can use old release version

mrx7014 commented 11 months ago

@mrx7014 is it worked before? or you can use old release version

I used an old release version and it works with this img,but after tool updates it dosen't work

Rofikkernel commented 11 months ago

why not use old version tool too

select old commit in the tool github and download as tarball

mrx7014 commented 11 months ago

why not use old version tool too

select old commit in the tool github and download as tarball

Okay THX

cfig commented 11 months ago

why not use old version tool too

select old commit in the tool github and download as tarball

Can you share the "old commit" that works? Then I can merge the old working code into latest. Then add a test case to guard this feature, to make sure it's not broken in the future.

mrx7014 commented 11 months ago

why not use old version tool too select old commit in the tool github and download as tarball

Can you share the "old commit" that works? Then I can merge the old working code into latest. Then add a test case to guard this feature, to make sure it's not broken in the future.

Okay i will do it