Magisk/zip_static/common/magiskhide/rm

15 lines
352 B
Plaintext
Raw Normal View History

#!/system/bin/sh
2016-10-31 20:21:43 +00:00
HIDELIST=/magisk/.core/magiskhide/hidelist
PROCESS=$1
2017-02-04 17:45:53 +00:00
TOOLPATH=/dev/busybox
if [ ! -z "$PROCESS" ]; then
2016-11-07 15:57:21 +00:00
cp -af $HIDELIST $HIDELIST.tmp
cat $HIDELIST.tmp | grep -v "^$PROCESS$" > $HIDELIST
rm -f $HIDELIST.tmp
set --
2017-02-04 17:45:53 +00:00
set `$TOOLPATH/ps -o pid,args | grep "$PROCESS" | grep -v grep` >/dev/null
[ ! -z "$1" ] && kill "$1"
fi