Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
bmax committed Mar 5, 2024
1 parent 7c1a250 commit 4c42f34
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 5 additions & 1 deletion tools/patch.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ void print_preset_info(preset_t *preset)
while (pos < setup->additional + ADDITIONAL_LEN) {
int len = *pos;
if (!len) break;
fprintf(stdout, "%s\n", strndup(++pos, len));
pos++;
char backup = *(pos + len);
*(pos + len) = 0;
fprintf(stdout, "%s\n", pos);
*(pos + len) = backup;
pos += len;
}
}
Expand Down
7 changes: 2 additions & 5 deletions user/android/android_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ struct allow_pkg_info
static char magiskpolicy_path[] = APATCH_BIN_FLODER "magiskpolicy";
static char pkg_cfg_path[] = APATCH_FLODER "package_config";
static char su_path_path[] = APATCH_FLODER "su_path";
static char skip_sepolicy_path[] = APATCH_FLODER "skip_sepolicy";

static char post_fs_data_log_0[] = APATCH_LOG_FLODER "post_fs_data_0.log";
static char post_fs_data_log_1[] = APATCH_LOG_FLODER "post_fs_data_1.log";
Expand Down Expand Up @@ -246,10 +245,8 @@ static void post_fs_data_init()
log_args[1] = EARLY_INIT_LOG_1;
fork_for_result(log_args[0], log_args);

if (!access(skip_sepolicy_path, F_OK)) {
char *argv[] = { magiskpolicy_path, "--magisk", "--live", NULL };
fork_for_result(magiskpolicy_path, argv);
}
char *argv[] = { magiskpolicy_path, "--magisk", "--live", NULL };
fork_for_result(magiskpolicy_path, argv);

load_config_su_path();
load_config_allow_uids();
Expand Down

0 comments on commit 4c42f34

Please sign in to comment.