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