summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/init.pixel.rc10
1 files changed, 10 insertions, 0 deletions
diff --git a/common/init.pixel.rc b/common/init.pixel.rc
index 9c4d223..ad75632 100644
--- a/common/init.pixel.rc
+++ b/common/init.pixel.rc
@@ -32,3 +32,13 @@ on property:persist.sys.theme=1
on property:persist.sys.theme=0
start vendor.theme_clear
+# Set or clear the warm reset flag upon the change of system property. The flag itself is set
+on init && property:ro.boot.slot_successful=no
+ write /sys/module/msm_poweroff/parameters/warm_reset 1
+
+# by writing a sysfs file; and the file will be read by kernel.
+on property:ota.warm_reset=1
+ write /sys/module/msm_poweroff/parameters/warm_reset 1
+
+on property:ota.warm_reset=0
+ write /sys/module/msm_poweroff/parameters/warm_reset 0