28 lines
693 B
Plaintext
Raw Normal View History

#!/system/bin/sh
MODDIR=/magisk/.core/magiskhide
LOGFILE=/cache/magisk.log
2017-02-05 01:45:53 +08:00
TOOLPATH=/dev/busybox
log_print() {
echo "MagiskHide: $1"
echo "MagiskHide: $1" >> $LOGFILE
log -p i -t Magisk "MagiskHide: $1"
}
2017-02-05 23:41:24 +08:00
# Only disable when MagiskHide is started
2017-03-26 23:51:23 +02:00
$TOOLPATH/ps | grep "magiskhide --daemon" | grep -v grep >/dev/null 2>&1 || exit
2017-02-05 23:41:24 +08:00
log_print "Stopping MagiskHide daemon"
2017-02-05 23:41:24 +08:00
set --
2017-02-05 01:45:53 +08:00
set `$TOOLPATH/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 --
2017-02-05 01:45:53 +08:00
set `$TOOLPATH/ps -o pid,args | grep "$PROCESS" | grep -v grep` >/dev/null
[ ! -z "$1" ] && kill "$1"
done < $MODDIR/hidelist