aboutsummaryrefslogtreecommitdiffstats
path: root/updater
diff options
context:
space:
mode:
authorBrint E. Kriebel <bekit@cyngn.com>2015-03-26 14:11:04 -0700
committerTom Marshall <tdm@cyngn.com>2015-11-25 15:35:48 -0800
commit7cfda80f256a69909c3954b62b86c94a189d9734 (patch)
treef70883b94c9fb0122874ead97cad70d47803d6b1 /updater
parent5e381e93bf8cdcfec41582cde2283a0cb4f58fd1 (diff)
downloadbootable_recovery-7cfda80f256a69909c3954b62b86c94a189d9734.zip
bootable_recovery-7cfda80f256a69909c3954b62b86c94a189d9734.tar.gz
bootable_recovery-7cfda80f256a69909c3954b62b86c94a189d9734.tar.bz2
update-binary: support reboot_now on older recoveries
Attempt to reboot using older methods in case the recovery that we are updating does not support init reboots Ticket: CYNGNOS-1242 Change-Id: I9d6ec23c65291221e99d67b2361a2bd150319eee
Diffstat (limited to 'updater')
-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;