Merge "Add keys for APEX images for eng/userdebug."
am: 6466b3a334

Change-Id: Ibd5efbb12e25309775d6c61bfba3a40d99667c24
diff --git a/target/product/base_system.mk b/target/product/base_system.mk
index 1ee6a63..b282048 100644
--- a/target/product/base_system.mk
+++ b/target/product/base_system.mk
@@ -305,6 +305,7 @@
 # Packages included only for eng or userdebug builds, previously debug tagged
 PRODUCT_PACKAGES_DEBUG := \
     adb_keys \
+    apex_debug_key \
     iotop \
     logpersist.start \
     perfprofd \
diff --git a/target/product/security/Android.mk b/target/product/security/Android.mk
index 4142ea9..73ebd75 100644
--- a/target/product/security/Android.mk
+++ b/target/product/security/Android.mk
@@ -12,6 +12,19 @@
 include $(BUILD_PREBUILT)
 
 #######################################
+# apex_debug_key for eng/userdebug
+ifneq ($(filter eng userdebug,$(TARGET_BUILD_VARIANT)),)
+  include $(CLEAR_VARS)
+
+  LOCAL_MODULE := apex_debug_key
+  LOCAL_SRC_FILES := $(LOCAL_MODULE)
+  LOCAL_MODULE_CLASS := ETC
+  LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/security/apex
+
+  include $(BUILD_PREBUILT)
+endif
+
+#######################################
 # adb key, if configured via PRODUCT_ADB_KEYS
 ifdef PRODUCT_ADB_KEYS
   ifneq ($(filter eng userdebug,$(TARGET_BUILD_VARIANT)),)
diff --git a/target/product/security/apex_debug_key b/target/product/security/apex_debug_key
new file mode 100644
index 0000000..28bc8f7
--- /dev/null
+++ b/target/product/security/apex_debug_key
Binary files differ
diff --git a/target/product/security/apex_debug_key.pem b/target/product/security/apex_debug_key.pem
new file mode 100644
index 0000000..bd56778
--- /dev/null
+++ b/target/product/security/apex_debug_key.pem
@@ -0,0 +1,51 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIJKgIBAAKCAgEAt4iSfTF+e2khGQf0bUzTMwWFsgaiQbwQB3cvyBlE9XekFXUt
+GdOEhC2J0p+930UoF6gjjRRrgGF+8K5iV1m3oEbB3qGz6UUOurvVkt4tq96e/Q5a
+ogC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