Improve phh su installation

This commit is contained in:
topjohnwu
2016-12-10 23:48:24 +08:00
parent 0ccc92dc1e
commit 0a53c42a8a
4 changed files with 11 additions and 22 deletions

View File

@@ -1,7 +1,7 @@
id=phh
name=phh's SuperUser
version=r266-2
versionCode=4
version=r266 (topjohnwu v1)
versionCode=5
author=phhusson & topjohnwu
description=OpenSource SELinux-capable SuperUser
support=http://forum.xda-developers.com/showthread.php?t=3216394

View File

@@ -9,19 +9,6 @@ log_print() {
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
[ -d "/magisk/zzsupersu" ] && touch /magisk/zzsupersu/disable
@@ -47,4 +34,5 @@ for script in $MODDIR/su.d/* ; do
done
log_print "Starting su daemon"
(launch_daemonsu &)
[ ! -z $OLDPATH ] && export PATH=$OLDPATH
/sbin/su --daemon