From fc646986c6e84c29b37aef55c4233f50ed532cd7 Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Sun, 28 Jan 2018 10:51:51 +0100 Subject: [PATCH] improve detect_mode() logic --- Full/nanodroid-functions | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Full/nanodroid-functions b/Full/nanodroid-functions index ac3d6c8..9a57131 100644 --- a/Full/nanodroid-functions +++ b/Full/nanodroid-functions @@ -139,12 +139,11 @@ detect_mode () { if [ -f /data/adb/magisk/magisk ]; then MODE=MAGISK MODE_TEXT=" > Mode | Magisk | detected" - elif [ -f /data/magisk/magisk.img ]; then - MODE=SYSTEM - MODE_TEXT=" > Mode | System | forced [ancient Magisk]" - else + elif ! ${BOOTMODE}; then MODE=SYSTEM MODE_TEXT=" > Mode | System | detected" + else + error " !! Magisk 15.0+ not found an device in BOOTMODE" fi ;; @@ -153,8 +152,7 @@ detect_mode () { MODE=SYSTEM MODE_TEXT=" > Mode | System | forced" else - MODE=MAGISK - MODE_TEXT=" > Mode | Magisk | forced [device in BOOTMODE]" + error " !! Forced System Mode installation requested, but device in BOOTMODE" fi ;; esac