From 7d5bd9d74e89b8e347e612552df2a2fabd6cb26f Mon Sep 17 00:00:00 2001 From: Alexandre Roux D'Anzi Date: Mon, 14 Dec 2020 10:04:17 +0100 Subject: [PATCH 1/2] display release type but keep lineage-keys --- core/Makefile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/core/Makefile b/core/Makefile index 67174dbfc2..e7697d9442 100644 --- a/core/Makefile +++ b/core/Makefile @@ -310,12 +310,16 @@ endif #BUILD_DISPLAY_KEYS is used in etc/build.prop and product build.prop to avoid override by vendor, #so ro.build.display.id will be set twice, only product build.prop will be used at the end ifndef RELEASE_TYPE - BUILD_DISPLAY_KEYS := $(BUILD_KEYS) +ifeq ($(DEFAULT_SYSTEM_DEV_CERTIFICATE),build/make/target/product/security/testkey) +BUILD_RELEASE_TYPE := test-release else - BUILD_DISPLAY_KEYS := $(RELEASE_TYPE)-keys +BUILD_RELEASE_TYPE := dev-release endif - -BUILD_VERSION_TAGS += $(BUILD_DISPLAY_KEYS) +else +BUILD_RELEASE_TYPE := $(RELEASE_TYPE)-release +endif +BUILD_VERSION_TAGS += $(BUILD_KEYS) +BUILD_VERSION_TAGS += $(BUILD_RELEASE_TYPE) BUILD_VERSION_TAGS := $(subst $(space),$(comma),$(sort $(BUILD_VERSION_TAGS))) # A human-readable string that descibes this build in detail. @@ -370,9 +374,9 @@ ifeq ($(TARGET_BUILD_VARIANT),user) # Dev. branches should have DISPLAY_BUILD_NUMBER set ifeq (true,$(DISPLAY_BUILD_NUMBER)) - BUILD_DISPLAY_ID := $(BUILD_ID).$(BUILD_NUMBER_FROM_FILE) $(BUILD_DISPLAY_KEYS) + BUILD_DISPLAY_ID := $(BUILD_ID).$(BUILD_NUMBER_FROM_FILE) $(BUILD_KEYS) $(BUILD_RELEASE_TYPE) else - BUILD_DISPLAY_ID := $(BUILD_ID) $(BUILD_DISPLAY_KEYS) + BUILD_DISPLAY_ID := $(BUILD_ID) $(BUILD_KEYS) $(BUILD_RELEASE_TYPE) endif else # Non-user builds should show detailed build information -- GitLab From f629c69df82b3fa6970da58d71acebb4f6b429e9 Mon Sep 17 00:00:00 2001 From: Alexandre Roux Date: Mon, 14 Dec 2020 17:36:41 +0000 Subject: [PATCH 2/2] display unknown-release instead of dev when using unknown key --- core/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/Makefile b/core/Makefile index e7697d9442..b2e936e090 100644 --- a/core/Makefile +++ b/core/Makefile @@ -313,7 +313,7 @@ ifndef RELEASE_TYPE ifeq ($(DEFAULT_SYSTEM_DEV_CERTIFICATE),build/make/target/product/security/testkey) BUILD_RELEASE_TYPE := test-release else -BUILD_RELEASE_TYPE := dev-release +BUILD_RELEASE_TYPE := unknown-release endif else BUILD_RELEASE_TYPE := $(RELEASE_TYPE)-release -- GitLab