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
e645c6e4
Commit
e645c6e4
authored
Oct 09, 2017
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor resetprop
parent
78a3d36c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
306 additions
and
201 deletions
+306
-201
resetprop.h
jni/include/resetprop.h
+4
-2
hide_utils.c
jni/magiskhide/hide_utils.c
+2
-2
magiskhide.c
jni/magiskhide/magiskhide.c
+2
-2
resetprop.cpp
jni/resetprop/resetprop.cpp
+298
-195
No files found.
jni/include/resetprop.h
View file @
e645c6e4
...
@@ -12,9 +12,11 @@ int prop_exist(const char *name);
...
@@ -12,9 +12,11 @@ int prop_exist(const char *name);
int
setprop
(
const
char
*
name
,
const
char
*
value
);
int
setprop
(
const
char
*
name
,
const
char
*
value
);
int
setprop2
(
const
char
*
name
,
const
char
*
value
,
const
int
trigger
);
int
setprop2
(
const
char
*
name
,
const
char
*
value
,
const
int
trigger
);
char
*
getprop
(
const
char
*
name
);
char
*
getprop
(
const
char
*
name
);
int
deleteprop
(
const
char
*
name
,
const
int
trigger
);
char
*
getprop2
(
const
char
*
name
,
int
persist
);
int
deleteprop
(
const
char
*
name
);
int
deleteprop2
(
const
char
*
name
,
const
int
persist
);
int
read_prop_file
(
const
char
*
filename
,
const
int
trigger
);
int
read_prop_file
(
const
char
*
filename
,
const
int
trigger
);
void
getprop_all
(
void
(
*
c
bk
)(
const
char
*
name
));
void
getprop_all
(
void
(
*
c
allback
)(
const
char
*
,
const
char
*
));
#ifdef __cplusplus
#ifdef __cplusplus
}
}
...
...
jni/magiskhide/hide_utils.c
View file @
e645c6e4
...
@@ -58,9 +58,9 @@ void hide_sensitive_props() {
...
@@ -58,9 +58,9 @@ void hide_sensitive_props() {
}
}
}
}
static
void
rm_magisk_prop
(
const
char
*
name
)
{
static
void
rm_magisk_prop
(
const
char
*
name
,
const
char
*
value
)
{
if
(
strstr
(
name
,
"magisk"
))
{
if
(
strstr
(
name
,
"magisk"
))
{
deleteprop
(
name
,
0
);
deleteprop
2
(
name
,
0
);
}
}
}
}
...
...
jni/magiskhide/magiskhide.c
View file @
e645c6e4
...
@@ -55,7 +55,7 @@ void launch_magiskhide(int client) {
...
@@ -55,7 +55,7 @@ void launch_magiskhide(int client) {
hideEnabled
=
1
;
hideEnabled
=
1
;
LOGI
(
"* Starting MagiskHide
\n
"
);
LOGI
(
"* Starting MagiskHide
\n
"
);
deleteprop
(
MAGISKHIDE_PROP
,
1
);
deleteprop
2
(
MAGISKHIDE_PROP
,
1
);
hide_sensitive_props
();
hide_sensitive_props
();
...
@@ -102,7 +102,7 @@ void stop_magiskhide(int client) {
...
@@ -102,7 +102,7 @@ void stop_magiskhide(int client) {
hideEnabled
=
0
;
hideEnabled
=
0
;
setprop
(
MAGISKHIDE_PROP
,
"0"
);
setprop
(
MAGISKHIDE_PROP
,
"0"
);
// Remove without actually removing persist props
// Remove without actually removing persist props
deleteprop
(
MAGISKHIDE_PROP
,
0
);
deleteprop
2
(
MAGISKHIDE_PROP
,
0
);
pthread_kill
(
proc_monitor_thread
,
SIGUSR1
);
pthread_kill
(
proc_monitor_thread
,
SIGUSR1
);
write_int
(
client
,
DAEMON_SUCCESS
);
write_int
(
client
,
DAEMON_SUCCESS
);
...
...
jni/resetprop/resetprop.cpp
View file @
e645c6e4
This diff is collapsed.
Click to expand it.
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