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
c3e045e3
Commit
c3e045e3
authored
May 18, 2020
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use daemon state to determine late prop hiding
parent
501d3e6c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
bootstages.cpp
native/jni/core/bootstages.cpp
+1
-1
daemon.cpp
native/jni/core/daemon.cpp
+4
-4
daemon.hpp
native/jni/include/daemon.hpp
+3
-3
hide_utils.cpp
native/jni/magiskhide/hide_utils.cpp
+1
-1
No files found.
native/jni/core/bootstages.cpp
View file @
c3e045e3
...
...
@@ -19,7 +19,7 @@
using
namespace
std
;
bool
pfs_done
=
false
;
static
bool
pfs_done
=
false
;
static
bool
no_secure_dir
=
false
;
static
bool
safe_mode
=
false
;
...
...
native/jni/core/daemon.cpp
View file @
c3e045e3
...
...
@@ -20,7 +20,7 @@ using namespace std;
int
SDK_INT
=
-
1
;
bool
RECOVERY_MODE
=
false
;
string
MAGISKTMP
;
int
daemon_state
=
STATE_UNKNOWN
;
int
DAEMON_STATE
=
STATE_UNKNOWN
;
static
struct
stat
self_st
;
...
...
@@ -98,13 +98,13 @@ static void handle_request(int client) {
switch
(
req_code
)
{
// In case of init trigger launches, set the corresponding states
case
POST_FS_DATA
:
daemon_state
=
STATE_POST_FS_DATA
;
DAEMON_STATE
=
STATE_POST_FS_DATA
;
break
;
case
LATE_START
:
daemon_state
=
STATE_LATE_START
;
DAEMON_STATE
=
STATE_LATE_START
;
break
;
case
BOOT_COMPLETE
:
daemon_state
=
STATE_BOOT_COMPLETE
;
DAEMON_STATE
=
STATE_BOOT_COMPLETE
;
break
;
// Simple requests to query daemon info
...
...
native/jni/include/daemon.hpp
View file @
c3e045e3
...
...
@@ -39,11 +39,11 @@ enum {
extern
int
SDK_INT
;
extern
bool
RECOVERY_MODE
;
extern
int
daemon_state
;
extern
bool
pfs_done
;
extern
std
::
vector
<
std
::
string
>
module_list
;
extern
int
DAEMON_STATE
;
#define APP_DATA_DIR (SDK_INT >= 24 ? "/data/user_de" : "/data/user")
extern
std
::
vector
<
std
::
string
>
module_list
;
// Daemon handlers
void
post_fs_data
(
int
client
);
void
late_start
(
int
client
);
...
...
native/jni/magiskhide/hide_utils.cpp
View file @
c3e045e3
...
...
@@ -247,7 +247,7 @@ int launch_magiskhide() {
return
DAEMON_ERROR
;
hide_sensitive_props
();
if
(
pfs_done
)
if
(
DAEMON_STATE
>=
STATE_BOOT_COMPLETE
)
hide_late_sensitive_props
();
// Initialize the mutex lock
...
...
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