mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-23 18:15:30 +00:00
Update scripts
This commit is contained in:
parent
50d9877446
commit
8664e9d19b
@ -131,7 +131,7 @@ case "$1" in
|
||||
else
|
||||
initialize
|
||||
OUTFD=
|
||||
get_outfd
|
||||
setup_flashable
|
||||
# Run in background, hack for addon.d-v1
|
||||
(main_v1) &
|
||||
fi
|
||||
|
@ -31,7 +31,7 @@ fi
|
||||
# Load utility fuctions
|
||||
. $COMMONDIR/util_functions.sh
|
||||
|
||||
get_outfd
|
||||
setup_flashable
|
||||
|
||||
##########################################################################################
|
||||
# Detection
|
||||
|
@ -30,7 +30,7 @@ fi
|
||||
# Load utility functions
|
||||
. $INSTALLER/util_functions.sh
|
||||
|
||||
get_outfd
|
||||
setup_flashable
|
||||
|
||||
ui_print "************************"
|
||||
ui_print " Magisk Uninstaller "
|
||||
|
@ -10,19 +10,19 @@
|
||||
#MAGISK_VERSION_STUB
|
||||
|
||||
# Detect whether in boot mode
|
||||
ps | grep zygote | grep -v grep >/dev/null && BOOTMODE=true || BOOTMODE=false
|
||||
$BOOTMODE || ps -A 2>/dev/null | grep zygote | grep -v grep >/dev/null && BOOTMODE=true
|
||||
$BOOTMODE || id | grep -q 'uid=0' || BOOTMODE=true
|
||||
ps | grep zygote | grep -qv grep && BOOTMODE=true || BOOTMODE=false
|
||||
$BOOTMODE || ps -A | grep zygote | grep -qv grep && BOOTMODE=true
|
||||
|
||||
# Default location, will override if needed
|
||||
MAGISKBIN=/data/adb/magisk
|
||||
# Presets
|
||||
[ -z $NVBASE ] && NVBASE=/data/adb
|
||||
[ -z $MAGISKBIN ] && MAGISKBIN=$NVBASE/magisk
|
||||
[ -z $IMG ] && IMG=$NVBASE/magisk.img
|
||||
[ -z $MOUNTPATH ] && MOUNTPATH=/sbin/.core/img
|
||||
[ -z $IMG ] && IMG=/data/adb/magisk.img
|
||||
|
||||
BOOTSIGNER="/system/bin/dalvikvm -Xnodex2oat -Xnoimage-dex2oat -cp \$APK com.topjohnwu.magisk.utils.BootSigner"
|
||||
BOOTSIGNED=false
|
||||
|
||||
get_outfd() {
|
||||
setup_flashable() {
|
||||
$BOOTMODE && return
|
||||
# Preserve environment varibles
|
||||
OLD_PATH=$PATH
|
||||
@ -40,6 +40,11 @@ get_outfd() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Backward compatibility
|
||||
get_outfd() {
|
||||
setup_flashable
|
||||
}
|
||||
|
||||
ui_print() {
|
||||
$BOOTMODE && echo "$1" || echo -e "ui_print $1\nui_print" >> /proc/self/fd/$OUTFD
|
||||
}
|
||||
@ -250,7 +255,7 @@ is_mounted() {
|
||||
|
||||
remove_system_su() {
|
||||
if [ -f /system/bin/su -o -f /system/xbin/su ] && [ ! -f /su/bin/su ]; then
|
||||
ui_print "! System installed root detected, mount rw :("
|
||||
ui_print "- Removing system installed root"
|
||||
mount -o rw,remount /system
|
||||
# SuperSU
|
||||
if [ -e /system/bin/.ext/.su ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user