mirror of
https://github.com/topjohnwu/Magisk.git
synced 2026-01-10 12:13:50 -08:00
Minor MagiskHide adjustments
- Fail fast on unsupported systems - Show proper fail message on unsupported systems - inotify_fd shall be swapped out before closing to prevent the proc_monitor thread to read from incomplete inotify fd
This commit is contained in:
@@ -297,7 +297,7 @@ static void set_hide_config() {
|
||||
}
|
||||
|
||||
static inline void launch_err(int client, int code = DAEMON_ERROR) {
|
||||
if (code == DAEMON_ERROR)
|
||||
if (code != HIDE_IS_ENABLED)
|
||||
hide_enabled = false;
|
||||
if (client >= 0) {
|
||||
write_int(client, code);
|
||||
@@ -315,6 +315,9 @@ void launch_magiskhide(int client) {
|
||||
if (hide_enabled)
|
||||
launch_err(client, HIDE_IS_ENABLED);
|
||||
|
||||
if (access("/proc/1/ns/mnt", F_OK) != 0)
|
||||
launch_err(client, HIDE_NO_NS);
|
||||
|
||||
hide_enabled = true;
|
||||
set_hide_config();
|
||||
LOGI("* Starting MagiskHide\n");
|
||||
|
||||
Reference in New Issue
Block a user