summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Mayer <fmayer@google.com>2022-06-23 22:36:21 +0200
committerFlorian Mayer <fmayer@google.com>2022-06-23 22:39:22 +0200
commit21d50b280fb63c5b73366a25bb74e87dd6ff08ab (patch)
treeebdeb8f7685444a6212a93933eee0de5147eb871
parentMerge "Add MISC_MEMTAG_MODE_MEMTAG_OFF." (diff)
downloadandroid_bootable_recovery-21d50b280fb63c5b73366a25bb74e87dd6ff08ab.tar
android_bootable_recovery-21d50b280fb63c5b73366a25bb74e87dd6ff08ab.tar.gz
android_bootable_recovery-21d50b280fb63c5b73366a25bb74e87dd6ff08ab.tar.bz2
android_bootable_recovery-21d50b280fb63c5b73366a25bb74e87dd6ff08ab.tar.lz
android_bootable_recovery-21d50b280fb63c5b73366a25bb74e87dd6ff08ab.tar.xz
android_bootable_recovery-21d50b280fb63c5b73366a25bb74e87dd6ff08ab.tar.zst
android_bootable_recovery-21d50b280fb63c5b73366a25bb74e87dd6ff08ab.zip
-rw-r--r--install/wipe_data.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/install/wipe_data.cpp b/install/wipe_data.cpp
index 024c1e1d5..c65e6f488 100644
--- a/install/wipe_data.cpp
+++ b/install/wipe_data.cpp
@@ -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();
}