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
e836909c
Commit
e836909c
authored
Jan 08, 2023
by
vvb2060
Committed by
John Wu
Jan 18, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
umount old hijack binary
parent
7769ba5f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
entry.cpp
native/src/zygisk/entry.cpp
+14
-14
No files found.
native/src/zygisk/entry.cpp
View file @
e836909c
...
...
@@ -224,7 +224,20 @@ static void setup_files(int client, const sock_cred *cred) {
return
;
}
// Hijack some binary in /system/bin to host loader
const
char
*
hbin
;
string
mbin
;
int
app_fd
;
bool
is_64_bit
=
str_ends
(
buf
,
"64"
);
if
(
is_64_bit
)
{
hbin
=
HIJACK_BIN64
;
mbin
=
MAGISKTMP
+
"/"
ZYGISKBIN
"/loader64.so"
;
app_fd
=
app_process_64
;
}
else
{
hbin
=
HIJACK_BIN32
;
mbin
=
MAGISKTMP
+
"/"
ZYGISKBIN
"/loader32.so"
;
app_fd
=
app_process_32
;
}
if
(
!
zygote_started
)
{
// First zygote launch, record time
...
...
@@ -237,6 +250,7 @@ static void setup_files(int client, const sock_cred *cred) {
close
(
zygiskd_sockets
[
1
]);
zygiskd_sockets
[
0
]
=
-
1
;
zygiskd_sockets
[
1
]
=
-
1
;
xumount2
(
hbin
,
MNT_DETACH
);
}
++
zygote_start_count
;
...
...
@@ -260,20 +274,6 @@ static void setup_files(int client, const sock_cred *cred) {
// Ack
write_int
(
client
,
0
);
// Hijack some binary in /system/bin to host loader
const
char
*
hbin
;
string
mbin
;
int
app_fd
;
if
(
is_64_bit
)
{
hbin
=
HIJACK_BIN64
;
mbin
=
MAGISKTMP
+
"/"
ZYGISKBIN
"/loader64.so"
;
app_fd
=
app_process_64
;
}
else
{
hbin
=
HIJACK_BIN32
;
mbin
=
MAGISKTMP
+
"/"
ZYGISKBIN
"/loader32.so"
;
app_fd
=
app_process_32
;
}
// Receive and bind mount loader
int
ld_fd
=
xopen
(
mbin
.
data
(),
O_WRONLY
|
O_TRUNC
|
O_CREAT
|
O_CLOEXEC
,
0755
);
string
ld_data
=
read_string
(
client
);
...
...
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