From c91542d29f838a83f6f8e06c2651616155a20547 Mon Sep 17 00:00:00 2001 From: osm0sis Date: Mon, 5 Jun 2023 12:51:41 -0300 Subject: [PATCH] AK3: don't attempt to AVBv1 sign if /system/bin/dalvikvm is not present - latest Android has moved dalvikvm to /apex/com.android.art/bin/dalvikvm but there's currently no way to run this from recovery due to linkerconfig - AVBv1 signing is most likely only needed on older devices running older Android which will still have /system/bin/dalvikvm so this shouldn't really affect anything --- META-INF/com/google/android/updater-script | 2 +- tools/ak3-core.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/META-INF/com/google/android/updater-script b/META-INF/com/google/android/updater-script index 2ae84f0..b870ab3 100644 --- a/META-INF/com/google/android/updater-script +++ b/META-INF/com/google/android/updater-script @@ -3,4 +3,4 @@ # Dummy file; update-binary is a shell script (DO NOT CHANGE) # # -# AK_BASE_VERSION=20230526 +# AK_BASE_VERSION=20230605 diff --git a/tools/ak3-core.sh b/tools/ak3-core.sh index dbd235f..90d89e1 100755 --- a/tools/ak3-core.sh +++ b/tools/ak3-core.sh @@ -384,7 +384,7 @@ flash_boot() { *recovery*|*SOS*) avbtype=recovery;; *) avbtype=boot;; esac; - if [ "$(/system/bin/dalvikvm -Xnoimage-dex2oat -cp $bin/boot_signer-dexed.jar com.android.verity.BootSignature -verify boot.img 2>&1 | grep VALID)" ]; then + if [ -f /system/bin/dalvikvm ] && [ "$(/system/bin/dalvikvm -Xnoimage-dex2oat -cp $bin/boot_signer-dexed.jar com.android.verity.BootSignature -verify boot.img 2>&1 | grep VALID)" ]; then echo "Signing with AVBv1..." >&2; /system/bin/dalvikvm -Xnoimage-dex2oat -cp $bin/boot_signer-dexed.jar com.android.verity.BootSignature /$avbtype boot-new.img $pk8 $cert boot-new-signed.img; fi;