Allow entering rescue mode via recovery UI.
Only enabled on debuggable builds.
Bug: 128415917
Test: Sideload package on taimen.
Test: Choose "Enter rescue" from recovery UI.
Change-Id: I913dbdbcffd3179e6fa72ca862f74ca8f1364b02
Merged-In: I913dbdbcffd3179e6fa72ca862f74ca8f1364b02
(cherry picked from commit c6dc325e88a25201aa3856e6532c3ed14203a376)
diff --git a/recovery_main.cpp b/recovery_main.cpp
index 5f3ab76..38e1db7 100644
--- a/recovery_main.cpp
+++ b/recovery_main.cpp
@@ -423,6 +423,10 @@
device->RemoveMenuItemForAction(Device::ENTER_FASTBOOT);
}
+ if (!is_ro_debuggable()) {
+ device->RemoveMenuItemForAction(Device::ENTER_RESCUE);
+ }
+
ui->SetBackground(RecoveryUI::NONE);
if (show_text) ui->ShowText(true);