From a3c91fe804f1569125c7300249099988fc649048 Mon Sep 17 00:00:00 2001 From: Jonathan Klee Date: Tue, 4 Oct 2022 13:38:47 +0200 Subject: [PATCH] Spoof target build variant for Whatsapp Whatsapp was detecting us as a custom ROM because our display id contained the "debug" pattern. --- core/sysprop.mk | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/sysprop.mk b/core/sysprop.mk index e6473e003e..2b2a88c842 100644 --- a/core/sysprop.mk +++ b/core/sysprop.mk @@ -196,8 +196,15 @@ BUILD_THUMBPRINT := # Define human readable strings that describe this build # +# Spoof target build variant because Whatsapp (and maybe others) +# is checking the "debug" pattern in the Build.DISPLAY variable. +SPOOFED_TARGET_BUILD_VARIANT := $(TARGET_BUILD_VARIANT) +ifeq (userdebug,$(TARGET_BUILD_VARIANT)) + SPOOFED_TARGET_BUILD_VARIANT := user +endif + # BUILD_ID: detail info; has the same info as the build fingerprint -BUILD_DESC := e_$(TARGET_DEVICE)-$(TARGET_BUILD_VARIANT) $(PLATFORM_VERSION) $(BUILD_ID) $(BUILD_NUMBER_FROM_FILE) $(BUILD_VERSION_TAGS) +BUILD_DESC := e_$(TARGET_DEVICE)-$(SPOOFED_TARGET_BUILD_VARIANT) $(PLATFORM_VERSION) $(BUILD_ID) $(BUILD_NUMBER_FROM_FILE) $(BUILD_VERSION_TAGS) # BUILD_DISPLAY_ID is shown under Settings -> About Phone ifeq ($(TARGET_BUILD_VARIANT),user) -- GitLab