summaryrefslogtreecommitdiffstats
path: root/twrp.cpp
diff options
context:
space:
mode:
authorGabriele M <moto.falcon.git@gmail.com>2018-01-02 17:47:30 +0100
committerDees Troy <dees_troy@teamw.in>2018-05-25 18:13:47 +0200
commit72638b6437822300fefd77569d98fbad3dad5c28 (patch)
tree86bd5ceed235823b5a23c61824884a92ddad7780 /twrp.cpp
parentminuitwrp: drm: wait for last page flip to complete (diff)
downloadandroid_bootable_recovery-72638b6437822300fefd77569d98fbad3dad5c28.tar
android_bootable_recovery-72638b6437822300fefd77569d98fbad3dad5c28.tar.gz
android_bootable_recovery-72638b6437822300fefd77569d98fbad3dad5c28.tar.bz2
android_bootable_recovery-72638b6437822300fefd77569d98fbad3dad5c28.tar.lz
android_bootable_recovery-72638b6437822300fefd77569d98fbad3dad5c28.tar.xz
android_bootable_recovery-72638b6437822300fefd77569d98fbad3dad5c28.tar.zst
android_bootable_recovery-72638b6437822300fefd77569d98fbad3dad5c28.zip
Diffstat (limited to '')
-rw-r--r--twrp.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/twrp.cpp b/twrp.cpp
index f72d691e8..c46d6555d 100644
--- a/twrp.cpp
+++ b/twrp.cpp
@@ -169,6 +169,7 @@ int main(int argc, char **argv) {
PartitionManager.Mount_By_Path("/cache", false);
bool Shutdown = false;
+ bool SkipDecryption = false;
string Send_Intent = "";
{
TWPartition* misc = PartitionManager.Find_Partition_By_Path("/misc");
@@ -203,6 +204,9 @@ int main(int argc, char **argv) {
string ORSCommand = "install ";
ORSCommand.append(ptr);
+ // If we have a map of blocks we don't need to mount data.
+ SkipDecryption = *ptr == '@';
+
if (!OpenRecoveryScript::Insert_ORS_Command(ORSCommand))
break;
} else
@@ -271,12 +275,16 @@ int main(int argc, char **argv) {
TWFunc::Update_Log_File();
// Offer to decrypt if the device is encrypted
if (DataManager::GetIntValue(TW_IS_ENCRYPTED) != 0) {
- LOGINFO("Is encrypted, do decrypt page first\n");
- if (gui_startPage("decrypt", 1, 1) != 0) {
- LOGERR("Failed to start decrypt GUI page.\n");
+ if (SkipDecryption) {
+ LOGINFO("Skipping decryption\n");
} else {
- // Check for and load custom theme if present
- gui_loadCustomResources();
+ LOGINFO("Is encrypted, do decrypt page first\n");
+ if (gui_startPage("decrypt", 1, 1) != 0) {
+ LOGERR("Failed to start decrypt GUI page.\n");
+ } else {
+ // Check for and load custom theme if present
+ gui_loadCustomResources();
+ }
}
} else if (datamedia) {
if (tw_get_default_metadata(DataManager::GetSettingsStoragePath().c_str()) != 0) {