Merge "Replace build/tools with build/make/tools"
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 3ba1f45..1a84e8f 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -444,6 +444,12 @@
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/*/flat-res)
+# Remove old VNDK directories without version
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/vndk)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/vndk-sp)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/vndk)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/vndk-sp)
+
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************
diff --git a/core/Makefile b/core/Makefile
index dca2bc1..20d14d2 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -175,9 +175,13 @@
ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_VENDOR_DEFAULT_PROP_TARGET)
ifdef BOARD_VNDK_VERSION
-FINAL_VENDOR_DEFAULT_PROPERTIES := ro.vndk.version=${BOARD_VNDK_VERSION}
+ ifeq ($(BOARD_VNDK_VERSION),current)
+ FINAL_VENDOR_DEFAULT_PROPERTIES := ro.vndk.version=$(PLATFORM_VNDK_VERSION)
+ else
+ FINAL_VENDOR_DEFAULT_PROPERTIES := ro.vndk.version=$(BOARD_VNDK_VERSION)
+ endif
else
-FINAL_VENDOR_DEFAULT_PROPERTIES :=
+ FINAL_VENDOR_DEFAULT_PROPERTIES :=
endif
FINAL_VENDOR_DEFAULT_PROPERTIES += \
$(call collapse-pairs, $(PRODUCT_DEFAULT_PROPERTY_OVERRIDES))
@@ -1133,10 +1137,9 @@
recovery_sepolicy := \
$(TARGET_RECOVERY_ROOT_OUT)/sepolicy \
$(TARGET_RECOVERY_ROOT_OUT)/plat_file_contexts \
- $(TARGET_RECOVERY_ROOT_OUT)/vendor_file_contexts \
+ $(TARGET_RECOVERY_ROOT_OUT)/nonplat_file_contexts \
$(TARGET_RECOVERY_ROOT_OUT)/plat_property_contexts \
- $(TARGET_RECOVERY_ROOT_OUT)/vendor_property_contexts
-
+ $(TARGET_RECOVERY_ROOT_OUT)/nonplat_property_contexts
# Passed into rsync from non-recovery root to recovery root, to avoid overwriting recovery-specific
# SELinux files
IGNORE_RECOVERY_SEPOLICY := $(patsubst $(TARGET_RECOVERY_OUT)/%,--exclude=/%,$(recovery_sepolicy))
@@ -2167,6 +2170,7 @@
$(HOST_OUT_EXECUTABLES)/mksquashfs \
$(HOST_OUT_EXECUTABLES)/mkf2fsuserimg.sh \
$(HOST_OUT_EXECUTABLES)/make_f2fs \
+ $(HOST_OUT_EXECUTABLES)/sload_f2fs \
$(HOST_OUT_EXECUTABLES)/simg2img \
$(HOST_OUT_EXECUTABLES)/e2fsck \
$(HOST_OUT_EXECUTABLES)/build_verity_tree \
diff --git a/core/base_rules.mk b/core/base_rules.mk
index 7ce3f0f..dc3a78b 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -461,6 +461,36 @@
endif
###########################################################
+## Test Data
+###########################################################
+my_test_data_pairs :=
+my_installed_test_data :=
+# Source to relative dst file paths for reuse in LOCAL_COMPATIBILITY_SUITE.
+my_test_data_file_pairs :=
+
+ifneq ($(filter NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),)
+ifneq ($(strip $(LOCAL_TEST_DATA)),)
+ifneq (true,$(LOCAL_UNINSTALLABLE_MODULE))
+
+my_test_data_pairs := $(strip $(foreach td,$(LOCAL_TEST_DATA), \
+ $(eval _file := $(call word-colon,2,$(td))) \
+ $(if $(_file), \
+ $(eval _src_base := $(call word-colon,1,$(td))), \
+ $(eval _src_base := $(LOCAL_PATH)) \
+ $(eval _file := $(call word-colon,1,$(td)))) \
+ $(if $(findstring ..,$(_file)),$(error $(LOCAL_MODULE_MAKEFILE): LOCAL_TEST_DATA may not include '..': $(_file))) \
+ $(if $(filter /%,$(_src_base) $(_file)),$(error $(LOCAL_MODULE_MAKEFILE): LOCAL_TEST_DATA may not include absolute paths: $(_src_base) $(_file))) \
+ $(eval my_test_data_file_pairs := $(my_test_data_file_pairs) $(call append-path,$(_src_base),$(_file)):$(_file)) \
+ $(call append-path,$(_src_base),$(_file)):$(call append-path,$(my_module_path),$(_file))))
+
+my_installed_test_data := $(call copy-many-files,$(my_test_data_pairs))
+$(LOCAL_INSTALLED_MODULE): $(my_installed_test_data)
+
+endif
+endif
+endif
+
+###########################################################
## Compatibility suite files.
###########################################################
ifdef LOCAL_COMPATIBILITY_SUITE
@@ -522,38 +552,21 @@
endif
endif # $(my_prefix)$(LOCAL_MODULE_CLASS)_$(LOCAL_MODULE)_compat_files
+ifneq ($(my_test_data_file_pairs),)
+$(foreach pair, $(my_test_data_file_pairs), \
+ $(eval parts := $(subst :,$(space),$(pair))) \
+ $(eval src_path := $(word 1,$(parts))) \
+ $(eval file := $(word 2,$(parts))) \
+ $(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
+ $(eval my_compat_dist_$(suite) += $(foreach dir, $(call compatibility_suite_dirs,$(suite),$(arch_dir)), \
+ $(src_path):$(call append-path,$(dir),$(file))))))
+endif
+
$(call create-suite-dependencies)
endif # LOCAL_COMPATIBILITY_SUITE
###########################################################
-## Test Data
-###########################################################
-my_test_data_pairs :=
-my_installed_test_data :=
-
-ifneq ($(filter NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),)
-ifneq ($(strip $(LOCAL_TEST_DATA)),)
-ifneq (true,$(LOCAL_UNINSTALLABLE_MODULE))
-
-my_test_data_pairs := $(strip $(foreach td,$(LOCAL_TEST_DATA), \
- $(eval _file := $(call word-colon,2,$(td))) \
- $(if $(_file), \
- $(eval _base := $(call word-colon,1,$(td))), \
- $(eval _base := $(LOCAL_PATH)) \
- $(eval _file := $(call word-colon,1,$(td)))) \
- $(if $(findstring ..,$(_file)),$(error $(LOCAL_MODULE_MAKEFILE): LOCAL_TEST_DATA may not include '..': $(_file))) \
- $(if $(filter /%,$(_base) $(_file)),$(error $(LOCAL_MODULE_MAKEFILE): LOCAL_TEST_DATA may not include absolute paths: $(_base) $(_file))) \
- $(call append-path,$(_base),$(_file)):$(call append-path,$(my_module_path),$(_file))))
-
-my_installed_test_data := $(call copy-many-files,$(my_test_data_pairs))
-$(LOCAL_INSTALLED_MODULE): $(my_installed_test_data)
-
-endif
-endif
-endif
-
-###########################################################
## Register with ALL_MODULES
###########################################################
diff --git a/core/definitions.mk b/core/definitions.mk
index eb81578..405f7c6 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -2411,6 +2411,21 @@
$<
endef
+
+define transform-classes-d8.jar-to-dex
+@echo "target Dex: $(PRIVATE_MODULE)"
+@mkdir -p $(dir $@)
+$(hide) rm -rf $(dir $@)classes*.dex $(dir $@)*.class $(dir $@)d8_input
+$(hide) unzip -qq -d $(dir $@)d8_input $< "*.class"
+$(hide) $(DX_COMMAND) \
+ --output $(dir $@) \
+ --min-api $(PRIVATE_MIN_SDK_VERSION) \
+ $(subst --no-locals, --release, \
+ $(filter-out --core-library --multi-dex,$(PRIVATE_DX_FLAGS))) \
+ $$(find $(dir $@)d8_input -name *.class | sort)
+$(hide) rm -fr $(dir $@)d8_input
+endef
+
# Create a mostly-empty .jar file that we'll add to later.
# The MacOS jar tool doesn't like creating empty jar files,
# so we need to give it something.
diff --git a/core/envsetup.mk b/core/envsetup.mk
index e220fae..89a39a8 100644
--- a/core/envsetup.mk
+++ b/core/envsetup.mk
@@ -292,7 +292,7 @@
ifdef BOARD_VNDK_VERSION
ifneq ($(BOARD_VNDK_VERSION),current)
- $(call check_vndk_version,$(BOARD_VNDK_VERSION))
+ $(error BOARD_VNDK_VERSION: Only "current" is implemented)
endif
TARGET_VENDOR_TEST_SUFFIX := /vendor
diff --git a/core/host_dalvik_java_library.mk b/core/host_dalvik_java_library.mk
index 1b3f967..4b12bfe 100644
--- a/core/host_dalvik_java_library.mk
+++ b/core/host_dalvik_java_library.mk
@@ -150,6 +150,7 @@
$(eval $(call copy-one-file,$(full_classes_jarjar_jar),$(full_classes_jar)))
+ifneq ($(USE_D8_DESUGAR),true)
my_desugaring :=
ifeq ($(LOCAL_JAVA_LANGUAGE_VERSION),1.8)
my_desugaring := true
@@ -157,6 +158,9 @@
$(full_classes_desugar_jar): $(full_classes_jar) $(full_java_header_libs) $(DESUGAR)
$(desugar-classes-jar)
endif
+else
+my_desugaring :=
+endif
ifndef my_desugaring
full_classes_desugar_jar := $(full_classes_jar)
@@ -173,7 +177,11 @@
$(built_dex): PRIVATE_INTERMEDIATES_DIR := $(intermediates.COMMON)
$(built_dex): PRIVATE_DX_FLAGS := $(LOCAL_DX_FLAGS)
$(built_dex): $(full_classes_desugar_jar) $(DX)
+ifneq ($(USE_D8_DESUGAR),true)
$(transform-classes.jar-to-dex)
+else
+ $(transform-classes-d8.jar-to-dex)
+endif
$(LOCAL_BUILT_MODULE): PRIVATE_DEX_FILE := $(built_dex)
$(LOCAL_BUILT_MODULE): PRIVATE_SOURCE_ARCHIVE := $(full_classes_jarjar_jar)
diff --git a/core/java.mk b/core/java.mk
index 2e13ab8..08e4035 100644
--- a/core/java.mk
+++ b/core/java.mk
@@ -574,6 +574,7 @@
LOCAL_DX_FLAGS := $(filter-out --multi-dex,$(LOCAL_DX_FLAGS)) --multi-dex
endif
+ifneq ($(USE_D8_DESUGAR),true)
my_desugaring :=
ifndef LOCAL_IS_STATIC_JAVA_LIBRARY
my_desugaring := true
@@ -581,6 +582,9 @@
$(full_classes_desugar_jar): $(full_classes_jar) $(full_java_header_libs) $(DESUGAR)
$(desugar-classes-jar)
endif
+else
+my_desugaring :=
+endif
ifndef my_desugaring
full_classes_desugar_jar := $(full_classes_jar)
@@ -774,7 +778,11 @@
ifndef my_r8
$(built_dex_intermediate): $(full_classes_proguard_jar) $(DX)
+ifneq ($(USE_D8_DESUGAR),true)
$(transform-classes.jar-to-dex)
+else
+ $(transform-classes-d8.jar-to-dex)
+endif
endif
$(built_dex): $(built_dex_intermediate)
diff --git a/core/main.mk b/core/main.mk
index cac9c59..621d309 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -1052,7 +1052,8 @@
$(INSTALLED_SYSTEMOTHERIMAGE_TARGET) \
$(INSTALLED_FILES_FILE) \
$(INSTALLED_FILES_FILE_VENDOR) \
- $(INSTALLED_FILES_FILE_SYSTEMOTHER)
+ $(INSTALLED_FILES_FILE_SYSTEMOTHER) \
+ soong_docs
# dist_files only for putting your library into the dist directory with a full build.
.PHONY: dist_files
diff --git a/core/soong_config.mk b/core/soong_config.mk
index f1f1e09..b9b9cbe 100644
--- a/core/soong_config.mk
+++ b/core/soong_config.mk
@@ -112,6 +112,7 @@
$(call add_json_bool, DevicePrefer32BitExecutables, $(filter true,$(TARGET_PREFER_32_BIT_EXECUTABLES)))
$(call add_json_val, DeviceUsesClang, $(if $(USE_CLANG_PLATFORM_BUILD),$(USE_CLANG_PLATFORM_BUILD),false))
$(call add_json_str, DeviceVndkVersion, $(BOARD_VNDK_VERSION))
+$(call add_json_str, Platform_vndk_version, $(PLATFORM_VNDK_VERSION))
$(call add_json_list, ExtraVndkVersions, $(PRODUCT_EXTRA_VNDK_VERSIONS))
$(call add_json_bool, Malloc_not_svelte, $(call invert_bool,$(filter true,$(MALLOC_SVELTE))))
$(call add_json_str, Override_rs_driver, $(OVERRIDE_RS_DRIVER))
diff --git a/core/tasks/device-tests.mk b/core/tasks/device-tests.mk
index d679c59..a2b626e 100644
--- a/core/tasks/device-tests.mk
+++ b/core/tasks/device-tests.mk
@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
-# Unless required by applicable law or agrls eed to in writing, software
+# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
@@ -16,14 +16,23 @@
.PHONY: device-tests
device-tests-zip := $(PRODUCT_OUT)/device-tests.zip
-$(device-tests-zip): $(COMPATIBILITY.device-tests.FILES) $(SOONG_ZIP)
+# Create an artifact to include a list of test config files in device-tests.
+device-tests-list-zip := $(PRODUCT_OUT)/device-tests_list.zip
+$(device-tests-zip) : .KATI_IMPLICIT_OUTPUTS := $(device-tests-list-zip)
+$(device-tests-zip) : PRIVATE_device_tests_list := $(PRODUCT_OUT)/device-tests_list
+
+$(device-tests-zip) : $(COMPATIBILITY.device-tests.FILES) $(SOONG_ZIP)
echo $(sort $(COMPATIBILITY.device-tests.FILES)) | tr " " "\n" > $@.list
grep $(HOST_OUT_TESTCASES) $@.list > $@-host.list || true
grep $(TARGET_OUT_TESTCASES) $@.list > $@-target.list || true
$(hide) $(SOONG_ZIP) -d -o $@ -P host -C $(HOST_OUT) -l $@-host.list -P target -C $(PRODUCT_OUT) -l $@-target.list
- rm -f $@.list $@-host.list $@-target.list
+ rm -f $(PRIVATE_device_tests_list)
+ $(hide) grep -e .*.config$$ $@-host.list | sed s%$(HOST_OUT)%host%g > $(PRIVATE_device_tests_list)
+ $(hide) grep -e .*.config$$ $@-target.list | sed s%$(PRODUCT_OUT)%target%g >> $(PRIVATE_device_tests_list)
+ $(hide) $(SOONG_ZIP) -d -o $(device-tests-list-zip) -C $(dir $@) -f $(PRIVATE_device_tests_list)
+ rm -f $@.list $@-host.list $@-target.list $(PRIVATE_device_tests_list)
device-tests: $(device-tests-zip)
-$(call dist-for-goals, device-tests, $(device-tests-zip))
+$(call dist-for-goals, device-tests, $(device-tests-zip) $(device-tests-list-zip))
tests: device-tests
diff --git a/core/tasks/general-tests.mk b/core/tasks/general-tests.mk
index bf4eb1d..c7f1dc9 100644
--- a/core/tasks/general-tests.mk
+++ b/core/tasks/general-tests.mk
@@ -6,7 +6,7 @@
#
# http://www.apache.org/licenses/LICENSE-2.0
#
-# Unless required by applicable law or agrls eed to in writing, software
+# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
@@ -15,12 +15,21 @@
.PHONY: general-tests
general-tests-zip := $(PRODUCT_OUT)/general-tests.zip
-$(general-tests-zip): $(COMPATIBILITY.general-tests.FILES) $(SOONG_ZIP)
+# Create an artifact to include a list of test config files in general-tests.
+general-tests-list-zip := $(PRODUCT_OUT)/general-tests_list.zip
+$(general-tests-zip) : .KATI_IMPLICIT_OUTPUTS := $(general-tests-list-zip)
+$(general-tests-zip) : PRIVATE_general_tests_list := $(PRODUCT_OUT)/general-tests_list
+
+$(general-tests-zip) : $(COMPATIBILITY.general-tests.FILES) $(SOONG_ZIP)
echo $(sort $(COMPATIBILITY.general-tests.FILES)) | tr " " "\n" > $@.list
grep $(HOST_OUT_TESTCASES) $@.list > $@-host.list || true
grep $(TARGET_OUT_TESTCASES) $@.list > $@-target.list || true
$(hide) $(SOONG_ZIP) -d -o $@ -P host -C $(HOST_OUT) -l $@-host.list -P target -C $(PRODUCT_OUT) -l $@-target.list
- rm -f $@.list $@-host.list $@-target.list
+ rm -f $(PRIVATE_general_tests_list)
+ $(hide) grep -e .*.config$$ $@-host.list | sed s%$(HOST_OUT)%host%g > $(PRIVATE_general_tests_list)
+ $(hide) grep -e .*.config$$ $@-target.list | sed s%$(PRODUCT_OUT)%target%g >> $(PRIVATE_general_tests_list)
+ $(hide) $(SOONG_ZIP) -d -o $(general-tests-list-zip) -C $(dir $@) -f $(PRIVATE_general_tests_list)
+ rm -f $@.list $@-host.list $@-target.list $(PRIVATE_general_tests_list)
general-tests: $(general-tests-zip)
-$(call dist-for-goals, general-tests, $(general-tests-zip))
+$(call dist-for-goals, general-tests, $(general-tests-zip) $(general-tests-list-zip))
diff --git a/core/tasks/test_mapping.mk b/core/tasks/test_mapping.mk
new file mode 100644
index 0000000..36275b0
--- /dev/null
+++ b/core/tasks/test_mapping.mk
@@ -0,0 +1,34 @@
+# Copyright (C) 2017 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Create an artifact to include TEST_MAPPING files in source tree.
+
+.PHONY: test_mapping
+
+intermediates := $(call intermediates-dir-for,PACKAGING,test_mapping)
+test_mappings_zip := $(intermediates)/test_mappings.zip
+test_mapping_list := $(OUT_DIR)/.module_paths/TEST_MAPPING.list
+test_mappings := $(file <$(test_mapping_list))
+$(test_mappings_zip) : PRIVATE_test_mappings := $(subst $(newline),\n,$(test_mappings))
+
+$(test_mappings_zip) : $(test_mappings) $(SOONG_ZIP)
+ @echo "Building artifact to include TEST_MAPPING files."
+ rm -rf $@
+ echo -e "$(PRIVATE_test_mappings)" > $@.list
+ $(SOONG_ZIP) -o $@ -C . -l $@.list
+ rm -f $@.list
+
+test_mapping : $(test_mappings_zip)
+
+$(call dist-for-goals, dist_files test_mapping,$(test_mappings_zip))
diff --git a/core/tasks/tradefed-tests-list.mk b/core/tasks/tradefed-tests-list.mk
new file mode 100644
index 0000000..3b5f5da
--- /dev/null
+++ b/core/tasks/tradefed-tests-list.mk
@@ -0,0 +1,36 @@
+# Copyright (C) 2017 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# List all TradeFed tests from COMPATIBILITY.tradefed_tests_dir
+.PHONY: tradefed-tests-list
+
+tradefed_tests :=
+$(foreach dir, $(COMPATIBILITY.tradefed_tests_dir), \
+ $(eval tradefed_tests += $(shell find $(dir) -type f -name "*.xml")))
+tradefed_tests_list_intermediates := $(call intermediates-dir-for,PACKAGING,tradefed_tests_list,HOST,COMMON)
+tradefed_tests_list_zip := $(tradefed_tests_list_intermediates)/tradefed-tests-list.zip
+all_tests :=
+$(foreach test, $(tradefed_tests), \
+ $(eval all_tests += $(word 2,$(subst /res/config/,$(space),$(test)))))
+$(tradefed_tests_list_zip) : PRIVATE_tradefed_tests := $(subst .xml,,$(subst $(space),\n,$(sort $(all_tests))))
+$(tradefed_tests_list_zip) : PRIVATE_tradefed_tests_list := $(tradefed_tests_list_intermediates)/tradefed-tests-list
+
+$(tradefed_tests_list_zip) : $(tradefed_tests) $(SOONG_ZIP)
+ @echo "Package: $@"
+ $(hide) rm -rf $(dir $@) && mkdir -p $(dir $@)
+ $(hide) echo -e "$(PRIVATE_tradefed_tests)" > $(PRIVATE_tradefed_tests_list)
+ $(hide) $(SOONG_ZIP) -d -o $@ -C $(dir $@) -f $(PRIVATE_tradefed_tests_list)
+
+tradefed-tests-list : $(tradefed_tests_list_zip)
+$(call dist-for-goals, tradefed-tests-list, $(tradefed_tests_list_zip))
diff --git a/core/version_defaults.mk b/core/version_defaults.mk
index ca7401b..32d9003 100644
--- a/core/version_defaults.mk
+++ b/core/version_defaults.mk
@@ -26,6 +26,7 @@
# BUILD_NUMBER
# BUILD_DATETIME
# PLATFORM_SECURITY_PATCH
+# PLATFORM_VNDK_VERSION
#
# Look for an optional file containing overrides of the defaults,
@@ -183,6 +184,23 @@
endif
endif
+ifndef PLATFORM_VNDK_VERSION
+ # This is the definition of the VNDK version for the current VNDK libraries.
+ # The version is only available when PLATFORM_VERSION_CODENAME == REL.
+ # Otherwise, it will be set to "current". The ABI is allowed to be changed
+ # only if PLATFORM_VNDK_VERSION == current. Once PLATFORM_VNDK_VERSION is set
+ # to actual version, the ABI for this version will be frozon and emit build
+ # errors if any ABI for the VNDK libs are changed.
+ # After that the snapshot of the VNDK with this version will be generated.
+ #
+ # The version follows PLATFORM_SDK_VERSION.
+ ifeq (REL,$(PLATFORM_VERSION_CODENAME))
+ PLATFORM_VNDK_VERSION := $(PLATFORM_SDK_VERSION)
+ else
+ PLATFORM_VNDK_VERSION := current
+ endif
+endif
+
ifndef PLATFORM_SECURITY_PATCH
# Used to indicate the security patch that has been applied to the device.
# It must signify that the build includes all security patches issued up through the designated Android Public Security Bulletin.
diff --git a/envsetup.sh b/envsetup.sh
index 9a616ef..394df65 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -318,7 +318,12 @@
function settitle()
{
- if [ "$STAY_OFF_MY_LAWN" = "" ]; then
+ # This used to be opt-out with STAY_OFF_MY_LAWN, but this breaks folks
+ # actually using PROMPT_COMMAND (https://issuetracker.google.com/38402256),
+ # and the attempt to set the title doesn't do anything for the default
+ # window manager in debian right now, so switch it to opt-in for anyone
+ # who actually wants this.
+ if [ "$ANDROID_BUILD_SET_WINDOW_TITLE" = "true" ]; then
local arch=$(gettargetarch)
local product=$TARGET_PRODUCT
local variant=$TARGET_BUILD_VARIANT
diff --git a/target/board/generic_x86/BoardConfig.mk b/target/board/generic_x86/BoardConfig.mk
index 0b39af1..f8fb88f 100644
--- a/target/board/generic_x86/BoardConfig.mk
+++ b/target/board/generic_x86/BoardConfig.mk
@@ -56,6 +56,8 @@
build/target/board/generic/sepolicy \
build/target/board/generic_x86/sepolicy
+BOARD_VNDK_VERSION := current
+
# Enable A/B update
TARGET_NO_RECOVERY := true
BOARD_BUILD_SYSTEM_ROOT_IMAGE := true
diff --git a/target/board/generic_x86_64/BoardConfig.mk b/target/board/generic_x86_64/BoardConfig.mk
index 3a4bde6..aea1a0a 100755
--- a/target/board/generic_x86_64/BoardConfig.mk
+++ b/target/board/generic_x86_64/BoardConfig.mk
@@ -59,6 +59,8 @@
build/target/board/generic/sepolicy \
build/target/board/generic_x86/sepolicy
+BOARD_VNDK_VERSION := current
+
# Enable A/B update
TARGET_NO_RECOVERY := true
BOARD_BUILD_SYSTEM_ROOT_IMAGE := true
diff --git a/target/board/treble_common.mk b/target/board/treble_common.mk
index 253d8ef..44f601f 100644
--- a/target/board/treble_common.mk
+++ b/target/board/treble_common.mk
@@ -19,7 +19,6 @@
# VNDK
BOARD_VNDK_VERSION := current
-BOARD_VNDK_RUNTIME_DISABLE := true
# Properties
TARGET_SYSTEM_PROP := build/make/target/board/treble_system.prop
diff --git a/target/product/treble_common.mk b/target/product/treble_common.mk
index 13b7769..2377188 100644
--- a/target/product/treble_common.mk
+++ b/target/product/treble_common.mk
@@ -26,6 +26,10 @@
# Split selinux policy
PRODUCT_FULL_TREBLE_OVERRIDE := true
+# vintf utility:
+PRODUCT_PACKAGES += \
+ vintf
+
# The Messaging app:
# Needed for android.telecom.cts.ExtendedInCallServiceTest#testOnCannedTextResponsesLoaded
PRODUCT_PACKAGES += \
@@ -63,6 +67,11 @@
PRODUCT_PACKAGES += \
netutils-wrapper-1.0
+# Telephony:
+# Provide a default APN configuration
+PRODUCT_COPY_FILES += \
+ device/generic/goldfish/data/etc/apns-conf.xml:system/etc/apns-conf.xml
+
# Android Verified Boot (AVB):
# Builds a special vbmeta.img that disables AVB verification.
# Otherwise, AVB will prevent the device from booting the generic system.img.
diff --git a/target/product/vndk/Android.mk b/target/product/vndk/Android.mk
index d2d9562..ea8c95e 100644
--- a/target/product/vndk/Android.mk
+++ b/target/product/vndk/Android.mk
@@ -2,25 +2,6 @@
LOCAL_PATH:= $(call my-dir)
#####################################################################
-# Setting the VNDK version. Version is 10000.0 for not-yet-published
-# platform and xx.y for released platform.
-vndk_major_ver := 10000
-vndk_minor_ver := 0
-
-#TODO(b/68027291): Revive this check when we have stable VNDK in P or later.
-#ifneq ($(vndk_major_ver), $(PLATFORM_SDK_VERSION))
-#$(error vndk_major_version does not match PLATFORM_SDK_VERSION, please update.)
-#endif
-
-ifneq (REL,$(PLATFORM_VERSION_CODENAME))
- vndk_major_ver := 10000
- vndk_minor_ver := 0
-endif
-PLATFORM_VNDK_VERSION := $(vndk_major_ver).$(vndk_minor_ver)
-vndk_major_ver :=
-vndk_minor_ver :=
-
-#####################################################################
# Create the list of vndk libraries from the source code.
INTERNAL_VNDK_LIB_LIST := $(call intermediates-dir-for,PACKAGING,vndk)/libs.txt
$(INTERNAL_VNDK_LIB_LIST):
diff --git a/tools/releasetools/build_image.py b/tools/releasetools/build_image.py
index e11f5a6..e4e4138 100755
--- a/tools/releasetools/build_image.py
+++ b/tools/releasetools/build_image.py
@@ -517,6 +517,17 @@
elif fs_type.startswith("f2fs"):
build_command = ["mkf2fsuserimg.sh"]
build_command.extend([out_file, prop_dict["partition_size"]])
+ if fs_config:
+ build_command.extend(["-C", fs_config])
+ build_command.extend(["-f", in_dir])
+ if target_out:
+ build_command.extend(["-D", target_out])
+ if "selinux_fc" in prop_dict:
+ build_command.extend(["-s", prop_dict["selinux_fc"]])
+ build_command.extend(["-t", prop_dict["mount_point"]])
+ if "timestamp" in prop_dict:
+ build_command.extend(["-T", str(prop_dict["timestamp"])])
+ build_command.extend(["-L", prop_dict["mount_point"]])
else:
print("Error: unknown filesystem type '%s'" % (fs_type))
return False
@@ -548,6 +559,7 @@
if base_fs_file is not None:
os.remove(base_fs_file)
if exit_code != 0:
+ print("Error: '%s' failed with exit code %d" % (build_command, exit_code))
return False
# Bug: 21522719, 22023465
@@ -625,7 +637,11 @@
os.remove(unsparse_image)
- return exit_code == 0
+ if exit_code != 0:
+ print("Error: '%s' failed with exit code %d" % (e2fsck_command, exit_code))
+ return False
+
+ return True
def ImagePropFromGlobalDict(glob_dict, mount_point):