cfig / Android_boot_image_editor

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

Amlogic rom support? #65

Closed resticDOG closed 3 years ago

resticDOG commented 3 years ago

unpacking my Amlogic S905L-2-B based boot.img faild

./gradlew unpack

got this

> Task :unpack FAILED
08:40:29:636 WARN PackableLauncher - [boot.img] will be handled by [BootImgParser]
08:40:29:704 WARN PackableLauncher - 'unpack' sequence initialized
08:40:29:710 INFO BootImgParser - header version 0
08:40:29:719 WARN BootHeaderV2 - BootImgHeader constructor
Cannot extract kernel configs in build/unzip_boot/kernelCannot extract kernel version in build/unzip_boot/kernel08:40:29:918 WARN KernelExtractor - can not parse kernel info
08:40:29:929 INFO Helper - CMD: [lz4, -t, build/unzip_boot/ramdisk.img], workDir: null
Error 44 : Unrecognized header : file cannot be decoded
08:40:29:931 ERROR Helper - org.apache.commons.exec.ExecuteException: Process exited with an error: 44 (Exit value: 44): can not exec command
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:105)
Caused by: java.lang.IllegalArgumentException: ramdisk is in unknown format
        at cfig.bootimg.Common$Companion.dumpRamdisk(Common.kt:163)
        at cfig.bootimg.v2.BootV2.extractImages(BootV2.kt:192)
        at cfig.packable.BootImgParser.unpack(BootImgParser.kt:45)
        ... 8 more

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':unpack'.
> Process 'command '/usr/lib/jvm/java-11-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 1s
20 actionable tasks: 1 executed, 19 up-to-date

Is Amlogic rom supported? boot.img.gz

cfig commented 3 years ago

Hi, Do you know which Android version is it? Can you also paste the factory ROM download link? This image seems to be very old, and the ramdisk is in unknown format.

resticDOG commented 3 years ago

Hi, Do you know which Android version is it? Can you also paste the factory ROM download link? This image seems to be very old, and the ramdisk is in unknown format.

Thanks for reply! It's Android 4.4 version. I'm sorry, I can not find official firmware now cause it is too old.

cfig commented 3 years ago

OK I see. 4.4 is toooo old. Even I workaround the unpack error and go on, the extracted kernel and ramdisk are still in unknown format, unless some insider man tells us about the details. That is beyond the scope of this tool. Thanks for trying this tool :)

resticDOG commented 3 years ago

OK I see. 4.4 is toooo old. Even I workaround the unpack error and go on, the extracted kernel and ramdisk are still in unknown format, unless some insider man tells us about the details. That is beyond the scope of this tool. Thanks for trying this tool :)

Sorry for the late reply. I was too busy last month. I will trying other tools. Thank you for your help!