Check Android version before actually doing anything

Close #233
This commit is contained in:
topjohnwu 2017-07-14 01:01:25 +08:00
parent cf56d7e4ed
commit a87ad35a50
2 changed files with 6 additions and 3 deletions

View File

@ -39,6 +39,9 @@ main() {
api_level_arch_detect
# Check if system root is installed and remove
remove_system_su
recovery_actions
find_boot_image

View File

@ -66,14 +66,14 @@ getvar KEEPVERITY
getvar KEEPFORCEENCRYPT
getvar BOOTIMAGE
# Check if system root is installed and remove
remove_system_su
# Detect version and architecture
api_level_arch_detect
[ $API -lt 21 ] && abort "! Magisk is only for Lollipop 5.0+ (SDK 21+)"
# Check if system root is installed and remove
remove_system_su
ui_print "- Device platform: $ARCH"
BINDIR=$INSTALLER/$ARCH