Improve phh su installation
This commit is contained in:
parent
0ccc92dc1e
commit
0a53c42a8a
2
jni/su
2
jni/su
@ -1 +1 @@
|
|||||||
Subproject commit 1d2eb13cae13380bbccff4b0ba77c14140158ea8
|
Subproject commit 8475cecfeb47fbc596898fb9fb296b5027bdc46b
|
@ -381,13 +381,14 @@ if (! $SUPERSU); then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# SuperSU already have root, no need to install root
|
# SuperSU already have root, no need to install root
|
||||||
if [ ! -d /magisk/phh ]; then
|
if [ ! -d /magisk/phh -o `grep_prop versionCode /magisk/phh/module.prop` -lt \
|
||||||
ui_print "- Installing phh's SuperUser"
|
`grep_prop versionCode $INSTALLER/common/phh/module.prop` ]; then
|
||||||
mkdir -p /magisk/phh/bin
|
ui_print "- Installing/Upgrading phh's SuperUser"
|
||||||
mkdir -p /magisk/phh/su.d
|
mkdir -p /magisk/phh/bin 2>/dev/null
|
||||||
|
mkdir -p /magisk/phh/su.d 2>/dev/null
|
||||||
cp -af $INSTALLER/common/phh/. /magisk/phh
|
cp -af $INSTALLER/common/phh/. /magisk/phh
|
||||||
cp -af $BINDIR/su $BINDIR/sepolicy-inject /magisk/phh/bin
|
cp -af $BINDIR/su $BINDIR/sepolicy-inject /magisk/phh/bin
|
||||||
chmod -R 755 /magisk/phh
|
chmod -R 755 /magisk/phh/bin
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
id=phh
|
id=phh
|
||||||
name=phh's SuperUser
|
name=phh's SuperUser
|
||||||
version=r266-2
|
version=r266 (topjohnwu v1)
|
||||||
versionCode=4
|
versionCode=5
|
||||||
author=phhusson & topjohnwu
|
author=phhusson & topjohnwu
|
||||||
description=OpenSource SELinux-capable SuperUser
|
description=OpenSource SELinux-capable SuperUser
|
||||||
support=http://forum.xda-developers.com/showthread.php?t=3216394
|
support=http://forum.xda-developers.com/showthread.php?t=3216394
|
||||||
|
@ -9,19 +9,6 @@ log_print() {
|
|||||||
log -p i -t phh "$1"
|
log -p i -t phh "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
launch_daemonsu() {
|
|
||||||
# Revert to original path, legacy issue
|
|
||||||
case $PATH in
|
|
||||||
*busybox* )
|
|
||||||
export PATH=$OLDPATH
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
# Switch contexts
|
|
||||||
echo "u:r:su_daemon:s0" > /proc/self/attr/current
|
|
||||||
# Start daemon
|
|
||||||
exec /sbin/su --daemon
|
|
||||||
}
|
|
||||||
|
|
||||||
# Disable the other root
|
# Disable the other root
|
||||||
[ -d "/magisk/zzsupersu" ] && touch /magisk/zzsupersu/disable
|
[ -d "/magisk/zzsupersu" ] && touch /magisk/zzsupersu/disable
|
||||||
|
|
||||||
@ -47,4 +34,5 @@ for script in $MODDIR/su.d/* ; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
log_print "Starting su daemon"
|
log_print "Starting su daemon"
|
||||||
(launch_daemonsu &)
|
[ ! -z $OLDPATH ] && export PATH=$OLDPATH
|
||||||
|
/sbin/su --daemon
|
||||||
|
Loading…
Reference in New Issue
Block a user