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

latest code compile fail #111

Closed 99degree closed 1 year ago

99degree commented 1 year ago

./gradlew clean

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 SUCCESSFUL in 1s 14 actionable tasks: 3 executed, 11 up-to-date root@localhost:~/source/Android_boot_image_editor# ./gradlew unpack

Task :helper:compileKotlin 'compileJava' task (current target is 11) and 'compileKotlin' task (current target is 17) jvm target compatibility should be set to the same Java version. By default will become an error since Gradle 8.0+! Read more: https://kotl.in/gradle/jvm/target-validation Consider using JVM toolchain: https://kotl.in/gradle/jvm/toolchain

w: file:///root/source/Android_boot_image_editor/helper/src/main/kotlin/cfig/helper/CryptoHelper.kt:113:25 The value 'true' assigned to 'var bSuccess: Boolean defined in cfig.helper.CryptoHelper.KeyBox.Companion.parse4' is never used w: file:///root/source/Android_boot_image_editor/helper/src/main/kotlin/cfig/helper/CryptoHelper.kt:117:29 The value 'false' assigned to 'var bSuccess: Boolean defined in cfig.helper.CryptoHelper.KeyBox.Companion.parse4' is never used w: file:///root/source/Android_boot_image_editor/helper/src/main/kotlin/cfig/helper/CryptoHelper.kt:122:29 The value 'false' assigned to 'var bSuccess: Boolean defined in cfig.helper.CryptoHelper.KeyBox.Companion.parse4' is never used w: file:///root/source/Android_boot_image_editor/helper/src/main/kotlin/cfig/helper/Launcher.kt:84:19 Variable 'cmd' is never used

Task :bbootimg:compileKotlin 'compileJava' task (current target is 11) and 'compileKotlin' task (current target is 17) jvm target compatibility should be set to the same Java version. By default will become an error since Gradle 8.0+! Read more: https://kotl.in/gradle/jvm/target-validation Consider using JVM toolchain: https://kotl.in/gradle/jvm/toolchain

w: file:///root/source/Android_boot_image_editor/bbootimg/src/main/kotlin/avb/desc/HashDescriptor.kt:88:43 Parameter 'parent' is never used w: file:///root/source/Android_boot_image_editor/bbootimg/src/main/kotlin/bootimg/v3/BootV3.kt:246:17 Variable 'ai' is never used w: file:///root/source/Android_boot_image_editor/bbootimg/src/main/kotlin/init/BootReason.kt:8:66 Parameter 'subReason' is never used w: file:///root/source/Android_boot_image_editor/bbootimg/src/main/kotlin/init/BootReason.kt:8:86 Parameter 'detail' is never used w: file:///root/source/Android_boot_image_editor/bbootimg/src/main/kotlin/ota/Payload.kt:123:41 Parameter 'sig_data' is never used w: file:///root/source/Android_boot_image_editor/bbootimg/src/main/kotlin/ota/Payload.kt:123:63 Parameter 'pubkey' is never used w: file:///root/source/Android_boot_image_editor/bbootimg/src/main/kotlin/ota/Payload.kt:123:79 Parameter 'sigHash' is never used w: file:///root/source/Android_boot_image_editor/bbootimg/src/main/kotlin/ota/PayloadGenerator.kt:172:30 Unchecked cast: Pair<String, String?> to Pair<String, String> w: file:///root/source/Android_boot_image_editor/bbootimg/src/main/kotlin/packable/PayloadBinParser.kt:47:15 Parameter 'fileName' is never used

Task :unpack FAILED Error: LinkageError occurred while loading main class cfig.packable.PackableLauncherKt java.lang.UnsupportedClassVersionError: cfig/packable/PackableLauncherKt has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0

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 46s 10 actionable tasks: 10 executed

git log commit cb8e2530ce685e71fb50f5efc0e7148b5b790e95 (HEAD -> master, origin/master, origin/HEAD) Author: cfig yuyezhong@gmail.com Date: Mon Jan 30 12:29:58 2023 +0800

refine doc

commit e96aa0e33d2fc72b957a5f14f2c3099f65770e08 (tag: v13_r2) Author: cfig yuyezhong@gmail.com Date: Mon Jan 16 11:38:13 2023 +0800

Issue #109: add test case

commit de69dbf01c14c9ab724ef0333ac6356440f5629c Author: cfig yuyezhong@gmail.com Date: Mon Jan 16 00:28:20 2023 +0800

Issue #109: support vendor_boot.img w/o dtb

Now for boot V4, dtb may be in vendor_boot or vendor_kernel_boot.
Google Change:
https://android.googlesource.com/platform/system/tools/mkbootimg/+/053c389f03f3c14f86b808608ccb5669ff8b887a
cfig commented 1 year ago

OK, let me revert the required JDK version from 17 to 11. I thought everyone should have java 17 now, but seems I am wrong ...

99degree commented 1 year ago

it works now. thx.

TQMatvey commented 1 year ago

trying to extract vendor_boot.img,

https://katb.in/idiqojuxaya

i do have jdk11-openjdk, jre11-openjdk, jre11-openjdk-headless installed.

cfig commented 1 year ago

Are you using latest master branch? It passed auto-tests for Linux/Win/Mac. I simply use openjdk 11.

openjdk version "11.0.12" 2021-07-20
OpenJDK Runtime Environment 18.9 (build 11.0.12+7)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.12+7, mixed mode)

I googled and found some guys using Intellij Idea got the error invalid source release: 11 due to incorrect JDK settings, but I see you just run "unpack", that's weird ...