Several minor fixes
This commit is contained in:
parent
69ded881c6
commit
35228f80b8
@ -51,10 +51,6 @@ for RC in init*.rc; do
|
|||||||
sed -i "/import \/init\.environ\.rc/iimport /init.magisk.rc" $RC
|
sed -i "/import \/init\.environ\.rc/iimport /init.magisk.rc" $RC
|
||||||
cpio_add $RC 750
|
cpio_add $RC 750
|
||||||
fi
|
fi
|
||||||
if file_contain "trigger load_persist_props_action" $RC && ! file_contain "trigger load_magisk_props_action" $RC; then
|
|
||||||
sed -i "/trigger load_persist_props_action/a\ \ \ \ trigger load_magisk_props_action" $RC
|
|
||||||
cpio_add $RC 750
|
|
||||||
fi
|
|
||||||
if file_contain "selinux.reload_policy"; then
|
if file_contain "selinux.reload_policy"; then
|
||||||
sed -i "/selinux.reload_policy/d" $RC
|
sed -i "/selinux.reload_policy/d" $RC
|
||||||
cpio_add $RC 750
|
cpio_add $RC 750
|
||||||
|
@ -2,12 +2,13 @@
|
|||||||
|
|
||||||
HIDELIST=/magisk/.core/magiskhide/hidelist
|
HIDELIST=/magisk/.core/magiskhide/hidelist
|
||||||
PROCESS=$1
|
PROCESS=$1
|
||||||
|
TOOLPATH=/dev/busybox
|
||||||
|
|
||||||
if [ ! -z "$PROCESS" ]; then
|
if [ ! -z "$PROCESS" ]; then
|
||||||
if [ `grep -c "^$PROCESS$" $HIDELIST` -eq "0" ]; then
|
if [ `grep -c "^$PROCESS$" $HIDELIST` -eq "0" ]; then
|
||||||
echo "$PROCESS" >> $HIDELIST
|
echo "$PROCESS" >> $HIDELIST
|
||||||
set --
|
set --
|
||||||
set `/data/busybox/ps -o pid,args | grep "$PROCESS" | grep -v grep` >/dev/null
|
set `$TOOLPATH/ps -o pid,args | grep "$PROCESS" | grep -v grep` >/dev/null
|
||||||
[ ! -z "$1" ] && kill "$1"
|
[ ! -z "$1" ] && kill "$1"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
MODDIR=/magisk/.core/magiskhide
|
MODDIR=/magisk/.core/magiskhide
|
||||||
LOGFILE=/cache/magisk.log
|
LOGFILE=/cache/magisk.log
|
||||||
|
TOOLPATH=/dev/busybox
|
||||||
|
|
||||||
log_print() {
|
log_print() {
|
||||||
echo "MagiskHide: $1"
|
echo "MagiskHide: $1"
|
||||||
@ -11,12 +12,12 @@ log_print() {
|
|||||||
|
|
||||||
log_print "Stopping MagiskHide daemon"
|
log_print "Stopping MagiskHide daemon"
|
||||||
set --
|
set --
|
||||||
set `/data/busybox/ps -o pid,args | grep "magiskhide" | grep -v grep | head -1` >/dev/null
|
set `$TOOLPATH/ps -o pid,args | grep "magiskhide" | grep -v grep | head -1` >/dev/null
|
||||||
[ ! -z "$1" ] && kill "$1"
|
[ ! -z "$1" ] && kill "$1"
|
||||||
|
|
||||||
while read PROCESS; do
|
while read PROCESS; do
|
||||||
log_print "Killing $PROCESS"
|
log_print "Killing $PROCESS"
|
||||||
set --
|
set --
|
||||||
set `/data/busybox/ps -o pid,args | grep "$PROCESS" | grep -v grep` >/dev/null
|
set `$TOOLPATH/ps -o pid,args | grep "$PROCESS" | grep -v grep` >/dev/null
|
||||||
[ ! -z "$1" ] && kill "$1"
|
[ ! -z "$1" ] && kill "$1"
|
||||||
done < $MODDIR/hidelist
|
done < $MODDIR/hidelist
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
MODDIR=/magisk/.core/magiskhide
|
MODDIR=/magisk/.core/magiskhide
|
||||||
BINPATH=/data/magisk
|
BINPATH=/data/magisk
|
||||||
LOGFILE=/cache/magisk.log
|
LOGFILE=/cache/magisk.log
|
||||||
|
TOOLPATH=/dev/busybox
|
||||||
|
|
||||||
log_print() {
|
log_print() {
|
||||||
echo "MagiskHide: $1"
|
echo "MagiskHide: $1"
|
||||||
@ -31,7 +32,7 @@ $MODDIR/add com.google.android.gms.unstable
|
|||||||
while read PROCESS; do
|
while read PROCESS; do
|
||||||
log_print "Killing $PROCESS"
|
log_print "Killing $PROCESS"
|
||||||
set --
|
set --
|
||||||
set `/data/busybox/ps -o pid,args | grep "$PROCESS" | grep -v grep` >/dev/null
|
set `$TOOLPATH/ps -o pid,args | grep "$PROCESS" | grep -v grep` >/dev/null
|
||||||
[ ! -z "$1" ] && kill "$1"
|
[ ! -z "$1" ] && kill "$1"
|
||||||
done < $MODDIR/hidelist
|
done < $MODDIR/hidelist
|
||||||
|
|
||||||
|
@ -2,12 +2,13 @@
|
|||||||
|
|
||||||
HIDELIST=/magisk/.core/magiskhide/hidelist
|
HIDELIST=/magisk/.core/magiskhide/hidelist
|
||||||
PROCESS=$1
|
PROCESS=$1
|
||||||
|
TOOLPATH=/dev/busybox
|
||||||
|
|
||||||
if [ ! -z "$PROCESS" ]; then
|
if [ ! -z "$PROCESS" ]; then
|
||||||
cp -af $HIDELIST $HIDELIST.tmp
|
cp -af $HIDELIST $HIDELIST.tmp
|
||||||
cat $HIDELIST.tmp | grep -v "^$PROCESS$" > $HIDELIST
|
cat $HIDELIST.tmp | grep -v "^$PROCESS$" > $HIDELIST
|
||||||
rm -f $HIDELIST.tmp
|
rm -f $HIDELIST.tmp
|
||||||
set --
|
set --
|
||||||
set `/data/busybox/ps -o pid,args | grep "$PROCESS" | grep -v grep` >/dev/null
|
set `$TOOLPATH/ps -o pid,args | grep "$PROCESS" | grep -v grep` >/dev/null
|
||||||
[ ! -z "$1" ] && kill "$1"
|
[ ! -z "$1" ] && kill "$1"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user