Reland: Add PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT
If this option is set, then an additional copy of the debug policy can
be installed to the GSI, and the init-second-stage of GSI could load
debug policy from GSI /system_ext when debug-ramdisk is used.
Bug: 188067818
Test: Flash RQ2A.201207.001 bramble-user with debug ramdisk & flash
gsi_arm64-user from master, device can boot and `adb root` works
Change-Id: I8c62a3cea026bd26b1994092a14238d22ba1e2df
diff --git a/core/product.mk b/core/product.mk
index 9aaf5eb..41cd310 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -429,6 +429,11 @@
_product_single_value_vars += PRODUCT_INSTALL_EXTRA_FLATTENED_APEXES
+# Install a copy of the debug policy to the system_ext partition, and allow
+# init-second-stage to load debug policy from system_ext.
+# This option is only meant to be set by GSI products.
+_product_single_value_vars += PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT
+
.KATI_READONLY := _product_single_value_vars _product_list_vars
_product_var_list :=$= $(_product_single_value_vars) $(_product_list_vars)