From 9dd073ebfa02e4efd4f4a6210148c456227f2eab Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Wed, 2 Mar 2022 14:18:27 +0100 Subject: [PATCH] fastboot: Fallback to "raw" partition type if fastboot hal isn't present Fastboot format fails to wipe any partition that doesn't at least return "raw" partition type. Also both android.hardware.fastboot@1.0-impl.pixel and android.hardware.fastboot@1.1-impl-mock return FileSystemType::RAW so I assume this is fine. Change-Id: I5707bddb1ba32edb6359858853d7b1afbf138b9f --- fastboot/device/variables.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fastboot/device/variables.cpp b/fastboot/device/variables.cpp index 76e988951..0cf4699aa 100644 --- a/fastboot/device/variables.cpp +++ b/fastboot/device/variables.cpp @@ -332,8 +332,8 @@ bool GetPartitionType(FastbootDevice* device, const std::vector& ar auto fastboot_hal = device->fastboot_hal(); if (!fastboot_hal) { - *message = "Fastboot HAL not found"; - return false; + *message = "raw"; + return true; } FileSystemType type;