mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-28 04:25:27 +00:00
23 lines
554 B
Bash
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
|