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

pack error Exception in thread "main" java.lang.reflect.InvocationTargetException #127

Closed Morrigan-Ship closed 11 months ago

Morrigan-Ship commented 11 months ago

sudo ./gradlew pack 07:13:40.368 [main] WARN cfig.packable.PackableLauncher - [boot.img] will be handled by [BootImgParser] 07:13:40.456 [main] WARN cfig.packable.PackableLauncher - 'pack' sequence initialized 07:13:40.458 [main] INFO cfig.packable.BootImgParser - Loading config from build/unzip_boot/boot.json 07:13:40.633 [main] INFO cfig.bootimg.Common - Deleting build/unzip_boot/ramdisk.img.gz ... 07:13:40.637 [main] INFO cfig.bootimg.Common - Packing rootfs build/unzip_boot/root ... 07:13:40.654 [main] INFO cfig.bootimg.cpio.AndroidCpio - loading build/unzip_boot/ramdisk.img_filelist.txt 07:13:43.279 [main] INFO ZipHelper - compress(gz) done: build/unzip_boot/ramdisk.img.gz 07:13:43.279 [main] INFO cfig.bootimg.Common - build/unzip_boot/ramdisk.img.gz is ready 07:13:43.284 [main] INFO cfig.bootimg.v3.BootV3 - 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:110) Caused by: java.lang.OutOfMemoryError: Java heap space at java.base/java.nio.HeapByteBuffer.(HeapByteBuffer.java:64) at java.base/java.nio.ByteBuffer.allocate(ByteBuffer.java:363) at cfig.bootimg.v3.BootV3.pack(BootV3.kt:157) at cfig.packable.BootImgParser.pack(BootImgParser.kt:93) ... 8 more

Rofikkernel commented 11 months ago

please leave more detail info brother ,what version jdk you using & os (windows or linux) and boot.img device you try to pack

i see it not enough java memory Caused by: java.lang.OutOfMemoryError: Java heap space

Morrigan-Ship commented 11 months ago

yes fixed and solved via more memory RAM

cfig commented 11 months ago

what's the size of the image? maybe we can enlarge the maxHeapSize