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
bc21a1fb
Commit
bc21a1fb
authored
Nov 22, 2017
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update internal paths
parent
3bc31374
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
17 deletions
+17
-17
build.py
build.py
+1
-0
java
java
+1
-1
bootstages.c
jni/core/bootstages.c
+0
-3
magisk.h
jni/include/magisk.h
+4
-3
proc_monitor.c
jni/magiskhide/proc_monitor.c
+6
-5
magiskpolicy
jni/magiskpolicy
+1
-1
util_functions.sh
scripts/util_functions.sh
+4
-4
No files found.
build.py
View file @
bc21a1fb
...
@@ -78,6 +78,7 @@ def build_all(args):
...
@@ -78,6 +78,7 @@ def build_all(args):
build_apk
(
args
)
build_apk
(
args
)
zip_main
(
args
)
zip_main
(
args
)
zip_uninstaller
(
args
)
zip_uninstaller
(
args
)
build_snet
(
args
)
def
build_binary
(
args
):
def
build_binary
(
args
):
header
(
'* Building Magisk binaries'
)
header
(
'* Building Magisk binaries'
)
...
...
java
@
f520fe36
Subproject commit
389299afd103337ec3ab787278ac56ac249f9195
Subproject commit
f520fe36bd503cd7fee779b3b5c68723f6e0d098
jni/core/bootstages.c
View file @
bc21a1fb
...
@@ -558,9 +558,6 @@ void fix_filecon() {
...
@@ -558,9 +558,6 @@ void fix_filecon() {
int
dirfd
=
xopen
(
MOUNTPOINT
,
O_RDONLY
|
O_CLOEXEC
);
int
dirfd
=
xopen
(
MOUNTPOINT
,
O_RDONLY
|
O_CLOEXEC
);
restorecon
(
dirfd
,
0
);
restorecon
(
dirfd
,
0
);
close
(
dirfd
);
close
(
dirfd
);
dirfd
=
xopen
(
DATABIN
,
O_RDONLY
|
O_CLOEXEC
);
restorecon
(
dirfd
,
1
);
close
(
dirfd
);
}
}
/****************
/****************
...
...
jni/include/magisk.h
View file @
bc21a1fb
...
@@ -21,9 +21,9 @@
...
@@ -21,9 +21,9 @@
#define DISABLEFILE "/cache/.disable_magisk"
#define DISABLEFILE "/cache/.disable_magisk"
#define UNINSTALLER "/cache/magisk_uninstaller.sh"
#define UNINSTALLER "/cache/magisk_uninstaller.sh"
#define CACHEMOUNT "/cache/magisk_mount"
#define CACHEMOUNT "/cache/magisk_mount"
#define MAGISKTMP "/
dev/magisk
"
#define MAGISKTMP "/
sbin/.core
"
#define MIRRDIR MAGISKTMP "/mirror"
#define MIRRDIR MAGISKTMP "/mirror"
#define BBPATH MAGISKTMP "/b
in
"
#define BBPATH MAGISKTMP "/b
usybox
"
#define MOUNTPOINT MAGISKTMP "/img"
#define MOUNTPOINT MAGISKTMP "/img"
#define FAKEPOINT "/magisk"
#define FAKEPOINT "/magisk"
#define COREDIR MOUNTPOINT "/.core"
#define COREDIR MOUNTPOINT "/.core"
...
@@ -31,7 +31,8 @@
...
@@ -31,7 +31,8 @@
#define HIDELIST COREDIR "/hidelist"
#define HIDELIST COREDIR "/hidelist"
#define MAINIMG "/data/magisk.img"
#define MAINIMG "/data/magisk.img"
#define DATABIN "/data/magisk"
#define DATABIN "/data/magisk"
#define MANAGERAPK DATABIN "/magisk.apk"
#define MANAGERAPK MIRRDIR "/bin/magisk.apk"
#define MAGISKRC "/init.magisk.rc"
#define SELINUX_PATH "/sys/fs/selinux/"
#define SELINUX_PATH "/sys/fs/selinux/"
...
...
jni/magiskhide/proc_monitor.c
View file @
bc21a1fb
...
@@ -110,9 +110,9 @@ static void hide_daemon(int pid, int ppid) {
...
@@ -110,9 +110,9 @@ static void hide_daemon(int pid, int ppid) {
}
}
}
}
// Unmount dummy skeletons, /sbin links
, and mirrors
// Unmount dummy skeletons, /sbin links
vec_for_each
(
&
mount_list
,
line
)
{
vec_for_each
(
&
mount_list
,
line
)
{
if
(
strstr
(
line
,
"tmpfs /system"
)
||
strstr
(
line
,
"tmpfs /vendor"
)
||
strstr
(
line
,
"tmpfs /sbin"
)
||
strstr
(
line
,
MIRRDIR
)
)
{
if
(
strstr
(
line
,
"tmpfs /system"
)
||
strstr
(
line
,
"tmpfs /vendor"
)
||
strstr
(
line
,
"tmpfs /sbin"
))
{
sscanf
(
line
,
"%*s %4096s"
,
buffer
);
sscanf
(
line
,
"%*s %4096s"
,
buffer
);
lazy_unmount
(
buffer
);
lazy_unmount
(
buffer
);
}
}
...
@@ -134,9 +134,6 @@ static void hide_daemon(int pid, int ppid) {
...
@@ -134,9 +134,6 @@ static void hide_daemon(int pid, int ppid) {
free
(
line
);
free
(
line
);
}
}
xmount
(
NULL
,
"/"
,
NULL
,
MS_REMOUNT
,
NULL
);
unlink
(
FAKEPOINT
);
exit:
exit:
// Send resume signal
// Send resume signal
kill
(
pid
,
SIGCONT
);
kill
(
pid
,
SIGCONT
);
...
@@ -250,6 +247,10 @@ void proc_monitor() {
...
@@ -250,6 +247,10 @@ void proc_monitor() {
* The setns system call do not support multithread processes
* The setns system call do not support multithread processes
* We have to fork a new process, setns, then do the unmounts
* We have to fork a new process, setns, then do the unmounts
*/
*/
xmount
(
NULL
,
"/"
,
NULL
,
MS_REMOUNT
,
NULL
);
unlink
(
FAKEPOINT
);
unlink
(
MAGISKRC
);
xmount
(
NULL
,
"/"
,
NULL
,
MS_REMOUNT
|
MS_RDONLY
,
NULL
);
++
hide_queue
;
++
hide_queue
;
int
selfpid
=
getpid
();
int
selfpid
=
getpid
();
if
(
fork_dont_care
()
==
0
)
if
(
fork_dont_care
()
==
0
)
...
...
magiskpolicy
@
b7e717ee
Subproject commit
9e96824161ddf1d6af516f44cad4d0e904a7abed
Subproject commit
b7e717ee8c49d3f2ae153b8ea8de6c932032c20a
scripts/util_functions.sh
View file @
bc21a1fb
...
@@ -257,11 +257,11 @@ api_level_arch_detect() {
...
@@ -257,11 +257,11 @@ api_level_arch_detect() {
}
}
boot_actions
()
{
boot_actions
()
{
if
[
!
-d
/
dev/magisk
/mirror/bin
]
;
then
if
[
!
-d
/
sbin/.core
/mirror/bin
]
;
then
mkdir
-p
/
dev/magisk
/mirror/bin
mkdir
-p
/
sbin/.core
/mirror/bin
mount
-o
bind
$MAGISKBIN
/
dev/magisk
/mirror/bin
mount
-o
bind
$MAGISKBIN
/
sbin/.core
/mirror/bin
fi
fi
MAGISKBIN
=
/
dev/magisk
/mirror/bin
MAGISKBIN
=
/
sbin/.core
/mirror/bin
}
}
recovery_actions
()
{
recovery_actions
()
{
...
...
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