1
0
mirror of https://github.com/topjohnwu/Magisk.git synced 2024-12-21 07:27:38 +00:00
Magisk/scripts/module_installer.sh

34 lines
612 B
Bash
Raw Normal View History

#!/sbin/sh
#################
# Initialization
#################
umask 022
# echo before loading util_functions
ui_print() { echo "$1"; }
require_new_magisk() {
2019-12-15 21:01:12 -05:00
ui_print "*******************************"
ui_print " Please install Magisk v20.4+! "
2019-12-15 21:01:12 -05:00
ui_print "*******************************"
exit 1
}
2020-03-15 00:22:40 -07:00
#########################
# Load util_functions.sh
#########################
OUTFD=$2
ZIPFILE=$3
mount /data 2>/dev/null
[ -f /data/adb/magisk/util_functions.sh ] || require_new_magisk
. /data/adb/magisk/util_functions.sh
[ $MAGISK_VER_CODE -lt 20400 ] && require_new_magisk
2020-03-15 00:22:40 -07:00
install_module
exit 0