Magisk/zip_static/common/magiskhide/disable

23 lines
554 B
Bash

#!/system/bin/sh
MODDIR=/magisk/.core/magiskhide
LOGFILE=/cache/magisk.log
log_print() {
echo "MagiskHide: $1"
echo "MagiskHide: $1" >> $LOGFILE
log -p i -t Magisk "MagiskHide: $1"
}
log_print "Stopping MagiskHide daemon"
set --
set `/data/busybox/ps -o pid,args | grep "magiskhide" | grep -v grep | head -1` >/dev/null
[ ! -z "$1" ] && kill "$1"
while read PROCESS; do
log_print "Killing $PROCESS"
set --
set `/data/busybox/ps -o pid,args | grep "$PROCESS" | grep -v grep` >/dev/null
[ ! -z "$1" ] && kill "$1"
done < $MODDIR/hidelist