aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKelvin Zhang <zhangkelvin@google.com>2024-04-04 17:44:59 -0700
committerKelvin Zhang <zhangkelvin@google.com>2024-04-05 09:28:58 -0700
commitc031e9d3d1c05896f2792eb0b749ab995f45fa35 (patch)
tree70df052cb5e2fb37258b092756319b9e740be376
parente366fe9f01a91d0a86f892ef544c85672627813e (diff)
downloadrecovery-c031e9d3d1c05896f2792eb0b749ab995f45fa35.tar.gz
Fix sticky rescue party boot
When entering recovery via rescue party, recovery does not call FinishRecovery() to reset BCB. This causes the rescue party command to stick, and device keeps rebooting into rescue party mode after entering bootloader mode and reboot. Test: enter rescue party, reboot bootloader, fastboot reboot Bug: 332621855 Change-Id: I958a77ccb2433d76aecb44f8c6f8fedebe08bbe0
-rw-r--r--recovery.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/recovery.cpp b/recovery.cpp
index e7a33a9e..fbfe6468 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -176,6 +176,11 @@ static bool ask_to_wipe_data(Device* device) {
}
static InstallResult prompt_and_wipe_data(Device* device) {
+ // Reset to normal system boot so recovery won't cycle indefinitely.
+ std::string err;
+ if (!clear_bootloader_message(&err)) {
+ LOG(ERROR) << "Failed to clear BCB message: " << err;
+ }
// Use a single string and let ScreenRecoveryUI handles the wrapping.
std::vector<std::string> wipe_data_menu_headers{
"Can't load Android system. Your data may be corrupt. "