From 486b2c82a7d0253513744f138f3314a4e8fc2409 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Tue, 21 Apr 2020 20:04:29 -0700 Subject: [PATCH] Disable kmsg rate limiting --- native/jni/init/getinfo.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/native/jni/init/getinfo.cpp b/native/jni/init/getinfo.cpp index 92101b244..4a36300a4 100644 --- a/native/jni/init/getinfo.cpp +++ b/native/jni/init/getinfo.cpp @@ -100,12 +100,17 @@ void load_kernel_info(cmdline *cmd) { xmkdir("/sys", 0755); xmount("sysfs", "/sys", "sysfs", 0, nullptr); + // Disable kmsg rate limiting + if (FILE *rate = fopen("/proc/sys/kernel/printk_devkmsg", "w"); rate) { + fprintf(rate, "on\n"); + fclose(rate); + } + bool enter_recovery = false; bool kirin = false; bool recovery_mode = false; parse_cmdline([&](auto key, auto value) -> void { - LOGD("cmdline: [%s]=[%s]\n", key.data(), value); if (key == "androidboot.slot_suffix") { strcpy(cmd->slot, value); } else if (key == "androidboot.slot") {