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

Pixel 7 Pro / vendor_boot #109

Closed freak07 closed 11 months ago

freak07 commented 1 year ago

Hello,

thanks for providing and working on this tool!

I tried to unpack/repack the vendor_boot.img of Pixel 7, but repacking seems to be broken due to dtb being no longer in vendor_boot.


miles@miles-laptop:~/Downloads/boot_editor_v13$ ./gradlew pack
08:47:35.971 [main] WARN  cfig.packable.PackableLauncher - [vendor_boot.img] will be handled by [VendorBootParser]
08:47:36.027 [main] WARN  cfig.packable.PackableLauncher - 'pack' sequence initialized
08:47:36.028 [main] INFO  cfig.packable.VendorBootParser - Loading config from build/unzip_boot//vendor_boot.json
08:47:36.149 [main] INFO  cfig.bootimg.Common - Deleting build/unzip_boot/ramdisk.1.lz4 ...
08:47:36.155 [main] INFO  cfig.bootimg.v3.VendorBoot - build/unzip_boot/root.1 -> build/unzip_boot/ramdisk.1.lz4
08:47:36.157 [main] INFO  cfig.bootimg.Common - Packing rootfs build/unzip_boot/root.1 ...
08:47:36.168 [main] INFO  cfig.bootimg.cpio.AndroidCpio - loading build/unzip_boot/ramdisk.1_filelist.txt
08:47:36.546 [main] INFO  Helper - lz4 --version
08:47:36.560 [main] WARN  ZipHelper - lz4 version obsolete, needs update
08:47:36.561 [main] INFO  ZipHelper - [lz4, -l, -12]
08:47:37.886 [main] INFO  cfig.bootimg.Common - build/unzip_boot/ramdisk.1.lz4 is ready
08:47:37.888 [main] INFO  cfig.bootimg.v3.VendorBoot - Writing data ...
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:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    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:108)
Caused by: java.io.FileNotFoundException: build/unzip_boot/dtb (No such file or directory)
    at java.base/java.io.FileInputStream.open0(Native Method)
    at java.base/java.io.FileInputStream.open(FileInputStream.java:216)
    at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
    at java.base/java.io.FileInputStream.<init>(FileInputStream.java:111)
    at cfig.bootimg.Common$Companion.writePaddedFile(Common.kt:318)
    at cfig.bootimg.v3.VendorBoot.pack(VendorBoot.kt:298)
    at cfig.packable.VendorBootParser.pack(VendorBootParser.kt:44)
    ... 8 more

vendor_boot.zip

cfig commented 1 year ago

So does the latest code works on your side?

cfig commented 11 months ago

Should work now. Please reopen it if it's not.