Add support to disable adb root on userdebug builds based on product config
Test: manually verify
Bug: 345480978
Change-Id: I00cf7d30f66137055ed0aa495bf3d98143c391b7
diff --git a/core/product.mk b/core/product.mk
index 68d7721..2487cec 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -491,6 +491,11 @@
# Enables 16KB developer option for device if set.
_product_single_value_vars += PRODUCT_16K_DEVELOPER_OPTION
+# If set, adb root will be disabled (really ro.debuggable=0) in userdebug
+# builds. It's already off disabled in user builds. Eng builds are unaffected
+# by this flag.
+_product_single_value_vars += PRODUCT_NOT_DEBUGGABLE_IN_USERDEBUG
+
.KATI_READONLY := _product_single_value_vars _product_list_vars
_product_var_list :=$= $(_product_single_value_vars) $(_product_list_vars)