From d91be06c0c8ad25e9e82f9ab3cdb01503f5a67a6 Mon Sep 17 00:00:00 2001 From: SpiritCroc Date: Sun, 6 Jul 2025 20:05:41 +0200 Subject: soong: Tweak props for userdebug (set adb secure; allow mock locations) Change-Id: I23e123a0cfc28be73ebbd06a2c356c276ac787ac --- scripts/gen_build_prop.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/gen_build_prop.py b/scripts/gen_build_prop.py index e3e0fd1db..33b449b44 100644 --- a/scripts/gen_build_prop.py +++ b/scripts/gen_build_prop.py @@ -364,13 +364,21 @@ def append_additional_system_props(args): enable_target_debugging = False enable_dalvik_lock_contention_logging = False else: + # AICP: also set ro.adb.secure for userdebug + if config["BuildVariant"] == "userdebug": + props.append("ro.adb.secure=1") + # Disable debugging in userdebug builds if PRODUCT_NOT_DEBUGGABLE_IN_USERDEBUG # is set. if config["ProductNotDebuggableInUserdebug"]: enable_target_debugging = False # Disallow mock locations by default for user builds - props.append("ro.allow.mock.location=0") + # AICP: still allow for userdebug + if config["BuildVariant"] == "userdebug": + props.append("ro.allow.mock.location=1") + else: + props.append("ro.allow.mock.location=0") else: # Turn on checkjni for non-user builds. props.append("ro.kernel.android.checkjni=1") -- cgit v1.2.3