summaryrefslogtreecommitdiffstats
path: root/install/wipe_device.cpp
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-03-16 02:01:06 +0100
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-03-16 02:01:06 +0100
commitf2acbaf64f0b0276eb3605f47d3479846f2454b1 (patch)
tree0092ae4e9b37ebea1fbf279af87434887bbfd875 /install/wipe_device.cpp
parentSnap for 9715222 from 1176f62ec5f8bcc18cc6b72c2fe65245fbf56766 to udc-d1-release (diff)
parentMerge "Allow brick OTA package to be sideloaded in recovery" am: aff08259ec am: 2f5744f57e am: 2643880e5d am: 3d576c758f (diff)
downloadandroid_bootable_recovery-f2acbaf64f0b0276eb3605f47d3479846f2454b1.tar
android_bootable_recovery-f2acbaf64f0b0276eb3605f47d3479846f2454b1.tar.gz
android_bootable_recovery-f2acbaf64f0b0276eb3605f47d3479846f2454b1.tar.bz2
android_bootable_recovery-f2acbaf64f0b0276eb3605f47d3479846f2454b1.tar.lz
android_bootable_recovery-f2acbaf64f0b0276eb3605f47d3479846f2454b1.tar.xz
android_bootable_recovery-f2acbaf64f0b0276eb3605f47d3479846f2454b1.tar.zst
android_bootable_recovery-f2acbaf64f0b0276eb3605f47d3479846f2454b1.zip
Diffstat (limited to 'install/wipe_device.cpp')
-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;