From 72cf5f3f9fd414b45a280fae65e9c88296373db3 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Fri, 31 Aug 2018 03:23:59 -0400 Subject: [PATCH] Temporary disable module bootloop prevention Some devices don't like it, need further tests before pushing to production --- native/jni/core/bootstages.c | 2 ++ native/jni/include/magiskrc.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/native/jni/core/bootstages.c b/native/jni/core/bootstages.c index 69f6daef1..8ab62d9f2 100644 --- a/native/jni/core/bootstages.c +++ b/native/jni/core/bootstages.c @@ -530,6 +530,7 @@ void startup() { unblock_boot_process(); } +#if 0 // Increment boot count int boot_count = 0; FILE *cf = fopen(BOOTCOUNT, "r"); @@ -543,6 +544,7 @@ void startup() { cf = xfopen(BOOTCOUNT, "w"); fprintf(cf, "%d", boot_count); fclose(cf); +#endif // No uninstaller or core-only mode if (access(DISABLEFILE, F_OK) != 0) { diff --git a/native/jni/include/magiskrc.h b/native/jni/include/magiskrc.h index ac60bc348..6fce007eb 100644 --- a/native/jni/include/magiskrc.h +++ b/native/jni/include/magiskrc.h @@ -14,9 +14,11 @@ const char magiskrc[] = " rm "UNBLOCKFILE"\n" "\n" +#if 0 "on property:sys.boot_completed=1\n" " start magisk_bc\n" "\n" +#endif // Services