rk3566 11.0 开机时长按下升级键, 恢复出厂设置

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)
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值