core: Treat reboot boot mode same as normal one
OnePlus SM8250 sets this as a value while rebooting the OS for some reason.
This causes the checks to fail and finally SafetyNet to fail after reboot.
Signed-off-by: zlewchan <x@zlew.tf>
Change-Id: Idc8cbd084c86b83815616be17f2a0828aa16f3af
diff --git a/init/property_service.cpp b/init/property_service.cpp
index 25fec1c..798f3a7 100644
--- a/init/property_service.cpp
+++ b/init/property_service.cpp
@@ -863,12 +863,12 @@
auto isNormalBoot = true; // no prop = normal boot
// This runs before keys are set as props, so we need to process them ourselves.
ImportKernelCmdline([&](const std::string& key, const std::string& value) {
- if (key == ANDROIDBOOT_MODE && value != "normal") {
+ if (key == ANDROIDBOOT_MODE && value != "normal" && value != "reboot") {
isNormalBoot = false;
}
});
ImportBootconfig([&](const std::string& key, const std::string& value) {
- if (key == ANDROIDBOOT_MODE && value != "normal") {
+ if (key == ANDROIDBOOT_MODE && value != "normal" && value != "reboot") {
isNormalBoot = false;
}
});