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
f97866a9
Commit
f97866a9
authored
Apr 09, 2022
by
vvb2060
Committed by
John Wu
Apr 14, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Close stub fd
parent
e1987c42
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
bootstages.cpp
native/jni/core/bootstages.cpp
+11
-8
No files found.
native/jni/core/bootstages.cpp
View file @
f97866a9
...
@@ -375,15 +375,18 @@ void boot_complete(int client) {
...
@@ -375,15 +375,18 @@ void boot_complete(int client) {
if
(
access
(
SECURE_DIR
,
F_OK
)
!=
0
)
if
(
access
(
SECURE_DIR
,
F_OK
)
!=
0
)
xmkdir
(
SECURE_DIR
,
0700
);
xmkdir
(
SECURE_DIR
,
0700
);
if
(
stub_fd
>
0
&&
!
get_manager
())
{
if
(
stub_fd
>
0
)
{
// Install stub
if
(
!
get_manager
())
{
struct
stat
st
{};
// Install stub
fstat
(
stub_fd
,
&
st
);
struct
stat
st
{};
int
dfd
=
xopen
(
"/data/stub.apk"
,
O_WRONLY
|
O_CREAT
|
O_TRUNC
|
O_CLOEXEC
,
0600
);
fstat
(
stub_fd
,
&
st
);
xsendfile
(
dfd
,
stub_fd
,
nullptr
,
st
.
st_size
);
char
apk
[]
=
"/data/stub.apk"
;
int
dfd
=
xopen
(
apk
,
O_WRONLY
|
O_CREAT
|
O_TRUNC
|
O_CLOEXEC
,
0600
);
xsendfile
(
dfd
,
stub_fd
,
nullptr
,
st
.
st_size
);
close
(
dfd
);
install_apk
(
apk
);
}
close
(
stub_fd
);
close
(
stub_fd
);
close
(
dfd
);
stub_fd
=
-
1
;
stub_fd
=
-
1
;
install_apk
(
"/data/stub.apk"
);
}
}
}
}
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