Skip to content

Commit

Permalink
Check Android version before actually doing anything
Browse files Browse the repository at this point in the history
Close #233
  • Loading branch information
topjohnwu committed Jul 13, 2017
1 parent cf56d7e commit a87ad35
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions scripts/addon.d.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions scripts/flash_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a87ad35

Please sign in to comment.