diff --git a/init/init_sagit.cpp b/init/init_sagit.cpp index 7003099..42262be 100644 --- a/init/init_sagit.cpp +++ b/init/init_sagit.cpp @@ -42,6 +42,7 @@ static void init_alarm_boot_properties() { char const *boot_reason_file = "/proc/sys/kernel/boot_reason"; std::string boot_reason; + std::string reboot_reason = property_get("ro.boot.alarmboot"); if (read_file(boot_reason_file, &boot_reason)) { /* @@ -59,7 +60,7 @@ static void init_alarm_boot_properties() * 7 -> CBLPWR_N pin toggled (for external power supply) * 8 -> KPDPWR_N pin toggled (power key pressed) */ - if (Trim(boot_reason) == "3") { + if (Trim(boot_reason) == "3" || reboot_reason == "true") { property_set("ro.alarm_boot", "true"); } else { property_set("ro.alarm_boot", "false");