summaryrefslogtreecommitdiffstats
path: root/recovery.cpp
diff options
context:
space:
mode:
authorDees_Troy <dees_troy@teamw.in>2012-09-14 19:33:53 +0200
committerDees_Troy <dees_troy@teamw.in>2012-09-14 19:36:32 +0200
commit38bd760b589d405db9a2e6bf304f07d1b0bae342 (patch)
tree8f7dd4ccdcf52ea8b85007bdbeb7d682c1119815 /recovery.cpp
parentMake text appear in GUI console, Zip install works. (diff)
downloadandroid_bootable_recovery-38bd760b589d405db9a2e6bf304f07d1b0bae342.tar
android_bootable_recovery-38bd760b589d405db9a2e6bf304f07d1b0bae342.tar.gz
android_bootable_recovery-38bd760b589d405db9a2e6bf304f07d1b0bae342.tar.bz2
android_bootable_recovery-38bd760b589d405db9a2e6bf304f07d1b0bae342.tar.lz
android_bootable_recovery-38bd760b589d405db9a2e6bf304f07d1b0bae342.tar.xz
android_bootable_recovery-38bd760b589d405db9a2e6bf304f07d1b0bae342.tar.zst
android_bootable_recovery-38bd760b589d405db9a2e6bf304f07d1b0bae342.zip
Diffstat (limited to '')
-rw-r--r--recovery.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/recovery.cpp b/recovery.cpp
index 567a42e54..743920c85 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -32,7 +32,11 @@
#include "bootloader.h"
#include "common.h"
#include "cutils/properties.h"
+#ifdef ANDROID_RB_RESTART
#include "cutils/android_reboot.h"
+#else
+#include <sys/reboot.h>
+#endif
#include "install.h"
#include "minui/minui.h"
#include "minzip/DirUtil.h"
@@ -929,6 +933,10 @@ main(int argc, char **argv) {
// Otherwise, get ready to boot the main system...
finish_recovery(send_intent);
ui->Print("Rebooting...\n");
+#ifdef ANDROID_RB_RESTART
android_reboot(ANDROID_RB_RESTART, 0, 0);
+#else
+ reboot(RB_AUTOBOOT);
+#endif
return EXIT_SUCCESS;
}