Enable magiskhide by default

This commit is contained in:
topjohnwu 2017-07-01 15:45:22 +08:00
parent 7cf4b819ae
commit 7b9be8369e

View File

@ -702,16 +702,14 @@ void post_fs_data(int client) {
bind_mount(HOSTSFILE, "/system/etc/hosts"); bind_mount(HOSTSFILE, "/system/etc/hosts");
} }
// Start magiskhide if enabled // Enable magiskhide by default, only disable when set explicitly
char *hide_prop = getprop(MAGISKHIDE_PROP); char *hide_prop = getprop(MAGISKHIDE_PROP);
if (hide_prop) { if (hide_prop == NULL || strcmp(hide_prop, "0") != 0) {
if (strcmp(hide_prop, "1") == 0) { pthread_t thread;
pthread_t thread; xpthread_create(&thread, NULL, start_magisk_hide, NULL);
xpthread_create(&thread, NULL, start_magisk_hide, NULL); pthread_detach(thread);
pthread_detach(thread);
}
free(hide_prop);
} }
free(hide_prop);
unblock: unblock:
unblock_boot_process(); unblock_boot_process();