2
0
mirror of https://gitlab.com/Nanolx/NanoDroid synced 2024-10-31 09:20:23 +00:00

improve detect_mode() logic

This commit is contained in:
Christopher Roy Bratusek 2018-01-28 10:51:51 +01:00
parent 124d1fbafd
commit fc646986c6

View File

@ -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