Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9190f55d authored by Brint E. Kriebel's avatar Brint E. Kriebel
Browse files

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

Change-Id: I9d6ec23c65291221e99d67b2361a2bd150319eee
(cherry picked from commit 471eb4e1)
parent 15800700
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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);