You've already forked KernelSU-Next
mirror of
https://github.com/KernelSU-Next/KernelSU-Next.git
synced 2025-08-27 23:46:34 +00:00
ksud: Add second_stage init variant (#653)
There are some ROMs based on AOSP that calls on second stage init with argc: 2 but with first_arg: "". This causes KSU to not work properly on those systems. Signed-off-by: Edrick Sinsuan <evcsinsuan@gmail.com>
This commit is contained in:
@@ -201,7 +201,8 @@ int ksu_handle_execveat_ksud(int *fd, struct filename **filename_ptr,
|
||||
first_arg, p, sizeof(first_arg));
|
||||
pr_info("/system/bin/init first arg: %s\n",
|
||||
first_arg);
|
||||
if (!strcmp(first_arg, "second_stage")) {
|
||||
if (!strcmp(first_arg, "second_stage") ||
|
||||
(argc == 2 && !strcmp(first_arg, ""))) {
|
||||
pr_info("/system/bin/init second_stage executed\n");
|
||||
apply_kernelsu_rules();
|
||||
init_second_stage_executed = true;
|
||||
|
||||
Reference in New Issue
Block a user