Merge "Pack additional AVB testkeys into otatools.zip."
diff --git a/Changes.md b/Changes.md
index 37bbad0..7519096 100644
--- a/Changes.md
+++ b/Changes.md
@@ -1,5 +1,32 @@
# Build System Changes for Android.mk Writers
+## PATH Tools {#PATH_Tools}
+
+The build has started restricting the external host tools usable inside the
+build. This will help ensure that build results are reproducible across
+different machines, and catch mistakes before they become larger issues.
+
+To start with, this includes replacing the $PATH with our own directory of
+tools, mirroring that of the host PATH. The only difference so far is the
+removal of the host GCC tools. Anything that is not explicitly in the
+configuration as allowed will continue functioning, but will generate a log
+message. This is expected to become more restrictive over time.
+
+The configuration is located in build/soong/ui/build/paths/config.go, and
+contains all the common tools in use in many builds. Anything not in that list
+will currently print a warning in the `$OUT_DIR/soong.log` file, including the
+command and arguments used, and the process tree in order to help locate the
+usage.
+
+In order to fix any issues brought up by these checks, the best way to fix them
+is to use tools checked into the tree -- either as prebuilts, or building them
+as host tools during the build.
+
+As a temporary measure, you can set `TEMPORARY_DISABLE_PATH_RESTRICTIONS=true`
+in your environment to temporarily turn off the error checks and allow any tool
+to be used (with logging). Beware that GCC didn't work well with the interposer
+used for logging, so this may not help in all cases.
+
## Deprecating / obsoleting envsetup.sh variables in Makefiles
It is not required to source envsetup.sh before running a build. Many scripts,
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 043aa60..beca20b 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -476,6 +476,9 @@
$(call add-clean-step, rm -rf $(TARGET_COMMON_OUT_ROOT)/obj_asan/APPS/*_intermediates/java-source-list)
$(call add-clean-step, rm -rf $(TARGET_COMMON_OUT_ROOT)/obj_asan/JAVA_LIBRARIES/*_intermediates/java-source-list)
+# Remove stale init.noenforce.rc
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/init/gsi/init.noenforce.rc)
+
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************
diff --git a/core/Makefile b/core/Makefile
index e4075a1..ddbc847 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -125,8 +125,12 @@
else
FINAL_VENDOR_DEFAULT_PROPERTIES := ro.vndk.version=$(BOARD_VNDK_VERSION)
endif
+ ifdef BOARD_VNDK_RUNTIME_DISABLE
+ FINAL_VENDOR_DEFAULT_PROPERTIES += ro.vndk.lite=true
+ endif
else
- FINAL_VENDOR_DEFAULT_PROPERTIES :=
+ FINAL_VENDOR_DEFAULT_PROPERTIES := ro.vndk.version=$(PLATFORM_VNDK_VERSION)
+ FINAL_VENDOR_DEFAULT_PROPERTIES += ro.vndk.lite=true
endif
FINAL_VENDOR_DEFAULT_PROPERTIES += \
$(call collapse-pairs, $(PRODUCT_DEFAULT_PROPERTY_OVERRIDES))
diff --git a/core/aapt2.mk b/core/aapt2.mk
index b3a7c93..fbbf3dd 100644
--- a/core/aapt2.mk
+++ b/core/aapt2.mk
@@ -64,9 +64,11 @@
$(my_res_resources_flat) $(my_overlay_resources_flat) $(my_resources_flata): \
PRIVATE_AAPT2_CFLAGS := --pseudo-localize
-my_static_library_resources := $(foreach l, $(call reverse-list,$(LOCAL_STATIC_ANDROID_LIBRARIES)),\
+# TODO(b/78447299): Forbid LOCAL_STATIC_JAVA_AAR_LIBRARIES in aapt2 and remove
+# support for it.
+my_static_library_resources := $(foreach l, $(call reverse-list,$(LOCAL_STATIC_ANDROID_LIBRARIES) $(LOCAL_STATIC_JAVA_AAR_LIBRARIES)),\
$(call intermediates-dir-for,JAVA_LIBRARIES,$(l),,COMMON)/package-res.apk)
-my_static_library_extra_packages := $(foreach l, $(call reverse-list,$(LOCAL_STATIC_ANDROID_LIBRARIES)),\
+my_static_library_extra_packages := $(foreach l, $(call reverse-list,$(LOCAL_STATIC_ANDROID_LIBRARIES) $(LOCAL_STATIC_JAVA_AAR_LIBRARIES)),\
$(call intermediates-dir-for,JAVA_LIBRARIES,$(l),,COMMON)/extra_packages)
my_shared_library_resources := $(foreach l, $(LOCAL_SHARED_ANDROID_LIBRARIES),\
$(call intermediates-dir-for,JAVA_LIBRARIES,$(l),,COMMON)/package-res.apk)
diff --git a/core/base_rules.mk b/core/base_rules.mk
index 63c6c52..075465e 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -557,7 +557,8 @@
# The module itself.
$(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
$(eval my_compat_dist_$(suite) := $(foreach dir, $(call compatibility_suite_dirs,$(suite),$(arch_dir)), \
- $(LOCAL_BUILT_MODULE):$(dir)/$(my_installed_module_stem))))
+ $(LOCAL_BUILT_MODULE):$(dir)/$(my_installed_module_stem))) \
+ $(eval my_compat_dist_config_$(suite) := ))
# Make sure we only add the files once for multilib modules.
ifndef $(my_prefix)$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)_compat_files
@@ -604,7 +605,7 @@
ifneq (,$(test_config))
$(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
- $(eval my_compat_dist_$(suite) += $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \
+ $(eval my_compat_dist_config_$(suite) += $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \
$(test_config):$(dir)/$(LOCAL_MODULE).config)))
endif
@@ -612,14 +613,14 @@
ifneq (,$(wildcard $(LOCAL_PATH)/DynamicConfig.xml))
$(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
- $(eval my_compat_dist_$(suite) += $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \
+ $(eval my_compat_dist_config_$(suite) += $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \
$(LOCAL_PATH)/DynamicConfig.xml:$(dir)/$(LOCAL_MODULE).dynamic)))
endif
ifneq (,$(wildcard $(LOCAL_PATH)/$(LOCAL_MODULE)_*.config))
$(foreach extra_config, $(wildcard $(LOCAL_PATH)/$(LOCAL_MODULE)_*.config), \
$(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
- $(eval my_compat_dist_$(suite) += $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \
+ $(eval my_compat_dist_config_$(suite) += $(foreach dir, $(call compatibility_suite_dirs,$(suite)), \
$(extra_config):$(dir)/$(notdir $(extra_config))))))
endif
endif # $(my_prefix)$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)_compat_files
@@ -638,6 +639,8 @@
is_native :=
$(call create-suite-dependencies)
+$(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
+ $(eval my_compat_dist_config_$(suite) := ))
endif # LOCAL_COMPATIBILITY_SUITE
diff --git a/core/config.mk b/core/config.mk
index b94acd5..075af49 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -712,9 +712,12 @@
# Tool to merge AndroidManifest.xmls
ANDROID_MANIFEST_MERGER_CLASSPATH := \
- prebuilts/gradle-plugin/com/android/tools/build/manifest-merger/26.0.0-beta2/manifest-merger-26.0.0-beta2.jar \
- prebuilts/gradle-plugin/com/android/tools/sdk-common/26.0.0-beta2/sdk-common-26.0.0-beta2.jar \
- prebuilts/gradle-plugin/com/android/tools/common/26.0.0-beta2/common-26.0.0-beta2.jar \
+ prebuilts/gradle-plugin/com/android/tools/build/manifest-merger/26.1.0/manifest-merger-26.1.0.jar \
+ prebuilts/gradle-plugin/com/android/tools/common/26.1.0/common-26.1.0.jar \
+ prebuilts/gradle-plugin/com/android/tools/sdk-common/26.1.0/sdk-common-26.1.0.jar \
+ prebuilts/gradle-plugin/com/android/tools/sdklib/26.1.0/sdklib-26.1.0.jar \
+ prebuilts/gradle-plugin/org/jetbrains/kotlin/kotlin-runtime/1.0.5/kotlin-runtime-1.0.5.jar \
+ prebuilts/gradle-plugin/org/jetbrains/kotlin/kotlin-stdlib/1.1.3/kotlin-stdlib-1.1.3.jar \
prebuilts/misc/common/guava/guava-21.0.jar
ANDROID_MANIFEST_MERGER := $(JAVA) \
-classpath $(subst $(space),:,$(strip $(ANDROID_MANIFEST_MERGER_CLASSPATH))) \
@@ -913,6 +916,15 @@
PLATFORM_SEPOLICY_VERSION \
TOT_SEPOLICY_VERSION \
+ifndef USE_LOGICAL_PARTITIONS
+ USE_LOGICAL_PARTITIONS := $(PRODUCT_USE_LOGICAL_PARTITIONS)
+endif
+.KATI_READONLY := USE_LOGICAL_PARTITIONS
+
+ifeq ($(USE_LOGICAL_PARTITIONS),true)
+ BOARD_KERNEL_CMDLINE += androidboot.lrap=1
+endif
+
# ###############################################################
# Set up final options.
# ###############################################################
diff --git a/core/definitions.mk b/core/definitions.mk
index a1a178b..e18f9a4 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -2150,11 +2150,13 @@
define _create-default-manifest-file
$(1):
rm -f $1
- echo '<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="missing.manifest"></manifest>' > $1
+ (echo '<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="missing.manifest">' && \
+ echo ' <uses-sdk android:minSdkVersion="$(2)" />' && \
+ echo '</manifest>' ) > $1
endef
define create-default-manifest-file
- $(eval $(call _create-default-manifest-file,$(1)))
+ $(eval $(call _create-default-manifest-file,$(1),$(2)))
endef
@@ -2682,6 +2684,18 @@
$$(copy-file-to-target)
endef
+# Copies many xml files and check they are well-formed.
+# $(1): The xml files to copy. Each entry is a ':' separated src:dst pair.
+# Evaluates to the list of the dst files. (ie suitable for a dependency list.)
+define copy-many-xml-files-checked
+$(foreach f, $(1), $(strip \
+ $(eval _cmf_tuple := $(subst :, ,$(f))) \
+ $(eval _cmf_src := $(word 1,$(_cmf_tuple))) \
+ $(eval _cmf_dest := $(word 2,$(_cmf_tuple))) \
+ $(eval $(call copy-xml-file-checked,$(_cmf_src),$(_cmf_dest))) \
+ $(_cmf_dest)))
+endef
+
# Copy the file only if it is a well-formed manifest file. For use viea $(eval)
# $(1): source file
# $(2): destination file
@@ -3127,15 +3141,20 @@
# For each suite:
# 1. Copy the files to the many suite output directories.
+# And for test config files, we'll check the .xml is well-formed before copy.
# 2. Add all the files to each suite's dependent files list.
# 3. Do the dependency addition to my_all_targets
-# Requires for each suite: my_compat_dist_$(suite) to be defined.
+# Requires for each suite: use my_compat_dist_config_$(suite) to define the test config.
+# and use my_compat_dist_$(suite) to define the others.
define create-suite-dependencies
$(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
$(eval COMPATIBILITY.$(suite).FILES := \
- $$(COMPATIBILITY.$(suite).FILES) $$(foreach f,$$(my_compat_dist_$(suite)),$$(call word-colon,2,$$(f))))) \
+ $$(COMPATIBILITY.$(suite).FILES) $$(foreach f,$$(my_compat_dist_$(suite)),$$(call word-colon,2,$$(f))) \
+ $$(foreach f,$$(my_compat_dist_config_$(suite)),$$(call word-colon,2,$$(f))))) \
$(eval $(my_all_targets) : $(call copy-many-files, \
- $(sort $(foreach suite,$(LOCAL_COMPATIBILITY_SUITE),$(my_compat_dist_$(suite))))))
+ $(sort $(foreach suite,$(LOCAL_COMPATIBILITY_SUITE),$(my_compat_dist_$(suite))))) \
+ $(call copy-many-xml-files-checked, \
+ $(sort $(foreach suite,$(LOCAL_COMPATIBILITY_SUITE),$(my_compat_dist_config_$(suite))))))
endef
###########################################################
diff --git a/core/dex_preopt_libart.mk b/core/dex_preopt_libart.mk
index 3b9e4e1..64ad200 100644
--- a/core/dex_preopt_libart.mk
+++ b/core/dex_preopt_libart.mk
@@ -165,7 +165,7 @@
# $(2): the output .odex file
# In the case where LOCAL_ENFORCE_USES_LIBRARIES is true, PRIVATE_DEX2OAT_CLASS_LOADER_CONTEXT
# contains the normalized path list of the libraries. This makes it easier to conditionally prepend
-# org.apache.http.legacy.boot based on the SDK level if required.
+# org.apache.http.legacy.impl based on the SDK level if required.
define dex2oat-one-file
$(hide) rm -f $(2)
$(hide) mkdir -p $(dir $(2))
diff --git a/core/envsetup.mk b/core/envsetup.mk
index 1a36703..dc4bc3b 100644
--- a/core/envsetup.mk
+++ b/core/envsetup.mk
@@ -671,7 +671,7 @@
TARGET_OUT_PRODUCT := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_PRODUCT)
ifneq ($(filter address,$(SANITIZE_TARGET)),)
-target_out_product_shared_libraries_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/system
+target_out_product_shared_libraries_base := $(PRODUCT_OUT)/$(TARGET_COPY_OUT_ASAN)/product
ifeq ($(SANITIZE_LITE),true)
# When using SANITIZE_LITE, APKs must not be packaged with sanitized libraries, as they will not
# work with unsanitized app_process. For simplicity, generate APKs into /data/asan/.
@@ -680,7 +680,7 @@
target_out_product_app_base := $(TARGET_OUT_PRODUCT)
endif
else
-target_out_product_shared_libraries_base := $(TARGET_OUT)
+target_out_product_shared_libraries_base := $(TARGET_OUT_PRODUCT)
target_out_product_app_base := $(TARGET_OUT_PRODUCT)
endif
diff --git a/core/force_aapt2.mk b/core/force_aapt2.mk
index 6901116..a097bd2 100644
--- a/core/force_aapt2.mk
+++ b/core/force_aapt2.mk
@@ -21,9 +21,6 @@
ifeq ($(LOCAL_USE_AAPT2),)
# Force AAPT2 on
LOCAL_USE_AAPT2 := true
- # Move LOCAL_STATIC_JAVA_AAR_LIBRARIES to LOCAL_STATIC_ANDROID_LIBRARIES
- LOCAL_STATIC_ANDROID_LIBRARIES := $(strip $(LOCAL_STATIC_ANDROID_LIBRARIES) $(LOCAL_STATIC_JAVA_AAR_LIBRARIES))
- LOCAL_STATIC_JAVA_AAR_LIBRARIES :=
# Filter out support library resources
LOCAL_RESOURCE_DIR := $(filter-out \
prebuilts/sdk/current/% \
@@ -52,7 +49,15 @@
# work around missing manifests by creating a default one
$(call pretty-warning, Missing manifest file)
LOCAL_FULL_MANIFEST_FILE := $(call local-intermediates-dir,COMMON)/DefaultManifest.xml
- $(call create-default-manifest-file,$(LOCAL_FULL_MANIFEST_FILE))
+ ifdef LOCAL_MIN_SDK_VERSION
+ my_manifest_min_sdk_version := $(LOCAL_MIN_SDK_VERSION)
+ else ifneq (,$(filter-out current system_current test_current core_current, $(LOCAL_SDK_VERSION)))
+ my_manifest_min_sdk_version := $(call get-numeric-sdk-version,$(LOCAL_SDK_VERSION))
+ else
+ my_manifest_min_sdk_version := $(DEFAULT_APP_TARGET_SDK)
+ endif
+ $(call create-default-manifest-file,$(LOCAL_FULL_MANIFEST_FILE),$(my_manifest_min_sdk_version))
+ my_manifest_min_sdk_version :=
endif
endif
endif
diff --git a/core/package_internal.mk b/core/package_internal.mk
index 25b484f..637a135 100644
--- a/core/package_internal.mk
+++ b/core/package_internal.mk
@@ -164,7 +164,7 @@
my_res_dir :=
my_overlay_res_dirs :=
-ifneq ($(LOCAL_STATIC_ANDROID_LIBRARIES),)
+ifneq ($(strip $(LOCAL_STATIC_ANDROID_LIBRARIES) $(LOCAL_STATIC_JAVA_AAR_LIBRARIES)),)
# If we are using static android libraries, every source file becomes an overlay.
# This is to emulate old AAPT behavior which simulated library support.
my_res_dir :=
diff --git a/core/product.mk b/core/product.mk
index 976c939..95d169c 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -197,6 +197,7 @@
PRODUCT_CFI_EXCLUDE_PATHS \
PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE \
PRODUCT_ACTIONABLE_COMPATIBLE_PROPERTY_DISABLE \
+ PRODUCT_USE_LOGICAL_PARTITIONS \
define dump-product
$(info ==== $(1) ====)\
diff --git a/core/product_config.mk b/core/product_config.mk
index 6449b9f..3a77d0b 100644
--- a/core/product_config.mk
+++ b/core/product_config.mk
@@ -500,3 +500,8 @@
# Whether the whitelist of actionable compatible properties should be disabled or not
PRODUCT_ACTIONABLE_COMPATIBLE_PROPERTY_DISABLE := \
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ACTIONABLE_COMPATIBLE_PROPERTY_DISABLE))
+
+# Logical and Resizable Partitions feature flag.
+PRODUCT_USE_LOGICAL_PARTITIONS := \
+ $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_USE_LOGICAL_PARTITIONS))
+.KATI_READONLY := PRODUCT_USE_LOGICAL_PARTITIONS
diff --git a/core/setup_one_odex.mk b/core/setup_one_odex.mk
index 907a379..92f58b2 100644
--- a/core/setup_one_odex.mk
+++ b/core/setup_one_odex.mk
@@ -78,12 +78,12 @@
my_stored_preopt_class_loader_context_libs := $(call normalize-path-list, \
$(foreach lib_name,$(my_filtered_uses_libraries),/system/framework/$(lib_name).jar))
- # Fix up org.apache.http.legacy.boot since it should be org.apache.http.legacy in the manifest.
- my_lib_names := $(patsubst org.apache.http.legacy.boot,org.apache.http.legacy,$(my_lib_names))
- my_optional_lib_names := $(patsubst org.apache.http.legacy.boot,org.apache.http.legacy,$(my_optional_lib_names))
+ # Fix up org.apache.http.legacy.impl since it should be org.apache.http.legacy in the manifest.
+ my_lib_names := $(patsubst org.apache.http.legacy.impl,org.apache.http.legacy,$(my_lib_names))
+ my_optional_lib_names := $(patsubst org.apache.http.legacy.impl,org.apache.http.legacy,$(my_optional_lib_names))
ifeq (,$(filter org.apache.http.legacy,$(my_lib_names) $(my_optional_lib_names)))
- my_conditional_uses_libraries_host := $(call intermediates-dir-for,JAVA_LIBRARIES,org.apache.http.legacy.boot,,COMMON)/javalib.jar
- my_conditional_uses_libraries_target := /system/framework/org.apache.http.legacy.boot.jar
+ my_conditional_uses_libraries_host := $(call intermediates-dir-for,JAVA_LIBRARIES,org.apache.http.legacy.impl,,COMMON)/javalib.jar
+ my_conditional_uses_libraries_target := /system/framework/org.apache.http.legacy.impl.jar
endif
endif
diff --git a/core/soong_config.mk b/core/soong_config.mk
index ea3714a..3f1fb66 100644
--- a/core/soong_config.mk
+++ b/core/soong_config.mk
@@ -143,8 +143,8 @@
$(call add_json_list, BoardVendorSepolicyDirs, $(BOARD_SEPOLICY_DIRS))
$(call add_json_list, BoardOdmSepolicyDirs, $(BOARD_ODM_SEPOLICY_DIRS))
-$(call add_json_str, BoardPlatPublicSepolicyDir, $(BOARD_PLAT_PUBLIC_SEPOLICY_DIR))
-$(call add_json_str, BoardPlatPrivateSepolicyDir, $(BOARD_PLAT_PRIVATE_SEPOLICY_DIR))
+$(call add_json_list, BoardPlatPublicSepolicyDirs, $(BOARD_PLAT_PUBLIC_SEPOLICY_DIR))
+$(call add_json_list, BoardPlatPrivateSepolicyDirs, $(BOARD_PLAT_PRIVATE_SEPOLICY_DIR))
_contents := $(_contents) "VendorVars": {$(newline)
$(foreach namespace,$(SOONG_CONFIG_NAMESPACES),\
diff --git a/core/static_java_library.mk b/core/static_java_library.mk
index 6eb94cd..2a87705 100644
--- a/core/static_java_library.mk
+++ b/core/static_java_library.mk
@@ -47,7 +47,7 @@
LOCAL_RESOURCE_DIR := $(foreach d,$(LOCAL_RESOURCE_DIR),$(call clean-path,$(d)))
endif
ifeq ($(LOCAL_USE_AAPT2),true)
-ifneq ($(LOCAL_STATIC_ANDROID_LIBRARIES),)
+ifneq ($(strip $(LOCAL_STATIC_ANDROID_LIBRARIES) $(LOCAL_STATIC_JAVA_AAR_LIBRARIES)),)
need_compile_res := true
endif
endif
@@ -120,7 +120,7 @@
endif
ifeq ($(LOCAL_USE_AAPT2),true)
-import_proguard_flag_files := $(strip $(foreach l,$(LOCAL_STATIC_ANDROID_LIBRARIES),\
+import_proguard_flag_files := $(strip $(foreach l,$(LOCAL_STATIC_ANDROID_LIBRARIES) $(LOCAL_STATIC_JAVA_AAR_LIBRARIES),\
$(call intermediates-dir-for,JAVA_LIBRARIES,$(l),,COMMON)/export_proguard_flags))
$(intermediates.COMMON)/export_proguard_flags: $(import_proguard_flag_files) $(addprefix $(LOCAL_PATH)/,$(LOCAL_EXPORT_PROGUARD_FLAG_FILES))
@echo "Export proguard flags: $@"
diff --git a/target/product/base.mk b/target/product/base.mk
index d6507c6..74514af 100644
--- a/target/product/base.mk
+++ b/target/product/base.mk
@@ -18,7 +18,7 @@
PRODUCT_PACKAGES += \
20-dns.conf \
95-configured \
- org.apache.http.legacy.boot \
+ org.apache.http.legacy \
appwidget \
appops \
am \
diff --git a/target/product/core.mk b/target/product/core.mk
index bbc2b75..90e15db 100644
--- a/target/product/core.mk
+++ b/target/product/core.mk
@@ -46,7 +46,6 @@
ManagedProvisioning \
MtpDocumentsProvider \
PacProcessor \
- libpac \
PrintSpooler \
PrintRecommendationService \
ProxyHandler \
diff --git a/target/product/core_minimal.mk b/target/product/core_minimal.mk
index 16599cb..8797248 100644
--- a/target/product/core_minimal.mk
+++ b/target/product/core_minimal.mk
@@ -116,7 +116,7 @@
telephony-common \
voip-common \
ims-common \
- org.apache.http.legacy.boot \
+ org.apache.http.legacy.impl \
android.hidl.base-V1.0-java \
android.hidl.manager-V1.0-java
diff --git a/target/product/core_tiny.mk b/target/product/core_tiny.mk
index 122f5c7..c6bc72c 100644
--- a/target/product/core_tiny.mk
+++ b/target/product/core_tiny.mk
@@ -103,7 +103,7 @@
voip-common \
ims-common \
nullwebview \
- org.apache.http.legacy.boot \
+ org.apache.http.legacy.impl \
android.hidl.base-V1.0-java \
android.hidl.manager-V1.0-java
diff --git a/target/product/treble_common.mk b/target/product/treble_common.mk
index 5352e77..7e0e2ae 100644
--- a/target/product/treble_common.mk
+++ b/target/product/treble_common.mk
@@ -76,15 +76,11 @@
PRODUCT_COPY_FILES += \
device/generic/common/nfc/libnfc-nci.conf:system/etc/libnfc-nci.conf
-# Support for the devices with no VNDK enforcing
+# Support for the O-MR1 devices
PRODUCT_COPY_FILES += \
build/make/target/product/vndk/init.gsi.rc:system/etc/init/init.gsi.rc \
- build/make/target/product/vndk/init.noenforce.rc:system/etc/init/gsi/init.noenforce.rc
+ build/make/target/product/vndk/init.vndk-27.rc:system/etc/init/gsi/init.vndk-27.rc
# Name space configuration file for non-enforcing VNDK
PRODUCT_PACKAGES += \
- ld.config.noenforce.txt
-
-# Set current VNDK version for GSI
-PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
- ro.gsi.vndk.version=$(PLATFORM_VNDK_VERSION)
+ ld.config.vndk_lite.txt
diff --git a/target/product/vndk/init.gsi.rc b/target/product/vndk/init.gsi.rc
index 3e6b1fb..0150b1a 100644
--- a/target/product/vndk/init.gsi.rc
+++ b/target/product/vndk/init.gsi.rc
@@ -1,2 +1,2 @@
-# If ro.vndk.version is not defined, import init.noenforce.rc
-import /system/etc/init/gsi/init.${ro.vndk.version:-noenforce}.rc
+# If ro.vndk.version is not defined, import init.vndk-27.rc.
+import /system/etc/init/gsi/init.vndk-${ro.vndk.version:-27}.rc
diff --git a/target/product/vndk/init.noenforce.rc b/target/product/vndk/init.noenforce.rc
deleted file mode 100644
index 6cf1df7..0000000
--- a/target/product/vndk/init.noenforce.rc
+++ /dev/null
@@ -1,5 +0,0 @@
-on early-init
- # If ro.vndk.version is not set, use ld.config.nonenforce.txt
- export LD_CONFIG_FILE /system/etc/ld.config.noenforce.txt
- # To use current VNDK libs, set ro.vndk.version to system vndk version
- setprop ro.vndk.version ${ro.gsi.vndk.version}
diff --git a/target/product/vndk/init.vndk-27.rc b/target/product/vndk/init.vndk-27.rc
new file mode 100644
index 0000000..d464a2f
--- /dev/null
+++ b/target/product/vndk/init.vndk-27.rc
@@ -0,0 +1,3 @@
+on early-init
+ # Set ro.vndk.version to 27 so that O-MR1-VENDOR can run latest GSI.
+ setprop ro.vndk.version 27