summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Mayer <fmayer@google.com>2022-06-28 22:43:47 +0200
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-06-28 22:43:47 +0200
commitc572aa62e07d96d601e2f3e4099e34851f8e0015 (patch)
tree5bd87791417bc87ade0018c4a58f8a3d3e81bcf0
parent[automerger skipped] Import translations. DO NOT MERGE ANYWHERE am: 8f7da713e4 -s ours am: c5673a878e -s ours am: aabefe1c52 -s ours am: 4e8390402e -s ours (diff)
parentMerge "[MTE] Reset memtag message on factory reset." am: a2a93106b7 am: 1671d67b94 am: a5b5ca9fd1 am: e4fcd34c2c (diff)
downloadandroid_bootable_recovery-c572aa62e07d96d601e2f3e4099e34851f8e0015.tar
android_bootable_recovery-c572aa62e07d96d601e2f3e4099e34851f8e0015.tar.gz
android_bootable_recovery-c572aa62e07d96d601e2f3e4099e34851f8e0015.tar.bz2
android_bootable_recovery-c572aa62e07d96d601e2f3e4099e34851f8e0015.tar.lz
android_bootable_recovery-c572aa62e07d96d601e2f3e4099e34851f8e0015.tar.xz
android_bootable_recovery-c572aa62e07d96d601e2f3e4099e34851f8e0015.tar.zst
android_bootable_recovery-c572aa62e07d96d601e2f3e4099e34851f8e0015.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();
}