diff --git a/native/src/init/twostage.cpp b/native/src/init/twostage.cpp index ca4529aa7..1d1599b61 100644 --- a/native/src/init/twostage.cpp +++ b/native/src/init/twostage.cpp @@ -35,6 +35,7 @@ void LegacySARInit::first_stage_prep() { bool SecondStageInit::prepare() { umount2("/init", MNT_DETACH); umount2("/proc/self/exe", MNT_DETACH); + unlink("/data/init"); // Make sure init dmesg logs won't get messed up argv[0] = (char *) INIT_PATH; diff --git a/scripts/boot_patch.sh b/scripts/boot_patch.sh index 966a7c127..b4184df41 100644 --- a/scripts/boot_patch.sh +++ b/scripts/boot_patch.sh @@ -185,7 +185,7 @@ fi "mkdir 000 .backup" \ "add 000 .backup/.magisk config" -rm -f ramdisk.cpio.orig config magisk*.xz stub.xz +rm -f ramdisk.cpio.orig config magisk*.xz stub.xz stub.apk ################# # Binary Patches