From fde69fbd8ab174dbc9f828785c435a7d52311386 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Thu, 10 Mar 2022 22:13:39 +0000 Subject: Remove support for converting from FDE to FBE Devices that launched with Android 10 or later require FBE (File Based Encryption) from the beginning, so there's no need to support converting to FBE after the fact anymore. This was only ever a developer option, so it probably wasn't used much. And in any case, it's not used anymore, as isConvertibleToFBE() is hard-coded to return false. Besides the fact that FBE has been required for several releases now, this functionality was only ever available on devices that use FDE (Full Disk Encryption), but FDE support has been removed from Android. Therefore, remove this unused code. Bug: 208476087 Change-Id: I1f56c8e05fb3fba09aab4bf5f8609b0f552b8999 --- recovery.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'recovery.cpp') diff --git a/recovery.cpp b/recovery.cpp index 0c977c361..4d3901959 100644 --- a/recovery.cpp +++ b/recovery.cpp @@ -207,8 +207,7 @@ static InstallResult prompt_and_wipe_data(Device* device) { if (ask_to_wipe_data(device)) { CHECK(device->GetReason().has_value()); - bool convert_fbe = device->GetReason().value() == "convert_fbe"; - if (WipeData(device, convert_fbe)) { + if (WipeData(device)) { return INSTALL_SUCCESS; } else { return INSTALL_ERROR; @@ -437,10 +436,10 @@ static Device::BuiltinAction PromptAndWait(Device* device, InstallResult status) save_current_log = true; if (ui->IsTextVisible()) { if (ask_to_wipe_data(device)) { - WipeData(device, false); + WipeData(device); } } else { - WipeData(device, false); + WipeData(device); return Device::NO_ACTION; } break; @@ -794,8 +793,7 @@ Device::BuiltinAction start_recovery(Device* device, const std::vectorGetReason().has_value()); - bool convert_fbe = device->GetReason().value() == "convert_fbe"; - if (!WipeData(device, convert_fbe)) { + if (!WipeData(device)) { status = INSTALL_ERROR; } } else if (should_prompt_and_wipe_data) { -- cgit v1.2.3