Loading device.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,7 @@ static const char* ADVANCED_MENU_NAMES[] = { #endif #ifndef RELEASE_BUILD "Mount /system", "Wipe system partition", #endif "View recovery logs", "Run graphics test", Loading @@ -83,6 +84,7 @@ static const menu_entry ADVANCED_MENU_ENTRIES[] = { #endif #ifndef RELEASE_BUILD { ACTION_INVOKE, { .action = Device::MOUNT_SYSTEM } }, { ACTION_INVOKE, { .action = Device::WIPE_SYSTEM } }, #endif { ACTION_INVOKE, { .action = Device::VIEW_RECOVERY_LOGS } }, { ACTION_INVOKE, { .action = Device::RUN_GRAPHICS_TEST } }, Loading device.h +1 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,7 @@ class Device : public VoldWatcher { VIEW_RECOVERY_LOGS, MOUNT_SYSTEM, RUN_GRAPHICS_TEST, WIPE_SYSTEM, }; // Return the list of menu items (an array of strings, Loading recovery.cpp +18 −0 Original line number Diff line number Diff line Loading @@ -1023,6 +1023,20 @@ static bool wipe_cache(bool should_confirm, Device* device) { return success; } // Return true on success. static bool wipe_system(Device* device) { if (!yes_no(device, "Wipe system?", " THIS CAN NOT BE UNDONE!")) { return false; } modified_flash = true; ui->Print("\n-- Wiping system...\n"); bool success = erase_volume("/system"); ui->Print("System wipe %s.\n", success ? "complete" : "failed"); return success; } static void choose_recovery_file(Device* device) { if (!has_cache) { ui->Print("No /cache partition found.\n"); Loading Loading @@ -1382,6 +1396,10 @@ prompt_and_wait(Device* device, int status) { } } break; case Device::WIPE_SYSTEM: wipe_system(device); break; } if (status == Device::kRefresh) { status = 0; Loading Loading
device.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,7 @@ static const char* ADVANCED_MENU_NAMES[] = { #endif #ifndef RELEASE_BUILD "Mount /system", "Wipe system partition", #endif "View recovery logs", "Run graphics test", Loading @@ -83,6 +84,7 @@ static const menu_entry ADVANCED_MENU_ENTRIES[] = { #endif #ifndef RELEASE_BUILD { ACTION_INVOKE, { .action = Device::MOUNT_SYSTEM } }, { ACTION_INVOKE, { .action = Device::WIPE_SYSTEM } }, #endif { ACTION_INVOKE, { .action = Device::VIEW_RECOVERY_LOGS } }, { ACTION_INVOKE, { .action = Device::RUN_GRAPHICS_TEST } }, Loading
device.h +1 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,7 @@ class Device : public VoldWatcher { VIEW_RECOVERY_LOGS, MOUNT_SYSTEM, RUN_GRAPHICS_TEST, WIPE_SYSTEM, }; // Return the list of menu items (an array of strings, Loading
recovery.cpp +18 −0 Original line number Diff line number Diff line Loading @@ -1023,6 +1023,20 @@ static bool wipe_cache(bool should_confirm, Device* device) { return success; } // Return true on success. static bool wipe_system(Device* device) { if (!yes_no(device, "Wipe system?", " THIS CAN NOT BE UNDONE!")) { return false; } modified_flash = true; ui->Print("\n-- Wiping system...\n"); bool success = erase_volume("/system"); ui->Print("System wipe %s.\n", success ? "complete" : "failed"); return success; } static void choose_recovery_file(Device* device) { if (!has_cache) { ui->Print("No /cache partition found.\n"); Loading Loading @@ -1382,6 +1396,10 @@ prompt_and_wait(Device* device, int status) { } } break; case Device::WIPE_SYSTEM: wipe_system(device); break; } if (status == Device::kRefresh) { status = 0; Loading