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