aboutsummaryrefslogtreecommitdiffstats
path: root/recovery.c
diff options
context:
space:
mode:
authorKoushik Dutta <koushd@gmail.com>2013-07-19 16:19:11 -0700
committerKoushik Dutta <koushd@gmail.com>2013-07-19 16:19:11 -0700
commitab60a0786caae012a071ec2f972b983385c55809 (patch)
tree78411a38caaf075493983501045bb009e7dcb5c8 /recovery.c
parentcfb115f449a1905ffc8bd2a2bdfa2a322ee56f80 (diff)
downloadbootable_recovery-ab60a0786caae012a071ec2f972b983385c55809.zip
bootable_recovery-ab60a0786caae012a071ec2f972b983385c55809.tar.gz
bootable_recovery-ab60a0786caae012a071ec2f972b983385c55809.tar.bz2
add --headless mode
Change-Id: I6338ed1d093a8db20250bd060cf97896db268976
Diffstat (limited to 'recovery.c')
-rw-r--r--recovery.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/recovery.c b/recovery.c
index 8cfaa73..83ef59c 100644
--- a/recovery.c
+++ b/recovery.c
@@ -53,6 +53,7 @@ struct selabel_handle *sehandle = NULL;
static const struct option OPTIONS[] = {
{ "send_intent", required_argument, NULL, 's' },
{ "update_package", required_argument, NULL, 'u' },
+ { "headless", no_argument, NULL, 'h' },
{ "wipe_data", no_argument, NULL, 'w' },
{ "wipe_cache", no_argument, NULL, 'c' },
{ "show_text", no_argument, NULL, 't' },
@@ -864,6 +865,7 @@ main(int argc, char **argv) {
const char *update_package = NULL;
int wipe_data = 0, wipe_cache = 0;
int sideload = 0;
+ int headless = 0;
LOGI("Checking arguments.\n");
int arg;
@@ -877,6 +879,11 @@ main(int argc, char **argv) {
wipe_data = wipe_cache = 1;
#endif
break;
+ case 'h':
+ ui_set_background(BACKGROUND_ICON_CID);
+ ui_show_text(0);
+ headless = 1;
+ break;
case 'c': wipe_cache = 1; break;
case 't': ui_show_text(1); break;
case 'l': sideload = 1; break;
@@ -941,7 +948,8 @@ main(int argc, char **argv) {
if (status != INSTALL_SUCCESS) ui_print("Cache wipe failed.\n");
} else if (sideload) {
signature_check_enabled = 0;
- ui_set_show_text(1);
+ if (!headless)
+ ui_set_show_text(1);
if (0 == apply_from_adb()) {
status = INSTALL_SUCCESS;
ui_set_show_text(0);