aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Android.mk2
-rw-r--r--recovery.c20
2 files changed, 18 insertions, 4 deletions
diff --git a/Android.mk b/Android.mk
index 2e0966f..3556218 100644
--- a/Android.mk
+++ b/Android.mk
@@ -38,7 +38,7 @@ RECOVERY_NAME := CWM-based Recovery
endif
endif
-RECOVERY_VERSION := $(RECOVERY_NAME) v6.0.3.3
+RECOVERY_VERSION := $(RECOVERY_NAME) v6.0.3.4
LOCAL_CFLAGS += -DRECOVERY_VERSION="$(RECOVERY_VERSION)"
RECOVERY_API_VERSION := 2
diff --git a/recovery.c b/recovery.c
index 7281c15..6e8555e 100644
--- a/recovery.c
+++ b/recovery.c
@@ -680,6 +680,15 @@ wipe_data(int confirm) {
ui_print("Data wipe complete.\n");
}
+static void headless_wait() {
+ ui_show_text(0);
+ char** headers = prepend_title((const char**)MENU_HEADERS);
+ for (;;) {
+ finish_recovery(NULL);
+ get_menu_selection(headers, MENU_ITEMS, 0, 0);
+ }
+}
+
int ui_menu_level = 1;
int ui_root_menu = 0;
static void
@@ -962,8 +971,10 @@ main(int argc, char **argv) {
signature_check_enabled = 0;
script_assert_enabled = 0;
is_user_initiated_recovery = 1;
- ui_set_show_text(1);
- ui_set_background(BACKGROUND_ICON_CLOCKWORK);
+ if (!headless) {
+ ui_set_show_text(1);
+ ui_set_background(BACKGROUND_ICON_CLOCKWORK);
+ }
if (extendedcommand_file_exists()) {
LOGI("Running extendedcommand...\n");
@@ -982,11 +993,14 @@ main(int argc, char **argv) {
setup_adbd();
+ if (headless) {
+ headless_wait();
+ }
if (status != INSTALL_SUCCESS && !is_user_initiated_recovery) {
ui_set_show_text(1);
ui_set_background(BACKGROUND_ICON_ERROR);
}
- if (status != INSTALL_SUCCESS || ui_text_visible()) {
+ else if (status != INSTALL_SUCCESS || ui_text_visible()) {
prompt_and_wait();
}