2019-03-23 09:27:36 +01:00
|
|
|
#!/sbin/sh
|
|
|
|
|
2019-12-27 10:53:27 +01:00
|
|
|
#################
|
|
|
|
# Initialization
|
|
|
|
#################
|
2019-03-23 09:27:36 +01:00
|
|
|
|
|
|
|
umask 022
|
|
|
|
|
|
|
|
# echo before loading util_functions
|
|
|
|
ui_print() { echo "$1"; }
|
|
|
|
|
|
|
|
require_new_magisk() {
|
2019-12-16 03:01:12 +01:00
|
|
|
ui_print "*******************************"
|
2020-10-28 13:13:39 +01:00
|
|
|
ui_print " Please install Magisk v20.4+! "
|
2019-12-16 03:01:12 +01:00
|
|
|
ui_print "*******************************"
|
2019-03-23 09:27:36 +01:00
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
2020-03-15 08:22:40 +01: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
|
2020-10-28 13:13:39 +01:00
|
|
|
[ $MAGISK_VER_CODE -lt 20400 ] && require_new_magisk
|
2020-03-15 08:22:40 +01:00
|
|
|
|
2020-10-28 13:13:39 +01:00
|
|
|
install_module
|
2019-03-23 09:27:36 +01:00
|
|
|
exit 0
|