7.1以前的代码是在u-boot下面,11.0 以后再bootable/recovery/recovery.cpp
--- a/bootable/recovery/recovery.cpp
+++ b/bootable/recovery/recovery.cpp
@@ -421,7 +421,7 @@ static Device::BuiltinAction PromptAndWait(Device* device, InstallResult status)
headers = { "WARNING: Previous installation has failed.",
" Your device may fail to boot if you reboot or power off now." };
}
-
+/*
size_t chosen_item = ui->ShowMenu(
headers, device->GetMenuItems(), 0, false,
std::bind(&Device::HandleMenuKey, device, std::placeholders::_1, std::placeholders::_2));
@@ -435,6 +435,8 @@ static Device::BuiltinAction PromptAndWait(Device* device, InstallResult status)
(chosen_item == static_cast<size_t>(RecoveryUI::KeyError::TIMED_OUT))
? Device::REBOOT
: device->InvokeMenuItem(chosen_item);
+*/
+ Device::BuiltinAction chosen_action = Device::WIPE_DATA;
switch (chosen_action) {
case Device::REBOOT_FROM_FASTBOOT: // Can not happen
@@ -466,7 +468,7 @@ static Device::BuiltinAction PromptAndWait(Device* device, InstallResult status)
break;
case Device::WIPE_DATA:
- save_current_log = true;
+/* save_current_log = true;
if (ui->IsTextVisible()) {
if (ask_to_wipe_data(device)) {
WipeData(device, false);
@@ -474,7 +476,9 @@ static Device::BuiltinAction PromptAndWait(Device* device, InstallResult status)
} else {
WipeData(device, false);
return Device::NO_ACTION;
- }
+ }*/
+ WipeData(device, false);
+ return Device::NO_ACTION;
break;
case Device::WIPE_CACHE: {
(END)