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
555a54ec
Commit
555a54ec
authored
Aug 31, 2022
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid doing any unmounts for SysUI
parent
1565bf54
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
hook.cpp
native/src/zygisk/hook.cpp
+7
-1
No files found.
native/src/zygisk/hook.cpp
View file @
555a54ec
...
@@ -154,13 +154,19 @@ DCL_HOOK_FUNC(int, fork) {
...
@@ -154,13 +154,19 @@ DCL_HOOK_FUNC(int, fork) {
// Unmount stuffs in the process's private mount namespace
// Unmount stuffs in the process's private mount namespace
DCL_HOOK_FUNC
(
int
,
unshare
,
int
flags
)
{
DCL_HOOK_FUNC
(
int
,
unshare
,
int
flags
)
{
int
res
=
old_unshare
(
flags
);
int
res
=
old_unshare
(
flags
);
if
(
g_ctx
&&
(
flags
&
CLONE_NEWNS
)
!=
0
&&
res
==
0
)
{
if
(
g_ctx
&&
(
flags
&
CLONE_NEWNS
)
!=
0
&&
res
==
0
&&
// For some unknown reason, unmounting app_process in SysUI can break.
// This is reproducible on the official AVD running API 26 and 27.
// Simply avoid doing any unmounts for SysUI to avoid potential issues.
g_ctx
->
process
&&
g_ctx
->
process
!=
"com.android.systemui"
sv
)
{
if
(
g_ctx
->
state
[
DO_UNMOUNT
])
{
if
(
g_ctx
->
state
[
DO_UNMOUNT
])
{
revert_unmount
();
revert_unmount
();
}
else
{
}
else
{
umount2
(
"/system/bin/app_process64"
,
MNT_DETACH
);
umount2
(
"/system/bin/app_process64"
,
MNT_DETACH
);
umount2
(
"/system/bin/app_process32"
,
MNT_DETACH
);
umount2
(
"/system/bin/app_process32"
,
MNT_DETACH
);
}
}
// Restore errno back to 0
errno
=
0
;
}
}
return
res
;
return
res
;
}
}
...
...
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