From d2a8bc5ebdaff88ee63cdbdd5c35853b1a4daee6 Mon Sep 17 00:00:00 2001 From: Alexandre Roux D'Anzi Date: Mon, 7 Dec 2020 14:05:05 +0100 Subject: [PATCH 1/6] display release type instead of keys --- core/Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/core/Makefile b/core/Makefile index 3fee8da580..b512688480 100644 --- a/core/Makefile +++ b/core/Makefile @@ -306,7 +306,12 @@ BUILD_KEYS := test-keys else BUILD_KEYS := dev-keys endif -BUILD_VERSION_TAGS += $(BUILD_KEYS) + +ifndef RELEASE_TYPE + RELEASE_TYPE := $(BUILD_KEYS) +endif + +BUILD_VERSION_TAGS += $(RELEASE_TYPE) BUILD_VERSION_TAGS := $(subst $(space),$(comma),$(sort $(BUILD_VERSION_TAGS))) # A human-readable string that descibes this build in detail. @@ -361,9 +366,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_KEYS) + BUILD_DISPLAY_ID := $(BUILD_ID).$(BUILD_NUMBER_FROM_FILE) $(RELEASE_TYPE) else - BUILD_DISPLAY_ID := $(BUILD_ID) $(BUILD_KEYS) + BUILD_DISPLAY_ID := $(BUILD_ID) $(RELEASE_TYPE) endif else # Non-user builds should show detailed build information -- GitLab From d848df6e340726bf66894ffb2dbda404a989569f Mon Sep 17 00:00:00 2001 From: Alexandre Roux D'Anzi Date: Mon, 7 Dec 2020 16:27:49 +0100 Subject: [PATCH 2/6] renaming to BUILD_DISPLAY_KEYS --- core/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/Makefile b/core/Makefile index b512688480..7b6a04878a 100644 --- a/core/Makefile +++ b/core/Makefile @@ -307,11 +307,14 @@ else BUILD_KEYS := dev-keys endif + ifndef RELEASE_TYPE - RELEASE_TYPE := $(BUILD_KEYS) + BUILD_DISPLAY_KEYS := $(BUILD_KEYS) +else + BUILD_DISPLAY_KEYS := $(RELEASE_TYPE) endif -BUILD_VERSION_TAGS += $(RELEASE_TYPE) +BUILD_VERSION_TAGS += $(BUILD_DISPLAY_KEYS) BUILD_VERSION_TAGS := $(subst $(space),$(comma),$(sort $(BUILD_VERSION_TAGS))) # A human-readable string that descibes this build in detail. -- GitLab From 2d25472173896ea447bc6dfb6eb1c907a612fb56 Mon Sep 17 00:00:00 2001 From: Alexandre Roux D'Anzi Date: Mon, 7 Dec 2020 16:29:03 +0100 Subject: [PATCH 3/6] fix display id with gsi --- core/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/Makefile b/core/Makefile index 7b6a04878a..aefe86a02e 100644 --- a/core/Makefile +++ b/core/Makefile @@ -588,7 +588,8 @@ endif # BOARD_USES_PRODUCTIMAGE $(hide) echo "#" >> $@; \ echo "# ADDITIONAL PRODUCT PROPERTIES" >> $@; \ echo "#" >> $@; \ - echo "ro.build.characteristics=$(TARGET_AAPT_CHARACTERISTICS)" >> $@; + echo "ro.build.characteristics=$(TARGET_AAPT_CHARACTERISTICS)" >> $@; \ + echo "ro.build.display.id=$(BUILD_DISPLAY_ID)" >> $@; $(hide) $(foreach line,$(FINAL_PRODUCT_PROPERTIES), \ echo "$(line)" >> $@;) $(hide) build/make/tools/post_process_props.py $@ -- GitLab From 6fe66e4c8963d80e61b4c6f638f4446cd37b78c9 Mon Sep 17 00:00:00 2001 From: Alexandre Roux D'Anzi Date: Mon, 7 Dec 2020 16:34:43 +0100 Subject: [PATCH 4/6] also needed here --- core/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/Makefile b/core/Makefile index aefe86a02e..cb98933ccc 100644 --- a/core/Makefile +++ b/core/Makefile @@ -369,9 +369,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) $(RELEASE_TYPE) + BUILD_DISPLAY_ID := $(BUILD_ID).$(BUILD_NUMBER_FROM_FILE) $(BUILD_DISPLAY_KEYS) else - BUILD_DISPLAY_ID := $(BUILD_ID) $(RELEASE_TYPE) + BUILD_DISPLAY_ID := $(BUILD_ID) $(BUILD_DISPLAY_KEYS) endif else # Non-user builds should show detailed build information -- GitLab From 79bfa3bd9d62b5272f0991c8c97d7df83b4ad522 Mon Sep 17 00:00:00 2001 From: Alexandre Roux D'Anzi Date: Mon, 7 Dec 2020 16:39:42 +0100 Subject: [PATCH 5/6] adding -keys postfix --- core/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/Makefile b/core/Makefile index cb98933ccc..28b5ce9a7c 100644 --- a/core/Makefile +++ b/core/Makefile @@ -311,7 +311,7 @@ endif ifndef RELEASE_TYPE BUILD_DISPLAY_KEYS := $(BUILD_KEYS) else - BUILD_DISPLAY_KEYS := $(RELEASE_TYPE) + BUILD_DISPLAY_KEYS := $(RELEASE_TYPE)-keys endif BUILD_VERSION_TAGS += $(BUILD_DISPLAY_KEYS) -- GitLab From 33b8f1c20d5aeaf70649660ea008becf43adccdd Mon Sep 17 00:00:00 2001 From: Alexandre Roux Date: Wed, 9 Dec 2020 14:54:42 +0000 Subject: [PATCH 6/6] adding comment about setting ro.build.display.id twice --- core/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/Makefile b/core/Makefile index 28b5ce9a7c..67174dbfc2 100644 --- a/core/Makefile +++ b/core/Makefile @@ -307,7 +307,8 @@ else BUILD_KEYS := dev-keys 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) else -- GitLab