diff --git a/recovery.c b/recovery.c index 14fc905..fd7ce42 100644 --- a/recovery.c +++ b/recovery.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -33,6 +32,7 @@ #include "bootloader.h" #include "common.h" #include "cutils/properties.h" +#include "cutils/android_reboot.h" #include "install.h" #include "minui/minui.h" #include "minzip/DirUtil.h" @@ -768,7 +768,6 @@ main(int argc, char **argv) { // Otherwise, get ready to boot the main system... finish_recovery(send_intent); ui_print("Rebooting...\n"); - sync(); - reboot(RB_AUTOBOOT); + android_reboot(ANDROID_RB_RESTART, 0, 0); return EXIT_SUCCESS; } diff --git a/ui.c b/ui.c index 179eb2a..0744da4 100644 --- a/ui.c +++ b/ui.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -30,6 +29,7 @@ #include #include "common.h" +#include #include "minui/minui.h" #include "recovery_ui.h" @@ -358,7 +358,7 @@ static void *input_thread(void *cookie) } if (ev.value > 0 && device_reboot_now(key_pressed, ev.code)) { - reboot(RB_AUTOBOOT); + android_reboot(ANDROID_RB_RESTART, 0, 0); } } return NULL;