From 1066d2c31990e3c2eacedbe0a70013da774fcf3e Mon Sep 17 00:00:00 2001 From: Doug Zongker <> Date: Wed, 1 Apr 2009 13:57:40 -0700 Subject: AI 144070: Add an option to wipe cache (only) to the recovery menu. Automated import of CL 144070 --- recovery.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'recovery.c') diff --git a/recovery.c b/recovery.c index 221ee2975..a0bae97ca 100644 --- a/recovery.c +++ b/recovery.c @@ -302,9 +302,11 @@ prompt_and_wait() #define ITEM_REBOOT 0 #define ITEM_APPLY_SDCARD 1 #define ITEM_WIPE_DATA 2 +#define ITEM_WIPE_CACHE 3 char* items[] = { "reboot system now [Home+Back]", "apply sdcard:update.zip [Alt+S]", "wipe data/factory reset [Alt+W]", + "wipe cache partition", NULL }; ui_start_menu(headers, items); @@ -357,6 +359,13 @@ prompt_and_wait() if (!ui_text_visible()) return; break; + case ITEM_WIPE_CACHE: + ui_print("\n-- Wiping cache...\n"); + erase_root("CACHE:"); + ui_print("Cache wipe complete.\n"); + if (!ui_text_visible()) return; + break; + case ITEM_APPLY_SDCARD: ui_print("\n-- Install from sdcard...\n"); int status = install_package(SDCARD_PACKAGE_FILE); -- cgit v1.2.3 From 07e1dca7068284c4f3013550335029eb72b39b82 Mon Sep 17 00:00:00 2001 From: Doug Zongker Date: Thu, 28 May 2009 19:02:45 -0700 Subject: don't say "install complete" when it really isn't Change the recovery UI so that when there is a hboot or radio update pending (which the user most do a home+back reboot to actually install), the UI tells them so, instead of saying "Install from sdcard complete." --- recovery.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'recovery.c') diff --git a/recovery.c b/recovery.c index a0bae97ca..e329db93d 100644 --- a/recovery.c +++ b/recovery.c @@ -375,7 +375,12 @@ prompt_and_wait() } else if (!ui_text_visible()) { return; // reboot if logs aren't visible } else { - ui_print("Install from sdcard complete.\n"); + if (firmware_update_pending()) { + ui_print("\nReboot via home+back or menu\n" + "to complete installation.\n"); + } else { + ui_print("\nInstall from sdcard complete.\n"); + } } break; } -- cgit v1.2.3 From f28c916e73ee9f643c67c70d059c70381d774cb0 Mon Sep 17 00:00:00 2001 From: Doug Zongker Date: Tue, 2 Jun 2009 15:30:11 -0700 Subject: remove unused permissions scheme from amend Amend (aka the recovery command language) had a half-implemented scheme of limiting which commands OTA packages were allowed to execute. It's not clear what this was ever supposed to be good for. Remove it. --- recovery.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'recovery.c') diff --git a/recovery.c b/recovery.c index e329db93d..188d4de69 100644 --- a/recovery.c +++ b/recovery.c @@ -265,7 +265,6 @@ test_amend() { extern int test_symtab(void); extern int test_cmd_fn(void); - extern int test_permissions(void); int ret; LOGD("Testing symtab...\n"); ret = test_symtab(); @@ -273,9 +272,6 @@ test_amend() LOGD("Testing cmd_fn...\n"); ret = test_cmd_fn(); LOGD(" returned %d\n", ret); - LOGD("Testing permissions...\n"); - ret = test_permissions(); - LOGD(" returned %d\n", ret); } #endif // TEST_AMEND -- cgit v1.2.3 From fb2e3af3f915c0e3f2b4b027ef26777267ad46dc Mon Sep 17 00:00:00 2001 From: Doug Zongker Date: Wed, 17 Jun 2009 17:29:40 -0700 Subject: let the "firmware" command take the file straight from the package To do a firmware-install-on-reboot, the update binary tells recovery what file to install before rebooting. Let this file be specified as "PACKAGE:" to indicate taking the file out of the OTA package, avoiding an extra copy to /tmp. Bump the API version number to reflect this change. --- recovery.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'recovery.c') diff --git a/recovery.c b/recovery.c index 188d4de69..5ccd38f2c 100644 --- a/recovery.c +++ b/recovery.c @@ -287,7 +287,8 @@ erase_root(const char *root) static void prompt_and_wait() { - char* headers[] = { "Android system recovery utility", + char* headers[] = { "Android system recovery <" + EXPAND(RECOVERY_API_VERSION) ">", "", "Use trackball to highlight;", "click to select.", -- cgit v1.2.3