aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrint E. Kriebel <bekit@cyngn.com>2015-03-26 14:11:04 -0700
committerBrint E. Kriebel <bekit@cyngn.com>2015-03-28 02:49:28 +0000
commit9190f55d48f1b8ae4a345dfba8ead26d42e29c64 (patch)
treea5f47fac4fca4a16f2b003d2c8d578f500570289
parent15800700b466a04acb2995d2a612774d1430572a (diff)
downloadandroid_bootable_recovery-stable/cm-12.0-YNG1T.tar.gz
android_bootable_recovery-stable/cm-12.0-YNG1T.tar.bz2
android_bootable_recovery-stable/cm-12.0-YNG1T.zip
update-binary: support reboot_now on older recoveriesstable/cm-12.0-YNG1TAstable/cm-12.0-YNG1T
Attempt to reboot using older methods in case the recovery that we are updating does not support init reboots Change-Id: I9d6ec23c65291221e99d67b2361a2bd150319eee (cherry picked from commit 471eb4e140b36c9a6092c70bf4e286961b1378e3)
-rw-r--r--updater/install.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/updater/install.c b/updater/install.c
index 23be4571..95795e35 100644
--- a/updater/install.c
+++ b/updater/install.c
@@ -1559,6 +1559,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;