aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--updater/install.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/updater/install.c b/updater/install.c
index 43d5cfb..19c22fb 100644
--- a/updater/install.c
+++ b/updater/install.c
@@ -1530,6 +1530,11 @@ Value* RebootNowFn(const char* name, State* state, int argc, Expr* argv[]) {
property_set(ANDROID_RB_PROPERTY, buffer);
sleep(5);
+ // Attempt to reboot using older methods in case the recovery
+ // that we are updating does not support init reboots
+ android_reboot(ANDROID_RB_RESTART, 0, 0);
+
+ sleep(5);
free(property);
ErrorAbort(state, "%s() failed to reboot", name);
return NULL;