Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 451e46f1 authored by Daniel Zheng's avatar Daniel Zheng
Browse files

Adding fastboot-info version to host tool

Replacing check with PLATFORM_TOOLS_VERSION with FASTBOOT_INFO_VERSION
to indicate waht version of fastboot_info.txt we currently support. This
makes mor sense since PLATFORM_TOOLS_VERSION won't be updated every time
me make a change to the host tool

Test: fastboot flashall
Bug: 194686221
Change-Id: I621b62c92ba129f402857463dae9112a0797ab07
parent 630f29e0
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -95,6 +95,8 @@ using android::base::unique_fd;
using namespace std::string_literals;
using namespace std::placeholders;

#define FASTBOOT_INFO_VERSION 1

static const char* serial = nullptr;

static bool g_long_listing = false;
@@ -1710,9 +1712,7 @@ std::vector<std::unique_ptr<Task>> ParseFastbootInfo(const FlashingPlan* fp,
            continue;
        }
        if (command.size() > 1 && command[0] == "version") {
            uint32_t platform_tools_version;
            android::base::ParseUint(PLATFORM_TOOLS_VERSION, &platform_tools_version);
            if (!CheckFastbootInfoRequirements(command, platform_tools_version)) {
            if (!CheckFastbootInfoRequirements(command, FASTBOOT_INFO_VERSION)) {
                return {};
            }
            continue;