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
83af0497
Commit
83af0497
authored
Sep 26, 2017
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't use dummy directory; directly use tmpfs
parent
6ce37b44
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
10 deletions
+8
-10
bootstages.c
jni/daemon/bootstages.c
+6
-7
magisk.h
jni/include/magisk.h
+0
-1
proc_monitor.c
jni/magiskhide/proc_monitor.c
+2
-2
No files found.
jni/daemon/bootstages.c
View file @
83af0497
...
...
@@ -276,14 +276,13 @@ static void clone_skeleton(struct node_entry *node) {
}
closedir
(
dir
);
snprintf
(
buf
,
PATH_MAX
,
"%s%s"
,
DUMMDIR
,
full_path
);
mkdir_p
(
buf
,
0755
);
clone_attr
(
full_path
,
buf
);
if
(
node
->
status
&
IS_SKEL
)
bind_mount
(
buf
,
full_path
);
if
(
node
->
status
&
IS_SKEL
)
{
LOGI
(
"tmpfs: %s
\n
"
,
full_path
);
mount
(
"tmpfs"
,
full_path
,
"tmpfs"
,
0
,
NULL
);
}
vec_for_each
(
node
->
children
,
child
)
{
snprintf
(
buf
,
PATH_MAX
,
"%s
%s/%s"
,
DUMMDIR
,
full_path
,
child
->
name
);
snprintf
(
buf
,
PATH_MAX
,
"%s
/%s"
,
full_path
,
child
->
name
);
// Create the dummy file/directory
if
(
IS_DIR
(
child
))
...
...
@@ -303,7 +302,7 @@ static void clone_skeleton(struct node_entry *node) {
// Mount from module file to dummy file
snprintf
(
buf2
,
PATH_MAX
,
"%s/%s%s/%s"
,
MOUNTPOINT
,
child
->
module
,
full_path
,
child
->
name
);
}
else
if
(
child
->
status
&
(
IS_SKEL
|
IS_INTER
))
{
// It's a intermediate folder, recursive clone
// It's a
n
intermediate folder, recursive clone
clone_skeleton
(
child
);
continue
;
}
else
if
(
child
->
status
&
IS_DUMMY
)
{
...
...
jni/include/magisk.h
View file @
83af0497
...
...
@@ -31,7 +31,6 @@
#define MANAGERAPK DATABIN "/magisk.apk"
#define MAGISKTMP "/dev/magisk"
#define MIRRDIR MAGISKTMP "/mirror"
#define DUMMDIR MAGISKTMP "/dummy"
#define BBPATH MAGISKTMP "/bin"
#define CACHEMOUNT "/cache/magisk_mount"
...
...
jni/magiskhide/proc_monitor.c
View file @
83af0497
...
...
@@ -137,9 +137,9 @@ static void hide_daemon(int pid) {
vec_init
(
&
mount_list
);
file_to_vector
(
buffer
,
&
mount_list
);
// Unmount any loop mounts
and dummy mounts
// Unmount any loop mounts
vec_for_each
(
&
mount_list
,
line
)
{
if
(
strstr
(
line
,
"/dev/block/loop"
)
||
strstr
(
line
,
DUMMDIR
)
)
{
if
(
strstr
(
line
,
"/dev/block/loop"
))
{
sscanf
(
line
,
"%*s %4096s"
,
buffer
);
lazy_unmount
(
buffer
);
}
...
...
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