diff options
Diffstat (limited to 'uncrypt')
-rw-r--r-- | uncrypt/Android.mk | 2 | ||||
-rw-r--r-- | uncrypt/uncrypt.cpp | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/uncrypt/Android.mk b/uncrypt/Android.mk index c7d4d3746..e73c8f1b6 100644 --- a/uncrypt/Android.mk +++ b/uncrypt/Android.mk @@ -16,6 +16,8 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) +LOCAL_CLANG := true + LOCAL_SRC_FILES := uncrypt.cpp LOCAL_MODULE := uncrypt diff --git a/uncrypt/uncrypt.cpp b/uncrypt/uncrypt.cpp index 46da86d61..8785b29af 100644 --- a/uncrypt/uncrypt.cpp +++ b/uncrypt/uncrypt.cpp @@ -53,8 +53,10 @@ #include <base/file.h> #include <base/strings.h> +#include <cutils/android_reboot.h> #include <cutils/properties.h> #include <fs_mgr.h> + #define LOG_TAG "uncrypt" #include <log/log.h> @@ -358,7 +360,9 @@ static void wipe_misc() { static void reboot_to_recovery() { ALOGI("rebooting to recovery"); property_set("sys.powerctl", "reboot,recovery"); - sleep(10); + while (true) { + pause(); + } ALOGE("reboot didn't succeed?"); } |