summaryrefslogtreecommitdiffstats
path: root/fastboot/device/variables.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fastboot/device/variables.cpp')
-rw-r--r--fastboot/device/variables.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/fastboot/device/variables.cpp b/fastboot/device/variables.cpp
index cbd2856dc..601af3446 100644
--- a/fastboot/device/variables.cpp
+++ b/fastboot/device/variables.cpp
@@ -24,7 +24,9 @@
#include <android-base/stringprintf.h>
#include <android-base/strings.h>
#include <ext4_utils/ext4_utils.h>
+#include <fs_mgr.h>
#include <healthhalutils/HealthHalUtils.h>
+#include <liblp/liblp.h>
#include "fastboot_device.h"
#include "flashing.h"
@@ -35,6 +37,7 @@ using ::android::hardware::boot::V1_0::Slot;
using ::android::hardware::fastboot::V1_0::FileSystemType;
using ::android::hardware::fastboot::V1_0::Result;
using ::android::hardware::fastboot::V1_0::Status;
+using namespace android::fs_mgr;
constexpr char kFastbootProtocolVersion[] = "0.4";
@@ -417,3 +420,10 @@ bool GetHardwareRevision(FastbootDevice* /* device */, const std::vector<std::st
*message = android::base::GetProperty("ro.revision", "");
return true;
}
+
+bool GetSuperPartitionName(FastbootDevice* device, const std::vector<std::string>& /* args */,
+ std::string* message) {
+ uint32_t slot_number = SlotNumberForSlotSuffix(device->GetCurrentSlot());
+ *message = fs_mgr_get_super_partition_name(slot_number);
+ return true;
+}