Merge "Revert "Compile with javac by default"" am: 9143549df7 am: 02e0f6c1db am: 14557ce870
am: 963a68d927

Change-Id: I71135a212dea2141a501fb68f36514493952df90
diff --git a/core/build_id.mk b/core/build_id.mk
index 00272aa..ff4d013 100644
--- a/core/build_id.mk
+++ b/core/build_id.mk
@@ -18,4 +18,4 @@
 # (like "CRB01").  It must be a single word, and is
 # capitalized by convention.
 
-export BUILD_ID=OC-DR1
+export BUILD_ID=OC-MR1
diff --git a/core/dex_preopt_libart.mk b/core/dex_preopt_libart.mk
index 9db5dbf..47fdba6 100644
--- a/core/dex_preopt_libart.mk
+++ b/core/dex_preopt_libart.mk
@@ -88,6 +88,42 @@
 LIBART_TARGET_BOOT_ART_EXTRA_FILES := $(foreach jar,$(wordlist 2,999,$(LIBART_TARGET_BOOT_JARS)),boot-$(jar).art boot-$(jar).oat boot-$(jar).vdex)
 LIBART_TARGET_BOOT_ART_EXTRA_FILES += boot.oat boot.vdex
 
+# If we use a boot image profile.
+my_use_profile_for_boot_image := $(PRODUCT_USE_PROFILE_FOR_BOOT_IMAGE)
+ifeq (,$(my_use_profile_for_boot_image))
+# If not set, use the default.
+my_use_profile_for_boot_image := false
+endif
+
+ifeq (true,$(my_use_profile_for_boot_image))
+
+# Location of text based profile for the boot image.
+my_boot_image_profile_location := $(PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION)
+ifeq (,$(my_boot_image_profile_location))
+# If not set, use the default.
+my_boot_image_profile_location := frameworks/base/boot-image-profile.txt
+endif
+
+# Code to create the boot image profile, not in dex_preopt_libart_boot.mk since the profile is the same for all archs.
+my_out_boot_image_profile_location := $(DEXPREOPT_BOOT_JAR_DIR_FULL_PATH)/boot.prof
+$(my_out_boot_image_profile_location): PRIVATE_PROFILE_INPUT_LOCATION := $(my_boot_image_profile_location)
+$(my_out_boot_image_profile_location): $(PROFMAN) $(LIBART_TARGET_BOOT_DEX_FILES) $(my_boot_image_profile_location)
+	@echo "target profman: $@"
+	@mkdir -p $(dir $@)
+	ANDROID_LOG_TAGS="*:e" $(PROFMAN) \
+		--create-profile-from=$(PRIVATE_PROFILE_INPUT_LOCATION) \
+		$(addprefix --apk=,$(LIBART_TARGET_BOOT_DEX_FILES)) \
+		$(addprefix --dex-location=,$(LIBART_TARGET_BOOT_DEX_LOCATIONS)) \
+		--reference-profile-file=$@
+
+# We want to install the profile even if we are not using preopt since it is required to generate
+# the image on the device.
+my_installed_profile := $(TARGET_OUT)/etc/boot-image.prof
+$(eval $(call copy-one-file,$(my_out_boot_image_profile_location),$(my_installed_profile)))
+ALL_DEFAULT_INSTALLED_MODULES += $(my_installed_profile)
+
+endif
+
 my_2nd_arch_prefix :=
 include $(BUILD_SYSTEM)/dex_preopt_libart_boot.mk
 
diff --git a/core/dex_preopt_libart_boot.mk b/core/dex_preopt_libart_boot.mk
index 860a66a..6e49f64 100644
--- a/core/dex_preopt_libart_boot.mk
+++ b/core/dex_preopt_libart_boot.mk
@@ -50,18 +50,27 @@
 	@mkdir -p $(dir $@)
 	$(hide) $(ACP) -fp $(dir $<)$(notdir $@) $@
 
