AK2: only AVB sign if dumped original dumped image is signed (#20)
- avoids issues for broad AK2-based mod zips on devices where AVB 1.0 signed images cause issues, while maintaining signing on AVB 1.0 devices
This commit is contained in:
1 file changed
+5
-3
+5
-3
@@ -270,9 +270,11 @@ flash_boot() {
|
||||
esac;
|
||||
savedpath="$LD_LIBRARY_PATH";
|
||||
unset LD_LIBRARY_PATH;
|
||||
/system/bin/dalvikvm -Xbootclasspath:/system/framework/core-oj.jar:/system/framework/core-libart.jar:/system/framework/conscrypt.jar:/system/framework/bouncycastle.jar -Xnodex2oat -Xnoimage-dex2oat -cp $bin/BootSignature_Android.jar com.android.verity.BootSignature /$avbtype boot-new.img $pk8 $cert boot-new-signed.img;
|
||||
if [ $? != 0 ]; then
|
||||
ui_print " "; ui_print "Signing image failed. Aborting..."; exit 1;
|
||||
if [ "$(/system/bin/dalvikvm -Xbootclasspath:/system/framework/core-oj.jar:/system/framework/core-libart.jar:/system/framework/conscrypt.jar:/system/framework/bouncycastle.jar -Xnodex2oat -Xnoimage-dex2oat -cp $bin/BootSignature_Android.jar com.android.verity.BootSignature -verify boot.img | grep VALID)" ]; then
|
||||
/system/bin/dalvikvm -Xbootclasspath:/system/framework/core-oj.jar:/system/framework/core-libart.jar:/system/framework/conscrypt.jar:/system/framework/bouncycastle.jar -Xnodex2oat -Xnoimage-dex2oat -cp $bin/BootSignature_Android.jar com.android.verity.BootSignature /$avbtype boot-new.img $pk8 $cert boot-new-signed.img;
|
||||
if [ $? != 0 ]; then
|
||||
ui_print " "; ui_print "Signing image failed. Aborting..."; exit 1;
|
||||
fi;
|
||||
fi;
|
||||
test "$savedpath" && export LD_LIBRARY_PATH="$savedpath";
|
||||
mv -f boot-new-signed.img boot-new.img;
|
||||
|
||||
Reference in new issue
Block a user