From 687bc12ccfbda26ad134b27d09d1d70a2b8705a6 Mon Sep 17 00:00:00 2001 From: Doug Zongker Date: Wed, 20 Jan 2010 16:34:10 -0800 Subject: save the recovery log from before HTC firmware updates When doing a firmware (radio or hboot) update on HTC devices, save the recovery log in block 1 of the cache partition, before the firmware image and the UI bitmaps. When we boot back into recovery after the firmware update to reformat the cache partition, copy that log out of cache before reformatting it and dump it into the current invocation's log. The practical upshot of all this is that we can see the log output from radio and hboot updates. Change-Id: Ie0e89566754c88f4bed6a90d8a0aa04047b01a27 --- recovery.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'recovery.c') diff --git a/recovery.c b/recovery.c index 58c84ef2f..1a885602d 100644 --- a/recovery.c +++ b/recovery.c @@ -46,6 +46,7 @@ static const struct option OPTIONS[] = { { "wipe_cache", no_argument, NULL, 'c' }, // TODO{oam}: implement improved command line passing key, egnot to review. { "set_encrypted_filesystem", required_argument, NULL, 'e' }, + { "recover_log", no_argument, NULL, 'g' }, { NULL, 0, NULL, 0 }, }; @@ -491,6 +492,7 @@ main(int argc, char **argv) { case 'w': wipe_data = wipe_cache = 1; break; case 'c': wipe_cache = 1; break; case 'e': efs_mode = optarg; toggle_efs = 1; break; + case 'g': recover_firmware_update_log(); break; case '?': LOGE("Invalid command argument\n"); continue; @@ -562,7 +564,7 @@ main(int argc, char **argv) { if (status != INSTALL_SUCCESS || ui_text_visible()) prompt_and_wait(); // If there is a radio image pending, reboot now to install it. - maybe_install_firmware_update(send_intent); + maybe_install_firmware_update(send_intent, TEMPORARY_LOG_FILE); // Otherwise, get ready to boot the main system... finish_recovery(send_intent); -- cgit v1.2.3