+ifeq (,$(my_out_boot_image_profile_location))
+my_boot_image_flags := $(COMPILED_CLASSES_FLAGS)
+my_boot_image_flags += --image-classes=$(PRELOADED_CLASSES)
+else
+my_boot_image_flags := --compiler-filter=speed-profile
+my_boot_image_flags += --profile-file=$(my_out_boot_image_profile_location)
+endif
+
+$($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME): PRIVATE_BOOT_IMAGE_FLAGS := $(my_boot_image_flags)
 $($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME): PRIVATE_2ND_ARCH_VAR_PREFIX := $(my_2nd_arch_prefix)
 # Use dex2oat debug version for better error reporting
-$($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME) : $(LIBART_TARGET_BOOT_DEX_FILES) $(PRELOADED_CLASSES) $(COMPILED_CLASSES) $(DEX2OAT_DEPENDENCY)
+$($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME) : $(LIBART_TARGET_BOOT_DEX_FILES) $(PRELOADED_CLASSES) $(COMPILED_CLASSES) $(DEX2OAT_DEPENDENCY) $(my_out_profile_location)
 	@echo "target dex2oat: $@"
 	@mkdir -p $(dir $@)
 	@mkdir -p $(dir $($(PRIVATE_2ND_ARCH_VAR_PREFIX)LIBART_TARGET_BOOT_OAT_UNSTRIPPED))
 	@rm -f $(dir $@)/*.art $(dir $@)/*.oat
 	@rm -f $(dir $($(PRIVATE_2ND_ARCH_VAR_PREFIX)LIBART_TARGET_BOOT_OAT_UNSTRIPPED))/*.art
 	@rm -f $(dir $($(PRIVATE_2ND_ARCH_VAR_PREFIX)LIBART_TARGET_BOOT_OAT_UNSTRIPPED))/*.oat
-	$(hide) ANDROID_LOG_TAGS="*:e" $(DEX2OAT) --runtime-arg -Xms$(DEX2OAT_IMAGE_XMS) \
+	$(DEX2OAT) --runtime-arg -Xms$(DEX2OAT_IMAGE_XMS) \
 		--runtime-arg -Xmx$(DEX2OAT_IMAGE_XMX) \
-		--image-classes=$(PRELOADED_CLASSES) \
+		$(PRIVATE_BOOT_IMAGE_FLAGS) \
 		$(addprefix --dex-file=,$(LIBART_TARGET_BOOT_DEX_FILES)) \
 		$(addprefix --dex-location=,$(LIBART_TARGET_BOOT_DEX_LOCATIONS)) \
 		--oat-symbols=$($(PRIVATE_2ND_ARCH_VAR_PREFIX)LIBART_TARGET_BOOT_OAT_UNSTRIPPED) \
@@ -75,4 +84,4 @@
 		--runtime-arg -Xnorelocate --compile-pic \
 		--no-generate-debug-info --generate-build-id \
 		--multi-image --no-inline-from=core-oj.jar \
-		$(PRODUCT_DEX_PREOPT_BOOT_FLAGS) $(GLOBAL_DEXPREOPT_FLAGS) $(COMPILED_CLASSES_FLAGS) $(ART_BOOT_IMAGE_EXTRA_ARGS)
+		$(PRODUCT_DEX_PREOPT_BOOT_FLAGS) $(GLOBAL_DEXPREOPT_FLAGS) $(ART_BOOT_IMAGE_EXTRA_ARGS)
diff --git a/core/dex_preopt_odex_install.mk b/core/dex_preopt_odex_install.mk
index 2b401f0..136def4 100644
--- a/core/dex_preopt_odex_install.mk
+++ b/core/dex_preopt_odex_install.mk
@@ -175,22 +175,47 @@
 endif
 endif
 
-ifneq (,$(filter $(PRODUCT_SYSTEM_SERVER_JARS) $(PRODUCT_DEXPREOPT_SPEED_APPS) $(PRODUCT_SYSTEM_SERVER_APPS),$(LOCAL_MODULE)))
-  # Jars of system server, apps loaded into system server, and apps the product wants to be
-  # compiled with the 'speed' compiler filter.
-  LOCAL_DEX_PREOPT_FLAGS += --compiler-filter=speed
-else
-  # If no compiler filter is specified, default to 'quicken' to save on storage.
-  ifeq (,$(filter --compiler-filter=%, $(LOCAL_DEX_PREOPT_FLAGS)))
-    ifeq (true,$(LOCAL_DEX_PREOPT_GENERATE_PROFILE))
-      # For non system server jars, use speed-profile when we have a profile.
-      LOCAL_DEX_PREOPT_FLAGS += --compiler-filter=speed-profile
+my_system_server_compiler_filter := $(PRODUCT_SYSTEM_SERVER_COMPILER_FILTER)
+ifeq (,$(my_system_server_compiler_filter))
+my_system_server_compiler_filter := speed
+endif
+
+ifeq (,$(filter --compiler-filter=%, $(LOCAL_DEX_PREOPT_FLAGS)))
+  ifneq (,$(filter $(PRODUCT_SYSTEM_SERVER_JARS),$(LOCAL_MODULE)))
+    # Jars of system server, use the product option if it is set, speed otherwise.
+    LOCAL_DEX_PREOPT_FLAGS += --compiler-filter=$(my_system_server_compiler_filter)
+  else
+    ifneq (,$(filter $(PRODUCT_DEXPREOPT_SPEED_APPS) $(PRODUCT_SYSTEM_SERVER_APPS),$(LOCAL_MODULE)))
+      # Apps loaded into system server, and apps the product default to being compiled with the
+      # 'speed' compiler filter.
+      LOCAL_DEX_PREOPT_FLAGS += --compiler-filter=speed
     else
-      LOCAL_DEX_PREOPT_FLAGS += --compiler-filter=quicken
+      ifeq (true,$(LOCAL_DEX_PREOPT_GENERATE_PROFILE))
+        # For non system server jars, use speed-profile when we have a profile.
+        LOCAL_DEX_PREOPT_FLAGS += --compiler-filter=speed-profile
+      else
+        # If no compiler filter is specified, default to 'quicken' to save on storage.
+        LOCAL_DEX_PREOPT_FLAGS += --compiler-filter=quicken
+      endif
     endif
   endif
 endif
 
+# PRODUCT_SYSTEM_SERVER_DEBUG_INFO overrides WITH_DEXPREOPT_DEBUG_INFO.
+my_system_server_debug_info := $(PRODUCT_SYSTEM_SERVER_DEBUG_INFO)
+ifeq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
+# Only enable for non-eng builds.
+ifeq (,$(my_system_server_debug_info))
+my_system_server_debug_info := true
+endif
+endif
+
+ifeq (true, $(my_system_server_debug_info))
+  ifneq (,$(filter $(PRODUCT_SYSTEM_SERVER_JARS),$(LOCAL_MODULE)))
+    LOCAL_DEX_PREOPT_FLAGS += --generate-mini-debug-info
+  endif
+endif
+
 $(built_odex): PRIVATE_DEX_PREOPT_FLAGS := $(LOCAL_DEX_PREOPT_FLAGS)
 $(built_vdex): $(built_odex)
 $(built_art): $(built_odex)
diff --git a/core/main.mk b/core/main.mk
index f1693fa..0aab4f4 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -227,6 +227,11 @@
   endif
 endif
 
+# Add the system server compiler filter if they are specified for the product.
+ifneq (,$(PRODUCT_SYSTEM_SERVER_COMPILER_FILTER))
+ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.systemservercompilerfilter=$(PRODUCT_SYSTEM_SERVER_COMPILER_FILTER)
+endif
+
 ## user/userdebug ##
 
 user_variant := $(filter user userdebug,$(TARGET_BUILD_VARIANT))
@@ -318,7 +323,7 @@
 
 # Sets the location that the runtime dumps stack traces to when signalled
 # with SIGQUIT. Stack trace dumping is turned on for all android builds.
-ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.stack-trace-file=/data/anr/traces.txt
+ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.stack-trace-dir=/data/anr
 
 # ------------------------------------------------------------
 # Define a function that, given a list of module tags, returns
@@ -704,8 +709,7 @@
 endef
 
 # TODO: Verify all branches/configs have reasonable warnings/errors, and remove
-# these overrides
-link-type-missing = $(eval $$(1).MISSING := true)
+# this override
 verify-link-type = $(eval $$(1).MISSING := true)
 
 $(foreach lt,$(ALL_LINK_TYPES),\
diff --git a/core/pathmap.mk b/core/pathmap.mk
index a1c20c9..af33f5d 100644
--- a/core/pathmap.mk
+++ b/core/pathmap.mk
@@ -80,6 +80,7 @@
 	    telecomm \
 	    telephony \
 	    wifi \
+	    lowpan \
 	    keystore \
 	    rs \
 	 )
diff --git a/core/product.mk b/core/product.mk
index 070986b..6722526 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -120,10 +120,14 @@
     PRODUCT_VERITY_SIGNING_KEY \
     PRODUCT_SYSTEM_VERITY_PARTITION \
     PRODUCT_VENDOR_VERITY_PARTITION \
+    PRODUCT_SYSTEM_SERVER_DEBUG_INFO \
     PRODUCT_DEX_PREOPT_MODULE_CONFIGS \
     PRODUCT_DEX_PREOPT_DEFAULT_FLAGS \
     PRODUCT_DEX_PREOPT_BOOT_FLAGS \
     PRODUCT_DEX_PREOPT_PROFILE_DIR \
+    PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION \
+    PRODUCT_USE_PROFILE_FOR_BOOT_IMAGE \
+    PRODUCT_SYSTEM_SERVER_COMPILER_FILTER \
     PRODUCT_SANITIZER_MODULE_CONFIGS \
     PRODUCT_SYSTEM_BASE_FS_PATH \
     PRODUCT_VENDOR_BASE_FS_PATH \
diff --git a/core/product_config.mk b/core/product_config.mk
index ed8b9a7..6812b05 100644
--- a/core/product_config.mk
+++ b/core/product_config.mk
@@ -383,6 +383,17 @@
 PRODUCT_DEX_PREOPT_PROFILE_DIR := \
     $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEX_PREOPT_PROFILE_DIR))
 
+# Boot image options.
+PRODUCT_USE_PROFILE_FOR_BOOT_IMAGE := \
+    $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_USE_PROFILE_FOR_BOOT_IMAGE))
+PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION := \
+    $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION))
+
+PRODUCT_SYSTEM_SERVER_COMPILER_FILTER := \
+    $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SYSTEM_SERVER_COMPILER_FILTER))
+PRODUCT_SYSTEM_SERVER_DEBUG_INFO := \
+    $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SYSTEM_SERVER_DEBUG_INFO))
+
 # Resolve and setup per-module dex-preopt configs.
 PRODUCT_DEX_PREOPT_MODULE_CONFIGS := \
     $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEX_PREOPT_MODULE_CONFIGS))
diff --git a/core/tasks/tools/compatibility.mk b/core/tasks/tools/compatibility.mk
index 20b8314..0fc2045 100644
--- a/core/tasks/tools/compatibility.mk
+++ b/core/tasks/tools/compatibility.mk
@@ -19,6 +19,8 @@
 #   test_suite_tradefed: the name of this test suite's tradefed wrapper
 #   test_suite_dynamic_config: the path to this test suite's dynamic configuration file
 #   test_suite_readme: the path to a README file for this test suite
+#   test_suite_prebuilt_tools: the set of prebuilt tools to be included directly
+#                         in the 'tools' subdirectory of the test suite.
 # Output variables:
 #   compatibility_zip: the path to the output zip file.
 
@@ -39,10 +41,10 @@
 compatibility_zip := $(out_dir).zip
 $(compatibility_zip): PRIVATE_NAME := android-$(test_suite_name)
 $(compatibility_zip): PRIVATE_OUT_DIR := $(out_dir)
-$(compatibility_zip): PRIVATE_TOOLS := $(test_tools)
+$(compatibility_zip): PRIVATE_TOOLS := $(test_tools) $(test_suite_prebuilt_tools)
 $(compatibility_zip): PRIVATE_SUITE_NAME := $(test_suite_name)
 $(compatibility_zip): PRIVATE_DYNAMIC_CONFIG := $(test_suite_dynamic_config)
-$(compatibility_zip): $(test_artifacts) $(test_tools) $(test_suite_dynamic_config) $(SOONG_ZIP) | $(ADB) $(ACP)
+$(compatibility_zip): $(test_artifacts) $(test_tools) $(test_suite_prebuilt_tools) $(test_suite_dynamic_config) $(SOONG_ZIP) | $(ADB) $(ACP)
 # Make dir structure
 	$(hide) mkdir -p $(PRIVATE_OUT_DIR)/tools $(PRIVATE_OUT_DIR)/testcases
 # Copy tools
@@ -56,3 +58,4 @@
 test_suite_tradefed :=
 test_suite_dynamic_config :=
 test_suite_readme :=
+test_suite_prebuilt_tools :=
diff --git a/core/version_defaults.mk b/core/version_defaults.mk
index 2b24d57..c4fb857 100644
--- a/core/version_defaults.mk
+++ b/core/version_defaults.mk
@@ -38,8 +38,8 @@
   include $(INTERNAL_BUILD_ID_MAKEFILE)
 endif
 
-DEFAULT_PLATFORM_VERSION := OPD1
-MIN_PLATFORM_VERSION := OPD1
+DEFAULT_PLATFORM_VERSION := OPM1
+MIN_PLATFORM_VERSION := OPM1
 MAX_PLATFORM_VERSION := PPR1
 
 ALLOWED_VERSIONS := $(call allowed-platform-versions,\
@@ -49,12 +49,6 @@
 
 ifndef TARGET_PLATFORM_VERSION
   TARGET_PLATFORM_VERSION := $(DEFAULT_PLATFORM_VERSION)
-else ifeq ($(TARGET_PLATFORM_VERSION),OPR1)
-  # HACK: lunch currently sets TARGET_PLATFORM_VERSION to
-  # DEFAULT_PLATFORM_VERSION, which causes unnecessary pain
-  # when the old DEFAULT_PLATFORM_VERSION becomes invalid.
-  # For now, silently upgrade OPR1 to the current default.
-  TARGET_PLATFORM_VERSION := $(DEFAULT_PLATFORM_VERSION)
 endif
 
 ifeq (,$(filter $(ALLOWED_VERSIONS), $(TARGET_PLATFORM_VERSION)))
@@ -79,13 +73,11 @@
 # When you change PLATFORM_VERSION for a given PLATFORM_SDK_VERSION
 # please add that PLATFORM_VERSION to the following text file:
 # cts/tests/tests/os/assets/platform_versions.txt
-PLATFORM_VERSION.OPD1 := 8.0.1
 PLATFORM_VERSION.OPM1 := OMR1
 PLATFORM_VERSION.PPR1 := P
 
 # These are the current development codenames, if the build is not a final
 # release build.  If this is a final release build, it is simply "REL".
-PLATFORM_VERSION_CODENAME.OPD1 := REL
 PLATFORM_VERSION_CODENAME.OPM1 := OMR1
 PLATFORM_VERSION_CODENAME.PPR1 := P
 
diff --git a/target/board/Android.mk b/target/board/Android.mk
index e23ab21..331367f 100644
--- a/target/board/Android.mk
+++ b/target/board/Android.mk
@@ -83,7 +83,7 @@
 ifeq ($(PRODUCT_FULL_TREBLE),true)
 ifdef BUILT_VENDOR_MATRIX
 $(GEN): $(BUILT_VENDOR_MATRIX)
-$(GEN): PRIVATE_FLAGS := -c "$(BUILT_VENDOR_MATRIX)"
+$(GEN): PRIVATE_FLAGS += -c "$(BUILT_VENDOR_MATRIX)"
 endif
 endif
 
@@ -110,7 +110,7 @@
 ifeq ($(PRODUCT_FULL_TREBLE),true)
 ifdef BUILT_VENDOR_MANIFEST
 $(GEN): $(BUILT_VENDOR_MANIFEST)
-$(GEN): PRIVATE_FLAGS := -c "$(BUILT_VENDOR_MANIFEST)"
+$(GEN): PRIVATE_FLAGS += -c "$(BUILT_VENDOR_MANIFEST)"
 endif
 endif
 
@@ -130,6 +130,14 @@
 FRAMEWORK_VBMETA_VERSION := 0.0
 endif
 
+# All kernel versions that the system image works with.
+$(GEN): test/vts-testcase/kernel/config/data/android-3.18/android-base.cfg
+$(GEN): test/vts-testcase/kernel/config/data/android-4.4/android-base.cfg
+$(GEN): test/vts-testcase/kernel/config/data/android-4.9/android-base.cfg
+$(GEN): PRIVATE_FLAGS += --kernel=3.18:test/vts-testcase/kernel/config/data/android-3.18/android-base.cfg
+$(GEN): PRIVATE_FLAGS += --kernel=4.4:test/vts-testcase/kernel/config/data/android-4.4/android-base.cfg
+$(GEN): PRIVATE_FLAGS += --kernel=4.9:test/vts-testcase/kernel/config/data/android-4.9/android-base.cfg
+
 $(GEN): $(FRAMEWORK_COMPATIBILITY_MATRIX_FILE) $(HOST_OUT_EXECUTABLES)/assemble_vintf
 	# TODO(b/37405869) (b/37715375) inject avb versions as well for devices that have avb enabled.
 	POLICYVERS=$(POLICYVERS) \
diff --git a/target/board/generic/system.prop b/target/board/generic/system.prop
index f2424c9..5b2e7bf 100644
--- a/target/board/generic/system.prop
+++ b/target/board/generic/system.prop
@@ -2,5 +2,5 @@
 # system.prop for generic sdk 
 #
 
-rild.libpath=/system/lib/libreference-ril.so
+rild.libpath=/vendor/lib/libreference-ril.so
 rild.libargs=-d /dev/ttyS0
diff --git a/target/board/generic_arm64/system.prop b/target/board/generic_arm64/system.prop
index 24578a9..32c5129 100644
--- a/target/board/generic_arm64/system.prop
+++ b/target/board/generic_arm64/system.prop
@@ -2,5 +2,5 @@
 # system.prop for generic arm64 sdk
 #
 
-rild.libpath=/system/lib64/libreference-ril.so
+rild.libpath=/vendor/lib64/libreference-ril.so
 rild.libargs=-d /dev/ttyS0
diff --git a/target/board/generic_arm64_a/BoardConfig.mk b/target/board/generic_arm64_a/BoardConfig.mk
index fbac417..4ecfee6 100644
--- a/target/board/generic_arm64_a/BoardConfig.mk
+++ b/target/board/generic_arm64_a/BoardConfig.mk
@@ -41,7 +41,6 @@
 endif
 
 # Generic AOSP image always requires separate vendor.img
-BOARD_USES_VENDORIMAGE := true
 TARGET_COPY_OUT_VENDOR := vendor
 
 # Generic AOSP image does NOT support HWC1
@@ -68,4 +67,3 @@
 BOARD_FLASH_BLOCK_SIZE := 512
 
 BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true
-
diff --git a/target/board/generic_arm64_ab/BoardConfig.mk b/target/board/generic_arm64_ab/BoardConfig.mk
index e05f345..d1bba39 100644
--- a/target/board/generic_arm64_ab/BoardConfig.mk
+++ b/target/board/generic_arm64_ab/BoardConfig.mk
@@ -41,7 +41,6 @@
 endif
 
 # Generic AOSP image always requires separate vendor.img
-BOARD_USES_VENDORIMAGE := true
 TARGET_COPY_OUT_VENDOR := vendor
 
 # Generic AOSP image does NOT support HWC1
diff --git a/target/board/generic_arm_a/BoardConfig.mk b/target/board/generic_arm_a/BoardConfig.mk
index 6c1b36f..db3e394 100644
--- a/target/board/generic_arm_a/BoardConfig.mk
+++ b/target/board/generic_arm_a/BoardConfig.mk
@@ -41,7 +41,6 @@
 endif
 
 # Generic AOSP image always requires separate vendor.img
-BOARD_USES_VENDORIMAGE := true
 TARGET_COPY_OUT_VENDOR := vendor
 
 # Generic AOSP image does NOT support HWC1
@@ -60,4 +59,3 @@
 BOARD_FLASH_BLOCK_SIZE := 512
 
 BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true
-
diff --git a/target/board/generic_mips/system.prop b/target/board/generic_mips/system.prop
index 137a0f9..973db2c 100644
--- a/target/board/generic_mips/system.prop
+++ b/target/board/generic_mips/system.prop
@@ -2,5 +2,5 @@
 # system.prop for generic sdk
 #
 
-rild.libpath=/system/lib/libreference-ril.so
+rild.libpath=/vendor/lib/libreference-ril.so
 rild.libargs=-d /dev/ttyS0
diff --git a/target/board/generic_mips64/system.prop b/target/board/generic_mips64/system.prop
index aa03eae..4da69c0 100644
--- a/target/board/generic_mips64/system.prop
+++ b/target/board/generic_mips64/system.prop
@@ -2,5 +2,5 @@
 # system.prop for generic mips64 sdk
 #
 
-rild.libpath=/system/lib64/libreference-ril.so
+rild.libpath=/vendor/lib64/libreference-ril.so
 rild.libargs=-d /dev/ttyS0
diff --git a/target/board/generic_x86/system.prop b/target/board/generic_x86/system.prop
index 137a0f9..973db2c 100644
--- a/target/board/generic_x86/system.prop
+++ b/target/board/generic_x86/system.prop
@@ -2,5 +2,5 @@
 # system.prop for generic sdk
 #
 
-rild.libpath=/system/lib/libreference-ril.so
+rild.libpath=/vendor/lib/libreference-ril.so
 rild.libargs=-d /dev/ttyS0
diff --git a/target/board/generic_x86_64/system.prop b/target/board/generic_x86_64/system.prop
index 43d4a88..5e546c4 100644
--- a/target/board/generic_x86_64/system.prop
+++ b/target/board/generic_x86_64/system.prop
@@ -2,5 +2,5 @@
 # system.prop for generic sdk
 #
 
-rild.libpath=/system/lib64/libreference-ril.so
+rild.libpath=/vendor/lib64/libreference-ril.so
 rild.libargs=-d /dev/ttyS0
diff --git a/target/product/base.mk b/target/product/base.mk
index 392f432..84feaf7 100644
--- a/target/product/base.mk
+++ b/target/product/base.mk
@@ -76,8 +76,6 @@
     libnetlink \
     libnetutils \
     libpdfium \
-    libradio \
-    libradioservice \
     libradio_metadata \
     libreference-ril \
     libreverbwrapper \
@@ -140,6 +138,7 @@
 
 # Essential HAL modules
 PRODUCT_PACKAGES += \
+    android.hardware.cas@1.0-service \
     android.hardware.media.omx@1.0-service
 
 # XML schema files
diff --git a/target/product/runtime_libart.mk b/target/product/runtime_libart.mk
index 24eeff9..ed68c78 100644
--- a/target/product/runtime_libart.mk
+++ b/target/product/runtime_libart.mk
@@ -82,4 +82,5 @@
 PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
     pm.dexopt.install=quicken \
     pm.dexopt.bg-dexopt=speed-profile \
-    pm.dexopt.ab-ota=speed-profile
+    pm.dexopt.ab-ota=speed-profile \
+    pm.dexopt.inactive=verify
diff --git a/target/product/treble_common.mk b/target/product/treble_common.mk
index 85ec249..52e2441 100644
--- a/target/product/treble_common.mk
+++ b/target/product/treble_common.mk
@@ -206,3 +206,11 @@
 #   audio.a2dp.default to support A2DP if board has the capability.
 PRODUCT_PACKAGES += \
     audio.a2dp.default
+
+# Net:
+#   Vendors can use the platform-provided network configuration utilities (ip,
+#   iptable, etc.) to configure the Linux networking stack, but these utilities
+#   do not yet include a HIDL interface wrapper. This is a solution on
+#   Android O.
+PRODUCT_PACKAGES += \
+    netutils-wrapper-1.0