summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--install/install.cpp4
-rw-r--r--install/wipe_data.cpp7
2 files changed, 10 insertions, 1 deletions
diff --git a/install/install.cpp b/install/install.cpp
index 83f3cad6b..044856b6b 100644
--- a/install/install.cpp
+++ b/install/install.cpp
@@ -551,7 +551,9 @@ static InstallResult TryUpdateBinary(Package* package, bool* wipe_cache,
} else {
LOG(FATAL) << "Invalid status code " << status;
}
- PerformPowerwashIfRequired(zip, device);
+ if (package_is_ab) {
+ PerformPowerwashIfRequired(zip, device);
+ }
return INSTALL_SUCCESS;
}
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();
}