Loading fastboot/constants.h +1 −0 Original line number Diff line number Diff line Loading @@ -57,3 +57,4 @@ #define FB_VAR_SLOT_UNBOOTABLE "slot-unbootable" #define FB_VAR_IS_LOGICAL "is-logical" #define FB_VAR_IS_USERSPACE "is-userspace" #define FB_VAR_HW_REVISION "hw-revision" fastboot/device/commands.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -89,7 +89,8 @@ bool GetVarHandler(FastbootDevice* device, const std::vector<std::string>& args) {FB_VAR_SLOT_UNBOOTABLE, {GetSlotUnbootable, nullptr}}, {FB_VAR_PARTITION_SIZE, {GetPartitionSize, GetAllPartitionArgsWithSlot}}, {FB_VAR_IS_LOGICAL, {GetPartitionIsLogical, GetAllPartitionArgsWithSlot}}, {FB_VAR_IS_USERSPACE, {GetIsUserspace, nullptr}}}; {FB_VAR_IS_USERSPACE, {GetIsUserspace, nullptr}}, {FB_VAR_HW_REVISION, {GetHardwareRevision, nullptr}}}; if (args.size() < 2) { return device->WriteFail("Missing argument"); Loading fastboot/device/variables.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -256,3 +256,9 @@ std::vector<std::vector<std::string>> GetAllPartitionArgsNoSlot(FastbootDevice* } return args; } bool GetHardwareRevision(FastbootDevice* /* device */, const std::vector<std::string>& /* args */, std::string* message) { *message = android::base::GetProperty("ro.revision", ""); return true; } fastboot/device/variables.h +2 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,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 GetHardwareRevision(FastbootDevice* device, const std::vector<std::string>& args, std::string* message); // Helpers for getvar all. std::vector<std::vector<std::string>> GetAllPartitionArgsWithSlot(FastbootDevice* device); Loading Loading
fastboot/constants.h +1 −0 Original line number Diff line number Diff line Loading @@ -57,3 +57,4 @@ #define FB_VAR_SLOT_UNBOOTABLE "slot-unbootable" #define FB_VAR_IS_LOGICAL "is-logical" #define FB_VAR_IS_USERSPACE "is-userspace" #define FB_VAR_HW_REVISION "hw-revision"
fastboot/device/commands.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -89,7 +89,8 @@ bool GetVarHandler(FastbootDevice* device, const std::vector<std::string>& args) {FB_VAR_SLOT_UNBOOTABLE, {GetSlotUnbootable, nullptr}}, {FB_VAR_PARTITION_SIZE, {GetPartitionSize, GetAllPartitionArgsWithSlot}}, {FB_VAR_IS_LOGICAL, {GetPartitionIsLogical, GetAllPartitionArgsWithSlot}}, {FB_VAR_IS_USERSPACE, {GetIsUserspace, nullptr}}}; {FB_VAR_IS_USERSPACE, {GetIsUserspace, nullptr}}, {FB_VAR_HW_REVISION, {GetHardwareRevision, nullptr}}}; if (args.size() < 2) { return device->WriteFail("Missing argument"); Loading
fastboot/device/variables.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -256,3 +256,9 @@ std::vector<std::vector<std::string>> GetAllPartitionArgsNoSlot(FastbootDevice* } return args; } bool GetHardwareRevision(FastbootDevice* /* device */, const std::vector<std::string>& /* args */, std::string* message) { *message = android::base::GetProperty("ro.revision", ""); return true; }
fastboot/device/variables.h +2 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,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 GetHardwareRevision(FastbootDevice* device, const std::vector<std::string>& args, std::string* message); // Helpers for getvar all. std::vector<std::vector<std::string>> GetAllPartitionArgsWithSlot(FastbootDevice* device); Loading