Skip to content

Commit

Permalink
tw_crypto_pwtype: move default setting to data.cpp
Browse files Browse the repository at this point in the history
Change-Id: Id3dda3bc2c32ad286b1ec67595f482f84b5077d7
  • Loading branch information
CaptainThrowback authored and SIDDK24 committed Jan 30, 2022
1 parent 912e9f3 commit 786e176
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,7 @@ initSHRPVars(&mConst, &mData, &mPersist);
mData.SetValue(TW_IS_ENCRYPTED, "0");
mData.SetValue(TW_IS_DECRYPTED, "0");
mData.SetValue(TW_CRYPTO_PASSWORD, "0");
mData.SetValue(TW_CRYPTO_PWTYPE, "0"); // Set initial value so that recovery will not be confused when using unencrypted data or failed to decrypt data
mData.SetValue("tw_terminal_state", "0");
mData.SetValue("tw_background_thread_running", "0");
mData.SetValue(TW_RESTORE_FILE_DATE, "0");
Expand Down
1 change: 0 additions & 1 deletion partition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,6 @@ void TWPartition::Set_FBE_Status() {
bool TWPartition::Decrypt_FBE_DE() {
if (TWFunc::Path_Exists("/data/unencrypted/key/version")) {
DataManager::SetValue(TW_IS_FBE, 1);
DataManager::SetValue(TW_CRYPTO_PWTYPE, "0"); // Set initial value so that recovery will not be confused when using unencrypted data or failed to decrypt data
PartitionManager.Set_Crypto_State();
PartitionManager.Set_Crypto_Type("file");
LOGINFO("File Based Encryption is present\n");
Expand Down

0 comments on commit 786e176

Please sign in to comment.