Skip to content

Commit

Permalink
Update update-binary
Browse files Browse the repository at this point in the history
  • Loading branch information
catsmoker authored Aug 7, 2024
1 parent 0e9111d commit 971bf12
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions META-INF/com/google/android/update-binary
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@

umask 022

# echo before loading util_functions
ui_print() { echo "$1"; }
# Print message to the console
ui_print() {
echo "$1"
}

# Function to require a newer version of Magisk
require_new_magisk() {
ui_print "*******************************"
ui_print " Please install Magisk v20.4+! "
Expand All @@ -23,11 +26,18 @@ require_new_magisk() {
OUTFD=$2
ZIPFILE=$3

# Ensure /data is mounted
mount /data 2>/dev/null

[ -f /data/adb/magisk/util_functions.sh ] || require_new_magisk
# Check for the presence of util_functions.sh and Magisk version
if [ ! -f /data/adb/magisk/util_functions.sh ]; then
require_new_magisk
fi
. /data/adb/magisk/util_functions.sh
[ $MAGISK_VER_CODE -lt 20400 ] && require_new_magisk
if [ $MAGISK_VER_CODE -lt 20400 ]; then
require_new_magisk
fi

# Execute module installation
install_module
exit 0

0 comments on commit 971bf12

Please sign in to comment.