From a48f86b88e265b5dc5653b6abd0484d6e021d0c4 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 20 Dec 2018 16:55:04 -0800 Subject: [PATCH] fastbootd: Better error message when boot_devices is missing. Bug: 121333158 Test: N/A Change-Id: Ifac7ae382d9e57864f6a3915987300eb91355293 --- fastboot/device/flashing.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fastboot/device/flashing.cpp b/fastboot/device/flashing.cpp index 963916cf9..f737405c1 100644 --- a/fastboot/device/flashing.cpp +++ b/fastboot/device/flashing.cpp @@ -143,6 +143,11 @@ bool UpdateSuper(FastbootDevice* device, const std::string& super_name, bool wip return device->WriteFail("Data is not a valid logical partition metadata image"); } + if (!FindPhysicalPartition(super_name)) { + return device->WriteFail("Cannot find " + super_name + + ", build may be missing broken or missing boot_devices"); + } + // If we are unable to read the existing metadata, then the super partition // is corrupt. In this case we reflash the whole thing using the provided // image.