summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Mayer <fmayer@google.com>2022-06-28 20:21:12 +0200
committerGerrit Code Review <noreply-gerritcodereview@google.com>2022-06-28 20:21:12 +0200
commita2a93106b7ee21a1c7c6e7f1087be988510b4bec (patch)
treeebdeb8f7685444a6212a93933eee0de5147eb871
parentMerge "Add MISC_MEMTAG_MODE_MEMTAG_OFF." (diff)
parent[MTE] Reset memtag message on factory reset. (diff)
downloadandroid_bootable_recovery-a2a93106b7ee21a1c7c6e7f1087be988510b4bec.tar
android_bootable_recovery-a2a93106b7ee21a1c7c6e7f1087be988510b4bec.tar.gz
android_bootable_recovery-a2a93106b7ee21a1c7c6e7f1087be988510b4bec.tar.bz2
android_bootable_recovery-a2a93106b7ee21a1c7c6e7f1087be988510b4bec.tar.lz
android_bootable_recovery-a2a93106b7ee21a1c7c6e7f1087be988510b4bec.tar.xz
android_bootable_recovery-a2a93106b7ee21a1c7c6e7f1087be988510b4bec.tar.zst
android_bootable_recovery-a2a93106b7ee21a1c7c6e7f1087be988510b4bec.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();
}