diff options
author | Dees_Troy <dees_troy@teamw.in> | 2012-09-20 15:55:17 +0200 |
---|---|---|
committer | Dees_Troy <dees_troy@teamw.in> | 2012-09-20 16:40:20 +0200 |
commit | 812660fd1d49bec7129d4c32a8493038a48385d7 (patch) | |
tree | d6e00bfc5f286e2fca8c0db8ce2c93f083a044ec /recovery.cpp | |
parent | Fix ext storage and zip paths (diff) | |
download | android_bootable_recovery-812660fd1d49bec7129d4c32a8493038a48385d7.tar android_bootable_recovery-812660fd1d49bec7129d4c32a8493038a48385d7.tar.gz android_bootable_recovery-812660fd1d49bec7129d4c32a8493038a48385d7.tar.bz2 android_bootable_recovery-812660fd1d49bec7129d4c32a8493038a48385d7.tar.lz android_bootable_recovery-812660fd1d49bec7129d4c32a8493038a48385d7.tar.xz android_bootable_recovery-812660fd1d49bec7129d4c32a8493038a48385d7.tar.zst android_bootable_recovery-812660fd1d49bec7129d4c32a8493038a48385d7.zip |
Diffstat (limited to '')
-rw-r--r-- | recovery.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/recovery.cpp b/recovery.cpp index 2d89014c1..8cf31069e 100644 --- a/recovery.cpp +++ b/recovery.cpp @@ -56,6 +56,7 @@ extern "C" { } #include "partitions.hpp" #include "variables.h" +#include "openrecoveryscript.hpp" TWPartitionManager PartitionManager; @@ -924,8 +925,19 @@ main(int argc, char **argv) { //if (status != INSTALL_SUCCESS) ui->SetBackground(RecoveryUI::ERROR); if (status != INSTALL_SUCCESS /*|| ui->IsTextVisible()*/) { + finish_recovery(NULL); DataManager_ReadSettingsFile(); - gui_start(); + if (DataManager_GetIntValue(TW_IS_ENCRYPTED) == 0 && OpenRecoveryScript::check_for_script_file()) { + gui_console_only(); + OpenRecoveryScript::run_script_file(); + if (1 || OpenRecoveryScript::run_script_file() != 0) { + // There was an error, boot the recovery + gui_start(); + } else { + usleep(2000000); // Sleep for 2 seconds before rebooting + } + } else + gui_start(); //prompt_and_wait(device); } |