Merge "[MTE] Reset memtag message on factory reset."
This commit is contained in:
commit
a2a93106b7
1 changed files with 7 additions and 0 deletions
|
@ -25,6 +25,7 @@
|
|||
#include <android-base/logging.h>
|
||||
#include <android-base/stringprintf.h>
|
||||
|
||||
#include "bootloader_message/bootloader_message.h"
|
||||
#include "install/snapshot_utils.h"
|
||||
#include "otautil/dirutil.h"
|
||||
#include "recovery_ui/ui.h"
|
||||
|
@ -100,6 +101,12 @@ bool WipeData(Device* device) {
|
|||
success &= EraseVolume(METADATA_ROOT, ui);
|
||||
}
|
||||
}
|
||||
ui->Print("Resetting memtag message...\n");
|
||||
std::string err;
|
||||
if (!WriteMiscMemtagMessage({}, &err)) {
|
||||
ui->Print("Failed to reset memtag message: %s\n", err.c_str());
|
||||
success = false;
|
||||
}
|
||||
if (success) {
|
||||
success &= device->PostWipeData();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue