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
02dd9626
Commit
02dd9626
authored
Jan 23, 2022
by
LoveSy
Committed by
John Wu
Jan 24, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't load zygisk module for magisk app
parent
256d7156
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
entry.cpp
native/jni/zygisk/entry.cpp
+7
-2
No files found.
native/jni/zygisk/entry.cpp
View file @
02dd9626
...
@@ -167,6 +167,11 @@ static int zygisk_log(int prio, const char *fmt, va_list ap) {
...
@@ -167,6 +167,11 @@ static int zygisk_log(int prio, const char *fmt, va_list ap) {
return
ret
;
return
ret
;
}
}
static
inline
bool
should_load_modules
(
int
flags
)
{
return
(
flags
&
UNMOUNT_MASK
)
!=
UNMOUNT_MASK
&&
(
flags
&
PROCESS_IS_MAGISK_APP
)
!=
PROCESS_IS_MAGISK_APP
;
}
int
remote_get_info
(
int
uid
,
const
char
*
process
,
uint32_t
*
flags
,
vector
<
int
>
&
fds
)
{
int
remote_get_info
(
int
uid
,
const
char
*
process
,
uint32_t
*
flags
,
vector
<
int
>
&
fds
)
{
if
(
int
fd
=
connect_daemon
();
fd
>=
0
)
{
if
(
int
fd
=
connect_daemon
();
fd
>=
0
)
{
write_int
(
fd
,
ZYGISK_REQUEST
);
write_int
(
fd
,
ZYGISK_REQUEST
);
...
@@ -175,7 +180,7 @@ int remote_get_info(int uid, const char *process, uint32_t *flags, vector<int> &
...
@@ -175,7 +180,7 @@ int remote_get_info(int uid, const char *process, uint32_t *flags, vector<int> &
write_int
(
fd
,
uid
);
write_int
(
fd
,
uid
);
write_string
(
fd
,
process
);
write_string
(
fd
,
process
);
xxread
(
fd
,
flags
,
sizeof
(
*
flags
));
xxread
(
fd
,
flags
,
sizeof
(
*
flags
));
if
(
(
*
flags
&
UNMOUNT_MASK
)
!=
UNMOUNT_MASK
)
{
if
(
should_load_modules
(
*
flags
)
)
{
fds
=
recv_fds
(
fd
);
fds
=
recv_fds
(
fd
);
}
}
return
fd
;
return
fd
;
...
@@ -351,7 +356,7 @@ static void get_process_info(int client, const sock_cred *cred) {
...
@@ -351,7 +356,7 @@ static void get_process_info(int client, const sock_cred *cred) {
xwrite
(
client
,
&
flags
,
sizeof
(
flags
));
xwrite
(
client
,
&
flags
,
sizeof
(
flags
));
if
(
(
flags
&
UNMOUNT_MASK
)
!=
UNMOUNT_MASK
)
{
if
(
should_load_modules
(
flags
)
)
{
char
buf
[
256
];
char
buf
[
256
];
get_exe
(
cred
->
pid
,
buf
,
sizeof
(
buf
));
get_exe
(
cred
->
pid
,
buf
,
sizeof
(
buf
));
vector
<
int
>
fds
=
get_module_fds
(
str_ends
(
buf
,
"64"
));
vector
<
int
>
fds
=
get_module_fds
(
str_ends
(
buf
,
"64"
));
...
...
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