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
d53f33be
Commit
d53f33be
authored
Mar 20, 2017
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
I shall test Samsung before release...
parent
02e039d7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
21 deletions
+21
-21
magic_mask.sh
scripts/magic_mask.sh
+19
-19
enable
zip_static/common/magiskhide/enable
+2
-2
No files found.
scripts/magic_mask.sh
View file @
d53f33be
...
@@ -73,7 +73,7 @@ loopsetup() {
...
@@ -73,7 +73,7 @@ loopsetup() {
image_size_check
()
{
image_size_check
()
{
e2fsck
-yf
$1
e2fsck
-yf
$1
curBlocks
=
`
e2fsck
-n
$1
2>/dev/null |
cut
-d
,
-f3
|
cut
-d
\
-f2
`
;
curBlocks
=
`
e2fsck
-n
$1
2>/dev/null |
grep
$1
|
cut
-d
,
-f3
|
cut
-d
\
-f2
`
;
curUsedM
=
`
echo
"
$curBlocks
"
|
cut
-d
/
-f1
`
curUsedM
=
`
echo
"
$curBlocks
"
|
cut
-d
/
-f1
`
curSizeM
=
`
echo
"
$curBlocks
"
|
cut
-d
/
-f1
`
curSizeM
=
`
echo
"
$curBlocks
"
|
cut
-d
/
-f1
`
curFreeM
=
$((
(
curSizeM
-
curUsedM
)
*
4
/
1024
))
curFreeM
=
$((
(
curSizeM
-
curUsedM
)
*
4
/
1024
))
...
@@ -324,6 +324,24 @@ case $1 in
...
@@ -324,6 +324,24 @@ case $1 in
chown
-R
0.0
$TOOLPATH
chown
-R
0.0
$TOOLPATH
find
$BINPATH
$TOOLPATH
-exec
chcon
-h
u:object_r:system_file:s0
{}
\;
find
$BINPATH
$TOOLPATH
-exec
chcon
-h
u:object_r:system_file:s0
{}
\;
log_print
"* Linking binaries to /sbin"
mount
-o
rw,remount rootfs /
chmod
755 /sbin
ln
-sf
$BINPATH
/magiskpolicy /sbin/magiskpolicy
ln
-sf
$BINPATH
/magiskpolicy /sbin/sepolicy-inject
ln
-sf
$BINPATH
/resetprop /sbin/resetprop
if
[
!
-f
/sbin/launch_daemonsu.sh
]
;
then
log_print
"* Starting MagiskSU"
export
PATH
=
$OLDPATH
ln
-sf
$BINPATH
/su /sbin/su
ln
-sf
$BINPATH
/magiskpolicy /sbin/supolicy
/sbin/su
--daemon
export
PATH
=
$TOOLPATH
:
$OLDPATH
fi
mount
-o
ro,remount rootfs /
[
-f
$DISABLEFILE
]
&&
unblock
# Multirom functions should go here, not available right now
# Multirom functions should go here, not available right now
MULTIROM
=
false
MULTIROM
=
false
...
@@ -374,24 +392,6 @@ case $1 in
...
@@ -374,24 +392,6 @@ case $1 in
fi
fi
fi
fi
log_print
"* Linking binaries to /sbin"
mount
-o
rw,remount rootfs /
chmod
755 /sbin
ln
-sf
$BINPATH
/magiskpolicy /sbin/magiskpolicy
ln
-sf
$BINPATH
/magiskpolicy /sbin/sepolicy-inject
ln
-sf
$BINPATH
/resetprop /sbin/resetprop
if
[
!
-f
/sbin/launch_daemonsu.sh
]
;
then
log_print
"* Starting MagiskSU"
export
PATH
=
$OLDPATH
ln
-sf
$BINPATH
/su /sbin/su
ln
-sf
$BINPATH
/magiskpolicy /sbin/supolicy
/sbin/su
--daemon
export
PATH
=
$TOOLPATH
:
$OLDPATH
fi
mount
-o
ro,remount rootfs /
[
-f
$DISABLEFILE
]
&&
unblock
log_print
"* Preparing modules"
log_print
"* Preparing modules"
# Remove crap folder
# Remove crap folder
...
...
zip_static/common/magiskhide/enable
View file @
d53f33be
...
@@ -56,8 +56,8 @@ log_print "`$BINPATH/resetprop -v -n ro.secure 1`"
...
@@ -56,8 +56,8 @@ log_print "`$BINPATH/resetprop -v -n ro.secure 1`"
log_print
"
`
$BINPATH
/resetprop
-v
-n
ro.build.type user
`
"
log_print
"
`
$BINPATH
/resetprop
-v
-n
ro.build.type user
`
"
[
!
-z
"
$BUILDTAGS
"
-a
"
$BUILDTAGS
"
!=
"release-keys"
]
&&
\
[
!
-z
"
$BUILDTAGS
"
-a
"
$BUILDTAGS
"
!=
"release-keys"
]
&&
\
log_print
"
`
$BINPATH
/resetprop
-v
-n
ro.build.tags release-keys
`
"
log_print
"
`
$BINPATH
/resetprop
-v
-n
ro.build.tags release-keys
`
"
[
!
-z
"
$BUILDSELINUX
"
-a
"
$BUILDSELINUX
"
!=
"
0
"
]
&&
\
[
!
-z
"
$BUILDSELINUX
"
-a
"
$BUILDSELINUX
"
!=
"
1
"
]
&&
\
log_print
"
`
$BINPATH
/resetprop
-v
-n
ro.build.selinux
0
`
"
log_print
"
`
$BINPATH
/resetprop
-v
-n
ro.build.selinux
1
`
"
touch
$MODDIR
/hidelist
touch
$MODDIR
/hidelist
chmod
-R
755
$MODDIR
chmod
-R
755
$MODDIR
...
...
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