From c6947be5f198515bfc3c950764c7ef3ae26c625f Mon Sep 17 00:00:00 2001 From: Alessandro Astone Date: Wed, 26 Feb 2020 17:25:54 +0100 Subject: [PATCH] recovery: allow opting-in to fastbootd Change-Id: Id8228c0782f4520779d3a2116ea11015b64c13c3 --- recovery_main.cpp | 6 ++++-- recovery_ui/screen_ui.cpp | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/recovery_main.cpp b/recovery_main.cpp index 7f8a8234..6cca983c 100644 --- a/recovery_main.cpp +++ b/recovery_main.cpp @@ -409,7 +409,8 @@ int main(int argc, char** argv) { } else if (option == "reason") { reason = optarg; } else if (option == "fastboot" && - android::base::GetBoolProperty("ro.boot.dynamic_partitions", false)) { + (android::base::GetBoolProperty("ro.boot.dynamic_partitions", false) || + android::base::GetBoolProperty("ro.fastbootd.available", false))) { fastboot = true; } break; @@ -473,7 +474,8 @@ int main(int argc, char** argv) { device->RemoveMenuItemForAction(Device::WIPE_CACHE); } - if (!android::base::GetBoolProperty("ro.boot.dynamic_partitions", false)) { + if (!android::base::GetBoolProperty("ro.boot.dynamic_partitions", false) && + !android::base::GetBoolProperty("ro.fastbootd.available", false)) { device->RemoveMenuItemForAction(Device::ENTER_FASTBOOT); } diff --git a/recovery_ui/screen_ui.cpp b/recovery_ui/screen_ui.cpp index ac613b1e..01f6dff6 100644 --- a/recovery_ui/screen_ui.cpp +++ b/recovery_ui/screen_ui.cpp @@ -950,7 +950,8 @@ bool ScreenRecoveryUI::Init(const std::string& locale) { no_command_text_ = LoadLocalizedBitmap("no_command_text"); error_text_ = LoadLocalizedBitmap("error_text"); - if (android::base::GetBoolProperty("ro.boot.dynamic_partitions", false)) { + if (android::base::GetBoolProperty("ro.boot.dynamic_partitions", false) || + android::base::GetBoolProperty("ro.fastbootd.available", false)) { fastbootd_logo_ = LoadBitmap("fastbootd"); }