summaryrefslogtreecommitdiff
path: root/fastboot/fastboot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fastboot/fastboot.cpp')
-rw-r--r--fastboot/fastboot.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp
index cdcd0363a..48f443c5a 100644
--- a/fastboot/fastboot.cpp
+++ b/fastboot/fastboot.cpp
@@ -1786,7 +1786,6 @@ void FlashAllTool::Flash() {
}
DetermineSlot();
- CollectImages();
CancelSnapshotIfNeeded();
@@ -1950,7 +1949,6 @@ static void do_update(const char* filename, FlashingPlan* fp) {
}
ZipImageSource zp = ZipImageSource(zip);
fp->source = &zp;
- fp->wants_wipe = false;
FlashAllTool tool(fp);
tool.Flash();
@@ -2603,10 +2601,13 @@ int FastBootTool::Main(int argc, char* argv[]) {
if (fp->force_flash) {
CancelSnapshotIfNeeded();
}
+ std::vector<std::unique_ptr<Task>> wipe_tasks;
std::vector<std::string> partitions = {"userdata", "cache", "metadata"};
for (const auto& partition : partitions) {
- tasks.emplace_back(std::make_unique<WipeTask>(fp.get(), partition));
+ wipe_tasks.emplace_back(std::make_unique<WipeTask>(fp.get(), partition));
}
+ tasks.insert(tasks.begin(), std::make_move_iterator(wipe_tasks.begin()),
+ std::make_move_iterator(wipe_tasks.end()));
}
if (fp->wants_set_active) {
fb->SetActive(next_active);