From 44b7a3c3f14893624a6e9558948967e56315debf Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Mon, 20 Apr 2020 22:12:14 -0700 Subject: [PATCH] Only run bootsigner on Android 5.0+ Close #2712 --- scripts/util_functions.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/util_functions.sh b/scripts/util_functions.sh index 2550de045..0b001c8e2 100644 --- a/scripts/util_functions.sh +++ b/scripts/util_functions.sh @@ -438,8 +438,10 @@ install_magisk() { BOOTIMAGE=boot.img fi - eval $BOOTSIGNER -verify < $BOOTIMAGE && BOOTSIGNED=true - $BOOTSIGNED && ui_print "- Boot image is signed with AVB 1.0" + if [ $API -ge 21 ]; then + eval $BOOTSIGNER -verify < $BOOTIMAGE && BOOTSIGNED=true + $BOOTSIGNED && ui_print "- Boot image is signed with AVB 1.0" + fi $IS64BIT && mv -f magiskinit64 magiskinit 2>/dev/null || rm -f magiskinit64