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
This commit is contained in:
osm0sis committed 2023-06-05 12:56:37 -03:00
1 parent 4cd6b57df7
commit c91542d29f
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -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;