Merge "Add PRODUCT_ADB_KEYS" am: f599f4010e

am: 617dce0c29

Change-Id: I189f7ff9e9849fcfed1fe2b02502d105267db97a
This commit is contained in:
Dan Willemsen 2017-11-08 03:26:35 +00:00 committed by android-build-merger
commit 06870ee92b
5 changed files with 32 additions and 0 deletions

View File

@ -145,6 +145,7 @@ _product_var_list := \
PRODUCT_SYSTEM_HEADROOM \ PRODUCT_SYSTEM_HEADROOM \
PRODUCT_MINIMIZE_JAVA_DEBUG_INFO \ PRODUCT_MINIMIZE_JAVA_DEBUG_INFO \
PRODUCT_INTEGER_OVERFLOW_EXCLUDE_PATHS \ PRODUCT_INTEGER_OVERFLOW_EXCLUDE_PATHS \
PRODUCT_ADB_KEYS \

View File

@ -462,3 +462,13 @@ PRODUCT_MINIMIZE_JAVA_DEBUG_INFO := \
# Whether any paths are excluded from sanitization when SANITIZE_TARGET=integer_overflow # Whether any paths are excluded from sanitization when SANITIZE_TARGET=integer_overflow
PRODUCT_INTEGER_OVERFLOW_EXCLUDE_PATHS := \ PRODUCT_INTEGER_OVERFLOW_EXCLUDE_PATHS := \
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_INTEGER_OVERFLOW_EXCLUDE_PATHS)) $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_INTEGER_OVERFLOW_EXCLUDE_PATHS))
# ADB keys for debuggable builds
PRODUCT_ADB_KEYS :=
ifneq ($(filter eng userdebug,$(TARGET_BUILD_VARIANT)),)
PRODUCT_ADB_KEYS := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ADB_KEYS))
endif
ifneq ($(filter-out 0 1,$(words $(PRODUCT_ADB_KEYS))),)
$(error Only one file may be in PRODUCT_ADB_KEYS: $(PRODUCT_ADB_KEYS))
endif
.KATI_READONLY := PRODUCT_ADB_KEYS

View File

@ -99,6 +99,11 @@ PRODUCT_PACKAGES += \
fs_config_files \ fs_config_files \
fs_config_dirs fs_config_dirs
# If there are product-specific adb keys defined, install them on debuggable
# builds.
PRODUCT_PACKAGES_DEBUG += \
adb_keys
# Ensure that this property is always defined so that bionic_systrace.cpp # Ensure that this property is always defined so that bionic_systrace.cpp
# can rely on it being initially set by init. # can rely on it being initially set by init.
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \

View File

@ -53,3 +53,6 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/locales_full.mk)
# Get everything else from the parent package # Get everything else from the parent package
$(call inherit-product, $(SRC_TARGET_DIR)/product/generic_no_telephony.mk) $(call inherit-product, $(SRC_TARGET_DIR)/product/generic_no_telephony.mk)
# Add adb keys to debuggable AOSP builds (if they exist)
$(call inherit-product-if-exists, vendor/google/security/adb/vendor_key.mk)

View File

@ -10,3 +10,16 @@ LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
include $(BUILD_PREBUILT) include $(BUILD_PREBUILT)
#######################################
# adb key, if configured via PRODUCT_ADB_KEYS
ifdef PRODUCT_ADB_KEYS
ifneq ($(filter eng userdebug,$(TARGET_BUILD_VARIANT)),)
include $(CLEAR_VARS)
LOCAL_MODULE := adb_keys
LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
LOCAL_PREBUILT_MODULE_FILE := $(PRODUCT_ADB_KEYS)
include $(BUILD_PREBUILT)
endif
endif