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

why i cant pack system #112

Closed slwyts closed 6 months ago

slwyts commented 1 year ago

i only edit any files `

Task :pack FAILED 13:33:37.898 [main] WARN cfig.packable.PackableLauncher - [system.img] will be handled by [SparseImgParser] 13:33:38.018 [main] WARN cfig.packable.PackableLauncher - 'pack' sequence initialized Exception in thread "main" java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:119) at java.base/java.lang.reflect.Method.invoke(Method.java:578) 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: kotlin.NotImplementedError: An operation is not implemented: not implemented at cfig.utils.SparseImgParser.pack(SparseImgParser.kt:94) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) ... 5 more

FAILURE: Build failed with an exception.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.6/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 3s 25 actionable tasks: 3 executed, 22 up-to-date `

cfig commented 1 year ago

Hi @slwyts, Packing system.img is not supported yet.

slwyts commented 1 year ago

When can it be realized? Or you switch to ext4 to mount the image, and sign after modification

cfig commented 1 year ago

It will be done with low priority. "Or you switch to ext4 to mount the image, and sign after modification" => I've been thinking about this solution too. Needs some tests.

cfig commented 6 months ago

A new commit has been submitted to support sparsed ext4 (or raw ext4) images. https://github.com/cfig/Android_boot_image_editor/issues/133

I tested with vendor_dlkm.img, this should also work for other ext4 based images.

cfig commented 6 months ago

Special note: it only works for dynamic partitioned system.img., and vbmeta.img should also be updated together.