Skip to content

Commit

Permalink
update-binary: support reboot_now on older recoveries
Browse files Browse the repository at this point in the history
Attempt to reboot using older methods in case the recovery that we
are updating does not support init reboots

Change-Id: I9d6ec23c65291221e99d67b2361a2bd150319eee
  • Loading branch information
Brint E. Kriebel committed Mar 26, 2015
1 parent 1580070 commit 471eb4e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions updater/install.c
Expand Up @@ -1558,6 +1558,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);
Expand Down

0 comments on commit 471eb4e

Please sign in to comment.