diff options
Diffstat (limited to 'recovery.cpp')
-rw-r--r-- | recovery.cpp | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/recovery.cpp b/recovery.cpp index 5213301c9..0fdc31cb4 100644 --- a/recovery.cpp +++ b/recovery.cpp @@ -68,6 +68,7 @@ #include "roots.h" #include "rotate_logs.h" #include "screen_ui.h" +#include "stub_ui.h" #include "ui.h" static const struct option OPTIONS[] = { @@ -169,21 +170,7 @@ struct selabel_handle* sehandle; * -- after this, rebooting will (try to) restart the main system -- * 7. ** if install failed ** * 7a. prompt_and_wait() shows an error icon and waits for the user - * 7b; the user reboots (pulling the battery, etc) into the main system - * 8. main() calls maybe_install_firmware_update() - * ** if the update contained radio/hboot firmware **: - * 8a. m_i_f_u() writes BCB with "boot-recovery" and "--wipe_cache" - * -- after this, rebooting will reformat cache & restart main system -- - * 8b. m_i_f_u() writes firmware image into raw cache partition - * 8c. m_i_f_u() writes BCB with "update-radio/hboot" and "--wipe_cache" - * -- after this, rebooting will attempt to reinstall firmware -- - * 8d. bootloader tries to flash firmware - * 8e. bootloader writes BCB with "boot-recovery" (keeping "--wipe_cache") - * -- after this, rebooting will reformat cache & restart main system -- - * 8f. erase_volume() reformats /cache - * 8g. finish_recovery() erases BCB - * -- after this, rebooting will (try to) restart the main system -- - * 9. main() calls reboot() to boot main system + * 7b. the user reboots (pulling the battery, etc) into the main system */ // open a given path, mounting partitions as necessary @@ -1485,8 +1472,11 @@ int main(int argc, char **argv) { Device* device = make_device(); ui = device->GetUI(); + if (!ui->Init()) { + printf("Failed to initialize UI, use stub UI instead."); + ui = new StubRecoveryUI(); + } ui->SetLocale(locale.c_str()); - ui->Init(); // Set background string to "installing security update" for security update, // otherwise set it to "installing system update". ui->SetSystemUpdateText(security_update); |