From 4d876f01458e38790eab315a32444f2efece1571 Mon Sep 17 00:00:00 2001 From: LoveSy Date: Sat, 24 Dec 2022 21:44:56 +0800 Subject: [PATCH] Support detecting safemode by ro.sys.safemode --- native/src/core/bootstages.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/native/src/core/bootstages.cpp b/native/src/core/bootstages.cpp index 8908a0750..bc5553447 100644 --- a/native/src/core/bootstages.cpp +++ b/native/src/core/bootstages.cpp @@ -313,7 +313,8 @@ void post_fs_data(int client) { goto early_abort; } - if (getprop("persist.sys.safemode", true) == "1" || check_key_combo()) { + if (getprop("persist.sys.safemode", true) == "1" || + getprop("ro.sys.safemode") == "1" || check_key_combo()) { safe_mode = true; // Disable all modules and denylist so next boot will be clean disable_modules();