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

Commit 1f0bb7f9 authored by Jonathan Klee's avatar Jonathan Klee Committed by Nishith Khanna
Browse files

Spoof target build variant for Whatsapp

Whatsapp was detecting us as a custom ROM because our display id
contained the "debug" pattern.
parent 4a574954
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -220,8 +220,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)