Loading fastboot/constants.h +1 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,7 @@ #define FB_VAR_SLOT_UNBOOTABLE "slot-unbootable" #define FB_VAR_IS_LOGICAL "is-logical" #define FB_VAR_IS_USERSPACE "is-userspace" #define FB_VAR_IS_FORCE_DEBUGGABLE "is-force-debuggable" #define FB_VAR_HW_REVISION "hw-revision" #define FB_VAR_VARIANT "variant" #define FB_VAR_OFF_MODE_CHARGE_STATE "off-mode-charge" Loading fastboot/device/commands.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -131,6 +131,7 @@ const std::unordered_map<std::string, VariableHandlers> kVariableMap = { {FB_VAR_PARTITION_TYPE, {GetPartitionType, GetAllPartitionArgsWithSlot}}, {FB_VAR_IS_LOGICAL, {GetPartitionIsLogical, GetAllPartitionArgsWithSlot}}, {FB_VAR_IS_USERSPACE, {GetIsUserspace, nullptr}}, {FB_VAR_IS_FORCE_DEBUGGABLE, {GetIsForceDebuggable, nullptr}}, {FB_VAR_OFF_MODE_CHARGE_STATE, {GetOffModeChargeState, nullptr}}, {FB_VAR_BATTERY_VOLTAGE, {GetBatteryVoltage, nullptr}}, {FB_VAR_BATTERY_SOC_OK, {GetBatterySoCOk, nullptr}}, Loading fastboot/device/variables.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -379,6 +379,12 @@ bool GetIsUserspace(FastbootDevice* /* device */, const std::vector<std::string> return true; } bool GetIsForceDebuggable(FastbootDevice* /* device */, const std::vector<std::string>& /* args */, std::string* message) { *message = android::base::GetBoolProperty("ro.force.debuggable", false) ? "yes" : "no"; return true; } std::vector<std::vector<std::string>> GetAllPartitionArgsWithSlot(FastbootDevice* device) { std::vector<std::vector<std::string>> args; auto partitions = ListPartitions(device); Loading fastboot/device/variables.h +2 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,8 @@ bool GetPartitionIsLogical(FastbootDevice* device, const std::vector<std::string std::string* message); bool GetIsUserspace(FastbootDevice* device, const std::vector<std::string>& args, std::string* message); bool GetIsForceDebuggable(FastbootDevice* device, const std::vector<std::string>& args, std::string* message); bool GetHardwareRevision(FastbootDevice* device, const std::vector<std::string>& args, std::string* message); bool GetVariant(FastbootDevice* device, const std::vector<std::string>& args, std::string* message); Loading Loading
fastboot/constants.h +1 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,7 @@ #define FB_VAR_SLOT_UNBOOTABLE "slot-unbootable" #define FB_VAR_IS_LOGICAL "is-logical" #define FB_VAR_IS_USERSPACE "is-userspace" #define FB_VAR_IS_FORCE_DEBUGGABLE "is-force-debuggable" #define FB_VAR_HW_REVISION "hw-revision" #define FB_VAR_VARIANT "variant" #define FB_VAR_OFF_MODE_CHARGE_STATE "off-mode-charge" Loading
fastboot/device/commands.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -131,6 +131,7 @@ const std::unordered_map<std::string, VariableHandlers> kVariableMap = { {FB_VAR_PARTITION_TYPE, {GetPartitionType, GetAllPartitionArgsWithSlot}}, {FB_VAR_IS_LOGICAL, {GetPartitionIsLogical, GetAllPartitionArgsWithSlot}}, {FB_VAR_IS_USERSPACE, {GetIsUserspace, nullptr}}, {FB_VAR_IS_FORCE_DEBUGGABLE, {GetIsForceDebuggable, nullptr}}, {FB_VAR_OFF_MODE_CHARGE_STATE, {GetOffModeChargeState, nullptr}}, {FB_VAR_BATTERY_VOLTAGE, {GetBatteryVoltage, nullptr}}, {FB_VAR_BATTERY_SOC_OK, {GetBatterySoCOk, nullptr}}, Loading
fastboot/device/variables.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -379,6 +379,12 @@ bool GetIsUserspace(FastbootDevice* /* device */, const std::vector<std::string> return true; } bool GetIsForceDebuggable(FastbootDevice* /* device */, const std::vector<std::string>& /* args */, std::string* message) { *message = android::base::GetBoolProperty("ro.force.debuggable", false) ? "yes" : "no"; return true; } std::vector<std::vector<std::string>> GetAllPartitionArgsWithSlot(FastbootDevice* device) { std::vector<std::vector<std::string>> args; auto partitions = ListPartitions(device); Loading
fastboot/device/variables.h +2 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,8 @@ bool GetPartitionIsLogical(FastbootDevice* device, const std::vector<std::string std::string* message); bool GetIsUserspace(FastbootDevice* device, const std::vector<std::string>& args, std::string* message); bool GetIsForceDebuggable(FastbootDevice* device, const std::vector<std::string>& args, std::string* message); bool GetHardwareRevision(FastbootDevice* device, const std::vector<std::string>& args, std::string* message); bool GetVariant(FastbootDevice* device, const std::vector<std::string>& args, std::string* message); Loading