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
4b5651bd
Commit
4b5651bd
authored
Nov 16, 2021
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert logging after pre specialize
parent
50515d91
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
hook.cpp
native/jni/zygisk/hook.cpp
+4
-7
No files found.
native/jni/zygisk/hook.cpp
View file @
4b5651bd
...
@@ -167,10 +167,6 @@ DCL_HOOK_FUNC(int, unshare, int flags) {
...
@@ -167,10 +167,6 @@ DCL_HOOK_FUNC(int, unshare, int flags) {
// A place to clean things up before zygote evaluates fd table
// A place to clean things up before zygote evaluates fd table
DCL_HOOK_FUNC
(
void
,
android_log_close
)
{
DCL_HOOK_FUNC
(
void
,
android_log_close
)
{
HookContext
::
close_fds
();
HookContext
::
close_fds
();
if
(
g_ctx
&&
g_ctx
->
pid
<=
0
)
{
// In child process, no longer be able to access to magiskd
android_logging
();
}
old_android_log_close
();
old_android_log_close
();
}
}
...
@@ -434,6 +430,9 @@ void HookContext::nativeSpecializeAppProcess_pre() {
...
@@ -434,6 +430,9 @@ void HookContext::nativeSpecializeAppProcess_pre() {
}
else
{
}
else
{
run_modules_pre
(
module_fds
);
run_modules_pre
(
module_fds
);
}
}
close_fds
();
android_logging
();
}
}
void
HookContext
::
nativeSpecializeAppProcess_post
()
{
void
HookContext
::
nativeSpecializeAppProcess_post
()
{
...
@@ -461,12 +460,12 @@ void HookContext::nativeForkSystemServer_pre() {
...
@@ -461,12 +460,12 @@ void HookContext::nativeForkSystemServer_pre() {
ZLOGV
(
"pre forkSystemServer
\n
"
);
ZLOGV
(
"pre forkSystemServer
\n
"
);
run_modules_pre
(
remote_get_info
(
1000
,
"system_server"
,
&
info
));
run_modules_pre
(
remote_get_info
(
1000
,
"system_server"
,
&
info
));
close_fds
();
close_fds
();
android_logging
();
}
}
}
}
void
HookContext
::
nativeForkSystemServer_post
()
{
void
HookContext
::
nativeForkSystemServer_post
()
{
if
(
pid
==
0
)
{
if
(
pid
==
0
)
{
android_logging
();
ZLOGV
(
"post forkSystemServer
\n
"
);
ZLOGV
(
"post forkSystemServer
\n
"
);
run_modules_post
();
run_modules_post
();
}
}
...
@@ -478,13 +477,11 @@ void HookContext::nativeForkAndSpecialize_pre() {
...
@@ -478,13 +477,11 @@ void HookContext::nativeForkAndSpecialize_pre() {
flags
[
FORK_AND_SPECIALIZE
]
=
true
;
flags
[
FORK_AND_SPECIALIZE
]
=
true
;
if
(
pid
==
0
)
{
if
(
pid
==
0
)
{
nativeSpecializeAppProcess_pre
();
nativeSpecializeAppProcess_pre
();
close_fds
();
}
}
}
}
void
HookContext
::
nativeForkAndSpecialize_post
()
{
void
HookContext
::
nativeForkAndSpecialize_post
()
{
if
(
pid
==
0
)
{
if
(
pid
==
0
)
{
android_logging
();
nativeSpecializeAppProcess_post
();
nativeSpecializeAppProcess_post
();
}
}
fork_post
();
fork_post
();
...
...
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