Support custom sdk.atree files.

Bug: 12683047
Change-Id: I79ca1eff81e947d03c50759d47426487e48435d0
diff --git a/core/Makefile b/core/Makefile
index 9f35254..6956c22 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -1558,6 +1558,12 @@
 	$(atree_dir)/sdk-$(HOST_OS)-$(HOST_ARCH).atree \
 	$(sdk_tools_atree_files)
 
+ifneq ($(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SDK_ATREE_FILES),)
+sdk_atree_files += $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SDK_ATREE_FILES)
+else
+sdk_atree_files += $(atree_dir)/sdk.atree
+endif
+
 # development/build/sdk-android-<abi>.atree is used to differentiate
 # between architecture models (e.g. ARMv5TE versus ARMv7) when copying
 # files like the kernel image. We use TARGET_CPU_ABI because we don't
diff --git a/core/product.mk b/core/product.mk
index cf6fb9a..3b6b27e 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -86,6 +86,7 @@
     PRODUCT_PACKAGE_OVERLAYS \
     DEVICE_PACKAGE_OVERLAYS \
     PRODUCT_TAGS \
+    PRODUCT_SDK_ATREE_FILES \
     PRODUCT_SDK_ADDON_NAME \
     PRODUCT_SDK_ADDON_COPY_FILES \
     PRODUCT_SDK_ADDON_COPY_MODULES \