Small tweaks

This commit is contained in:
topjohnwu
2017-04-24 21:43:30 +08:00
parent 95fec2100e
commit 495654f9ff
6 changed files with 15 additions and 8 deletions

View File

@@ -102,7 +102,7 @@ int init_list() {
return 1;
vec_init(hide_list);
// Might return 1 if first time
// Might error if file doesn't exist, no need to report
file_to_vector(HIDELIST, hide_list);
char *line;

View File

@@ -43,6 +43,9 @@ static void usage(char *arg0) {
}
void launch_magiskhide(int client) {
// We manually handle crashes
err_handler = do_nothing;
if (hideEnabled) {
write_int(client, HIDE_IS_ENABLED);
close(client);
@@ -52,8 +55,12 @@ void launch_magiskhide(int client) {
LOGI("* Starting MagiskHide\n");
hideEnabled = 1;
init_resetprop();
setprop2("persist.magisk.hide", "1", 0);
if (init_resetprop())
goto error;
if (setprop2("persist.magisk.hide", "1", 0))
goto error;
hide_sensitive_props();

View File

@@ -66,7 +66,7 @@ static void proc_monitor_err() {
void proc_monitor() {
// Register the cancel signal
signal(SIGUSR1, quit_pthread);
// The error handler should only exit the thread, not the whole process
// The error handler should stop magiskhide services
err_handler = proc_monitor_err;
int pid;