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
aa92e4cb
Commit
aa92e4cb
authored
May 12, 2017
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix stupid bug in MagiskHide
parent
e603877a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
magiskhide.c
jni/magiskhide/magiskhide.c
+4
-4
proc_monitor.c
jni/magiskhide/proc_monitor.c
+2
-1
No files found.
jni/magiskhide/magiskhide.c
View file @
aa92e4cb
...
...
@@ -75,6 +75,10 @@ void launch_magiskhide(int client) {
close
(
sv
[
1
]);
// Initialize the mutex lock
pthread_mutex_init
(
&
hide_lock
,
NULL
);
pthread_mutex_init
(
&
file_lock
,
NULL
);
// Initialize the hide list
if
(
init_list
())
goto
error
;
...
...
@@ -82,10 +86,6 @@ void launch_magiskhide(int client) {
// Add SafetyNet by default
add_list
(
strdup
(
"com.google.android.gms.unstable"
));
// Initialize the mutex lock
pthread_mutex_init
(
&
hide_lock
,
NULL
);
pthread_mutex_init
(
&
file_lock
,
NULL
);
write_int
(
client
,
DAEMON_SUCCESS
);
close
(
client
);
...
...
jni/magiskhide/proc_monitor.c
View file @
aa92e4cb
...
...
@@ -30,6 +30,7 @@ static void read_namespace(const int pid, char* target, const size_t size) {
// Workaround for the lack of pthread_cancel
static
void
quit_pthread
(
int
sig
)
{
err_handler
=
do_nothing
;
LOGD
(
"proc_monitor: running cleanup
\n
"
);
destroy_list
();
free
(
buffer
);
...
...
@@ -71,7 +72,7 @@ void proc_monitor() {
struct
sigaction
act
;
memset
(
&
act
,
0
,
sizeof
(
act
));
act
.
sa_handler
=
quit_pthread
;
sigaction
(
SIG
PIPE
,
&
act
,
NULL
);
sigaction
(
SIG
USR1
,
&
act
,
NULL
);
// The error handler should stop magiskhide services
err_handler
=
proc_monitor_err
;
...
...
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