Commit a87ad35a authored by topjohnwu's avatar topjohnwu

Check Android version before actually doing anything

Close #233
parent cf56d7e4
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment