From 5889dce0d523a211fcfbe8ee80267eff6acae5e2 Mon Sep 17 00:00:00 2001 From: Jonathan Klee Date: Fri, 11 Feb 2022 17:47:21 +0100 Subject: [PATCH] Allow override of enable_target_debugging Some 3rd party apps are using the RootBeer lib to detect a ro.debuggable equal to 1 and consider that the device might be rooted, so won't run. Allow the possibility to override the enable_target_debugging build variable with ENABLE_TARGET_DEBUGGING_OVERRIDE that will be used on stable builds. --- core/main.mk | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/main.mk b/core/main.mk index e8a1c4f8ae..2fd6c25af0 100644 --- a/core/main.mk +++ b/core/main.mk @@ -270,6 +270,15 @@ endif user_variant := $(filter user userdebug,$(TARGET_BUILD_VARIANT)) enable_target_debugging := true + +# Allow to override enable_target_debugging variable +# for a userdebug target. +ifeq ($(user_variant),userdebug) + ifneq (,$(ENABLE_TARGET_DEBUGGING_OVERRIDE) + enable_target_debugging := $(ENABLE_TARGET_DEBUGGING_OVERRIDE) + endif +endif + tags_to_install := ifneq (,$(user_variant)) # Target is secure in user builds. -- GitLab