Support detecting safemode by ro.sys.safemode

This commit is contained in:
LoveSy 2022-12-24 21:44:56 +08:00 committed by John Wu
parent bdfedea4e0
commit 4d876f0145

View File

@ -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();