Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
0a53c42a
Commit
0a53c42a
authored
Dec 10, 2016
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve phh su installation
parent
0ccc92dc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
22 deletions
+11
-22
su
jni/su
+1
-1
flash_script.sh
scripts/flash_script.sh
+6
-5
module.prop
zip_static/common/phh/module.prop
+2
-2
service.sh
zip_static/common/phh/service.sh
+2
-14
No files found.
su
@
8475cecf
Subproject commit
1d2eb13cae13380bbccff4b0ba77c14140158ea8
Subproject commit
8475cecfeb47fbc596898fb9fb296b5027bdc46b
scripts/flash_script.sh
View file @
0a53c42a
...
@@ -381,13 +381,14 @@ if (! $SUPERSU); then
...
@@ -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
...
...
zip_static/common/phh/module.prop
View file @
0a53c42a
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
...
...
zip_static/common/phh/service.sh
View file @
0a53c42a
...
@@ -9,19 +9,6 @@ log_print() {
...
@@ -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
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment