mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-01-11 18:43:47 +00:00
Check before enable/disable
This commit is contained in:
parent
9ad03994d1
commit
6d3ac2aa55
@ -10,7 +10,11 @@ log_print() {
|
||||
log -p i -t Magisk "MagiskHide: $1"
|
||||
}
|
||||
|
||||
# Only disable when MagiskHide is started
|
||||
ps | grep "magiskhide --daemon" | grep -v grep >/dev/null 2>&1 || exit
|
||||
|
||||
log_print "Stopping MagiskHide daemon"
|
||||
|
||||
set --
|
||||
set `$TOOLPATH/ps -o pid,args | grep "magiskhide" | grep -v grep | head -1` >/dev/null
|
||||
[ ! -z "$1" ] && kill "$1"
|
||||
|
@ -11,6 +11,9 @@ log_print() {
|
||||
log -p i -t Magisk "MagiskHide: $1"
|
||||
}
|
||||
|
||||
# Only enable when isn't started
|
||||
ps | grep "magiskhide --daemon" | grep -v grep >/dev/null 2>&1 && exit
|
||||
|
||||
log_print "Removing tampered read-only system props"
|
||||
|
||||
VERIFYBOOT=`getprop ro.boot.verifiedbootstate`
|
||||
|
Loading…
x
Reference in New Issue
Block a user