Merge "unbreak sdk_phone_x86 boot"
diff --git a/core/Makefile b/core/Makefile
index 20639ca..c650022 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -2124,6 +2124,7 @@
 	    $(recovery_fstab)
 	$(call pretty,"Target boot image from recovery: $@")
 	$(call build-recoveryimage-target, $@)
+$(INSTALLED_BOOTIMAGE_TARGET): .KATI_IMPLICIT_OUTPUTS += $(recovery_ramdisk)
 endif # BOARD_USES_RECOVERY_AS_BOOT
 
 ifdef BOARD_INCLUDE_RECOVERY_DTBO
diff --git a/core/main.mk b/core/main.mk
index 9f3ebea..b51603d 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -232,6 +232,17 @@
 # mount system_other partition.
 ADDITIONAL_DEFAULT_PROPERTIES += ro.postinstall.fstab.prefix=/system
 
+# Set ro.product.vndk.version to know the VNDK version required by product
+# modules. It uses the version in PRODUCT_PRODUCT_VNDK_VERSION. If the value
+# is "current", use PLATFORM_VNDK_VERSION.
+ifdef PRODUCT_PRODUCT_VNDK_VERSION
+ifeq ($(PRODUCT_PRODUCT_VNDK_VERSION),current)
+ADDITIONAL_PRODUCT_PROPERTIES += ro.product.vndk.version=$(PLATFORM_VNDK_VERSION)
+else
+ADDITIONAL_PRODUCT_PROPERTIES += ro.product.vndk.version=$(PRODUCT_PRODUCT_VNDK_VERSION)
+endif
+endif
+
 # -----------------------------------------------------------------
 ###
 ### In this section we set up the things that are different
@@ -1529,6 +1540,7 @@
     $(INSTALLED_BUILD_PROP_TARGET) \
     $(BUILT_TARGET_FILES_PACKAGE) \
     $(INSTALLED_ANDROID_INFO_TXT_TARGET) \
+    $(INSTALLED_MISC_INFO_TARGET) \
     $(INSTALLED_RAMDISK_TARGET) \
    )
 
@@ -1565,6 +1577,12 @@
     )
   endif
 
+  ifeq ($(BOARD_USES_RECOVERY_AS_BOOT),true)
+    $(call dist-for-goals, droidcore, \
+      $(recovery_ramdisk) \
+    )
+  endif
+
   ifeq ($(EMMA_INSTRUMENT),true)
     $(JACOCO_REPORT_CLASSES_ALL) : $(INSTALLED_SYSTEMIMAGE_TARGET)
     $(call dist-for-goals, dist_files, $(JACOCO_REPORT_CLASSES_ALL))
diff --git a/target/product/base_system_ext.mk b/target/product/base_system_ext.mk
index df859cd..6847bfa 100644
--- a/target/product/base_system_ext.mk
+++ b/target/product/base_system_ext.mk
@@ -16,3 +16,5 @@
 
 # Base modules and settings for the system_ext partition.
 PRODUCT_PACKAGES += \
+    group_system_ext \
+    passwd_system_ext \
diff --git a/target/product/base_vendor.mk b/target/product/base_vendor.mk
index 1657e71..c49aab7 100644
--- a/target/product/base_vendor.mk
+++ b/target/product/base_vendor.mk
@@ -49,7 +49,6 @@
     fs_config_dirs_nonsystem \
     gralloc.default \
     group_odm \
-    group_system_ext \
     group_vendor \
     init_vendor \
     libbundlewrapper \
@@ -65,7 +64,6 @@
     libril \
     libvisualizer \
     passwd_odm \
-    passwd_system_ext \
     passwd_vendor \
     selinux_policy_nonsystem \
     shell_and_utilities_vendor \
diff --git a/tools/releasetools/check_target_files_vintf.py b/tools/releasetools/check_target_files_vintf.py
index 543147c..a556f53 100755
--- a/tools/releasetools/check_target_files_vintf.py
+++ b/tools/releasetools/check_target_files_vintf.py
@@ -38,11 +38,13 @@
 # paths (VintfObject.cpp).
 # These paths are stored in different directories in target files package, so
 # we have to search for the correct path and tell checkvintf to remap them.
+# Look for TARGET_COPY_OUT_* variables in board_config.mk for possible paths for
+# each partition.
 DIR_SEARCH_PATHS = {
     '/system': ('SYSTEM',),
     '/vendor': ('VENDOR', 'SYSTEM/vendor'),
     '/product': ('PRODUCT', 'SYSTEM/product'),
-    '/odm': ('ODM', 'VENDOR/odm'),
+    '/odm': ('ODM', 'VENDOR/odm', 'SYSTEM/vendor/odm'),
 }
 
 UNZIP_PATTERN = ['META/*', '*/build.prop']