From 2708a953d21f447e7377b0e1ea9dd69f703ad56e Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Fri, 5 May 2017 16:29:19 -0700 Subject: [PATCH] Give slightly less useless versions to adb and fastboot. This will let us see (a) whether the user has a legit build or something they built themselves and (b) what Android release it corresponds to. This isn't as useful as showing what Platform Tools release we correspond to, but I'm planning on doing that as a separate line. Bug: N/A Test: adb --version ; fastboot --version Change-Id: Idca489295e3c6f8571146f95822c08808e36b382 --- adb/Android.mk | 4 +--- fastboot/Android.mk | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/adb/Android.mk b/adb/Android.mk index 819bad10b..efdff5d34 100644 --- a/adb/Android.mk +++ b/adb/Android.mk @@ -8,14 +8,12 @@ LOCAL_PATH:= $(call my-dir) adb_host_sanitize := adb_target_sanitize := -adb_version := $(shell git -C $(LOCAL_PATH) rev-parse --short=12 HEAD 2>/dev/null)-android - ADB_COMMON_CFLAGS := \ -Wall -Wextra -Werror \ -Wno-unused-parameter \ -Wno-missing-field-initializers \ -Wvla \ - -DADB_REVISION='"$(adb_version)"' \ + -DADB_REVISION=\"$(BUILD_NUMBER_FROM_FILE)\" \ ADB_COMMON_posix_CFLAGS := \ -Wexit-time-destructors \ diff --git a/fastboot/Android.mk b/fastboot/Android.mk index 2c578a90e..e675d7d60 100644 --- a/fastboot/Android.mk +++ b/fastboot/Android.mk @@ -14,8 +14,6 @@ LOCAL_PATH:= $(call my-dir) -fastboot_version := $(shell git -C $(LOCAL_PATH) rev-parse --short=12 HEAD 2>/dev/null)-android - include $(CLEAR_VARS) LOCAL_C_INCLUDES := \ @@ -39,7 +37,7 @@ LOCAL_MODULE_TAGS := debug LOCAL_MODULE_HOST_OS := darwin linux windows LOCAL_CFLAGS += -Wall -Wextra -Werror -Wunreachable-code -LOCAL_CFLAGS += -DFASTBOOT_REVISION='"$(fastboot_version)"' +LOCAL_CFLAGS += -DFASTBOOT_REVISION=\"$(BUILD_NUMBER_FROM_FILE)\" LOCAL_SRC_FILES_linux := usb_linux.cpp LOCAL_STATIC_LIBRARIES_linux := libselinux