Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
azio7 committed Feb 12, 2022
1 parent ec2345a commit 307e899
Showing 1 changed file with 32 additions and 9 deletions.
41 changes: 32 additions & 9 deletions META-INF/com/google/android/update-binary
Original file line number Diff line number Diff line change
@@ -1,10 +1,33 @@
#!/sbin/sh
# This is a dummy file that should be replaced with a proper installer script

# If you are creating a module locally for personal usage or testing,
# download the script in the following URL:
# https://github.com/topjohnwu/Magisk/blob/master/scripts/module_installer.sh
# And replace this script with the downloaded script

# Error, this script should always be replaced
exit 1

#################
# Initialization
#################

umask 022

# echo before loading util_functions
ui_print() { echo "$1"; }

require_new_magisk() {
ui_print "*******************************"
ui_print " Please install Magisk v20.4+! "
ui_print "*******************************"
exit 1
}

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

install_module
exit 0

0 comments on commit 307e899

Please sign in to comment.