From 376b70423d3e0ffdb3d032231a7e41d51b0ff746 Mon Sep 17 00:00:00 2001 From: Daniel Zheng Date: Wed, 9 Aug 2023 10:52:38 -0700 Subject: [PATCH] Adding force_flash functionality aosp/2452605 might've accidentally omitted force flash functionality from fastboot. Some users need to flash dynamic partitions from bootloader, so we are readding this feature back into fastboot Test: adb reboot bootloader, fastboot flash system --force Change-Id: I37a51ebbe38b27ed428c38068d30c0febd7db09c --- fastboot/task.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastboot/task.cpp b/fastboot/task.cpp index bf64f0e1e..146064cc5 100644 --- a/fastboot/task.cpp +++ b/fastboot/task.cpp @@ -32,7 +32,7 @@ FlashTask::FlashTask(const std::string& slot, const std::string& pname, const st void FlashTask::Run() { auto flash = [&](const std::string& partition) { - if (should_flash_in_userspace(partition) && !is_userspace_fastboot()) { + if (should_flash_in_userspace(partition) && !is_userspace_fastboot() && !fp_->force_flash) { die("The partition you are trying to flash is dynamic, and " "should be flashed via fastbootd. Please run:\n" "\n"