summaryrefslogtreecommitdiffstats
path: root/install/wipe_device.cpp
diff options
context:
space:
mode:
authorKelvin Zhang <zhangkelvin@google.com>2023-03-14 23:02:53 +0100
committerKelvin Zhang <zhangkelvin@google.com>2023-03-15 01:10:42 +0100
commit170ad599540dfeee252ebf53cbedd610c2d22a5f (patch)
tree0092ae4e9b37ebea1fbf279af87434887bbfd875 /install/wipe_device.cpp
parentMerge "Require serialno field for brick OTA package on release-key devices" (diff)
downloadandroid_bootable_recovery-170ad599540dfeee252ebf53cbedd610c2d22a5f.tar
android_bootable_recovery-170ad599540dfeee252ebf53cbedd610c2d22a5f.tar.gz
android_bootable_recovery-170ad599540dfeee252ebf53cbedd610c2d22a5f.tar.bz2
android_bootable_recovery-170ad599540dfeee252ebf53cbedd610c2d22a5f.tar.lz
android_bootable_recovery-170ad599540dfeee252ebf53cbedd610c2d22a5f.tar.xz
android_bootable_recovery-170ad599540dfeee252ebf53cbedd610c2d22a5f.tar.zst
android_bootable_recovery-170ad599540dfeee252ebf53cbedd610c2d22a5f.zip
Diffstat (limited to '')
-rw-r--r--install/wipe_device.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/install/wipe_device.cpp b/install/wipe_device.cpp
index 0a525fa9b..2656580fe 100644
--- a/install/wipe_device.cpp
+++ b/install/wipe_device.cpp
@@ -182,13 +182,17 @@ bool WipeAbDevice(Device* device, size_t wipe_package_size) {
LOG(ERROR) << "Failed to open wipe package";
return false;
}
+ return WipeAbDevice(device, wipe_package.get());
+}
- if (!CheckWipePackage(wipe_package.get(), ui)) {
+bool WipeAbDevice(Device* device, Package* wipe_package) {
+ auto ui = device->GetUI();
+ if (!CheckWipePackage(wipe_package, ui)) {
LOG(ERROR) << "Failed to verify wipe package";
return false;
}
- auto partition_list = GetWipePartitionList(wipe_package.get());
+ auto partition_list = GetWipePartitionList(wipe_package);
if (partition_list.empty()) {
LOG(ERROR) << "Empty wipe ab partition list";
return false;