Merge "Use zip2zip to copy zipfiles" am: a59e5b7a29 am: 8c53b320ed am: aa651b93b0
Original change: https://android-review.googlesource.com/c/platform/build/+/2439632
Change-Id: Ief204dd1aa12629b03e28e3315b7d3bfd4025ad9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/core/Makefile b/core/Makefile
index b05a099..33c8dbf 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -7094,17 +7094,9 @@
haiku: $(SOONG_FUZZ_PACKAGING_ARCH_MODULES) $(ALL_FUZZ_TARGETS)
$(call dist-for-goals,haiku,$(SOONG_FUZZ_PACKAGING_ARCH_MODULES))
$(call dist-for-goals,haiku,$(PRODUCT_OUT)/module-info.json)
-
-.PHONY: haiku-java-device
-haiku-java-device: $(SOONG_JAVA_FUZZ_DEVICE_PACKAGING_ARCH_MODULES) $(ALL_JAVA_FUZZ_DEVICE_TARGETS)
-$(call dist-for-goals,haiku-java-device,$(SOONG_JAVA_FUZZ_DEVICE_PACKAGING_ARCH_MODULES))
-$(call dist-for-goals,haiku-java-device,$(PRODUCT_OUT)/module-info.json)
-
-.PHONY: haiku-java-host
-haiku-java-host: $(SOONG_JAVA_FUZZ_HOST_PACKAGING_ARCH_MODULES) $(ALL_JAVA_FUZZ_HOST_TARGETS)
-$(call dist-for-goals,haiku-java-host,$(SOONG_JAVA_FUZZ_HOST_PACKAGING_ARCH_MODULES))
-$(call dist-for-goals,haiku-java-host,$(PRODUCT_OUT)/module-info.json)
-
+.PHONY: haiku-java
+haiku-java: $(SOONG_JAVA_FUZZ_PACKAGING_ARCH_MODULES) $(ALL_JAVA_FUZZ_TARGETS)
+$(call dist-for-goals,haiku-java,$(SOONG_JAVA_FUZZ_PACKAGING_ARCH_MODULES))
.PHONY: haiku-rust
haiku-rust: $(SOONG_RUST_FUZZ_PACKAGING_ARCH_MODULES) $(ALL_RUST_FUZZ_TARGETS)
$(call dist-for-goals,haiku-rust,$(SOONG_RUST_FUZZ_PACKAGING_ARCH_MODULES))
diff --git a/core/build_id.mk b/core/build_id.mk
index a489788..2f9c3f3 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.
-BUILD_ID=TM
+BUILD_ID=MASTER
diff --git a/core/generate_enforce_rro.mk b/core/generate_enforce_rro.mk
index 9079981..ed258cc 100644
--- a/core/generate_enforce_rro.mk
+++ b/core/generate_enforce_rro.mk
@@ -38,7 +38,7 @@
LOCAL_FULL_MANIFEST_FILE := $(rro_android_manifest_file)
-LOCAL_AAPT_FLAGS += --auto-add-overlay
+LOCAL_AAPT_FLAGS += --auto-add-overlay --keep-raw-values
LOCAL_RESOURCE_DIR := $(enforce_rro_source_overlays)
ifeq (product,$(enforce_rro_partition))
diff --git a/core/tasks/automotive-general-tests.mk b/core/tasks/automotive-general-tests.mk
new file mode 100644
index 0000000..44b62be
--- /dev/null
+++ b/core/tasks/automotive-general-tests.mk
@@ -0,0 +1,89 @@
+# Copyright (C) 2022 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.
+
+.PHONY: automotive-general-tests
+
+automotive_general_tests_tools := \
+ $(HOST_OUT_JAVA_LIBRARIES)/cts-tradefed.jar \
+ $(HOST_OUT_JAVA_LIBRARIES)/compatibility-host-util.jar \
+ $(HOST_OUT_JAVA_LIBRARIES)/vts-tradefed.jar \
+
+intermediates_dir := $(call intermediates-dir-for,PACKAGING,automotive-general-tests)
+automotive_general_tests_zip := $(PRODUCT_OUT)/automotive-general-tests.zip
+# Create an artifact to include a list of test config files in automotive-general-tests.
+automotive_general_tests_list_zip := $(PRODUCT_OUT)/automotive-general-tests_list.zip
+
+# Filter shared entries between automotive-general-tests and automotive-tests's HOST_SHARED_LIBRARY.FILES,
+# to avoid warning about overriding commands.
+my_host_shared_lib_for_automotive_general_tests := \
+ $(foreach m,$(filter $(COMPATIBILITY.automotive-tests.HOST_SHARED_LIBRARY.FILES),\
+ $(COMPATIBILITY.automotive-general-tests.HOST_SHARED_LIBRARY.FILES)),$(call word-colon,2,$(m)))
+my_automotive_general_tests_shared_lib_files := \
+ $(filter-out $(COMPATIBILITY.automotive-tests.HOST_SHARED_LIBRARY.FILES),\
+ $(COMPATIBILITY.automotive-general-tests.HOST_SHARED_LIBRARY.FILES))
+
+my_host_shared_lib_for_automotive_general_tests += $(call copy-many-files,$(my_automotive_general_tests_shared_lib_files))
+
+# Create an artifact to include all test config files in automotive-general-tests.
+automotive_general_tests_configs_zip := $(PRODUCT_OUT)/automotive-general-tests_configs.zip
+# Create an artifact to include all shared librariy files in automotive-general-tests.
+automotive_general_tests_host_shared_libs_zip := $(PRODUCT_OUT)/automotive-general-tests_host-shared-libs.zip
+
+$(automotive_general_tests_zip) : PRIVATE_automotive_general_tests_list_zip := $(automotive_general_tests_list_zip)
+$(automotive_general_tests_zip) : .KATI_IMPLICIT_OUTPUTS := $(automotive_general_tests_list_zip) $(automotive_general_tests_configs_zip) $(automotive_general_tests_host_shared_libs_zip)
+$(automotive_general_tests_zip) : PRIVATE_TOOLS := $(automotive_general_tests_tools)
+$(automotive_general_tests_zip) : PRIVATE_INTERMEDIATES_DIR := $(intermediates_dir)
+$(automotive_general_tests_zip) : PRIVATE_HOST_SHARED_LIBS := $(my_host_shared_lib_for_automotive_general_tests)
+$(automotive_general_tests_zip) : PRIVATE_automotive_general_tests_configs_zip := $(automotive_general_tests_configs_zip)
+$(automotive_general_tests_zip) : PRIVATE_general_host_shared_libs_zip := $(automotive_general_tests_host_shared_libs_zip)
+$(automotive_general_tests_zip) : $(COMPATIBILITY.automotive-general-tests.FILES) $(automotive_general_tests_tools) $(my_host_shared_lib_for_automotive_general_tests) $(SOONG_ZIP)
+ rm -rf $(PRIVATE_INTERMEDIATES_DIR)
+ rm -f $@ $(PRIVATE_automotive_general_tests_list_zip)
+ mkdir -p $(PRIVATE_INTERMEDIATES_DIR) $(PRIVATE_INTERMEDIATES_DIR)/tools
+ echo $(sort $(COMPATIBILITY.automotive-general-tests.FILES)) | tr " " "\n" > $(PRIVATE_INTERMEDIATES_DIR)/list
+ grep $(HOST_OUT_TESTCASES) $(PRIVATE_INTERMEDIATES_DIR)/list > $(PRIVATE_INTERMEDIATES_DIR)/host.list || true
+ grep $(TARGET_OUT_TESTCASES) $(PRIVATE_INTERMEDIATES_DIR)/list > $(PRIVATE_INTERMEDIATES_DIR)/target.list || true
+ grep -e .*\\.config$$ $(PRIVATE_INTERMEDIATES_DIR)/host.list > $(PRIVATE_INTERMEDIATES_DIR)/host-test-configs.list || true
+ grep -e .*\\.config$$ $(PRIVATE_INTERMEDIATES_DIR)/target.list > $(PRIVATE_INTERMEDIATES_DIR)/target-test-configs.list || true
+ $(hide) for shared_lib in $(PRIVATE_HOST_SHARED_LIBS); do \
+ echo $$shared_lib >> $(PRIVATE_INTERMEDIATES_DIR)/host.list; \
+ echo $$shared_lib >> $(PRIVATE_INTERMEDIATES_DIR)/shared-libs.list; \
+ done
+ grep $(HOST_OUT_TESTCASES) $(PRIVATE_INTERMEDIATES_DIR)/shared-libs.list > $(PRIVATE_INTERMEDIATES_DIR)/host-shared-libs.list || true
+ cp -fp $(PRIVATE_TOOLS) $(PRIVATE_INTERMEDIATES_DIR)/tools/
+ $(SOONG_ZIP) -d -o $@ \
+ -P host -C $(PRIVATE_INTERMEDIATES_DIR) -D $(PRIVATE_INTERMEDIATES_DIR)/tools \
+ -P host -C $(HOST_OUT) -l $(PRIVATE_INTERMEDIATES_DIR)/host.list \
+ -P target -C $(PRODUCT_OUT) -l $(PRIVATE_INTERMEDIATES_DIR)/target.list
+ $(SOONG_ZIP) -d -o $(PRIVATE_automotive_general_tests_configs_zip) \
+ -P host -C $(HOST_OUT) -l $(PRIVATE_INTERMEDIATES_DIR)/host-test-configs.list \
+ -P target -C $(PRODUCT_OUT) -l $(PRIVATE_INTERMEDIATES_DIR)/target-test-configs.list
+ $(SOONG_ZIP) -d -o $(PRIVATE_general_host_shared_libs_zip) \
+ -P host -C $(HOST_OUT) -l $(PRIVATE_INTERMEDIATES_DIR)/host-shared-libs.list
+ grep -e .*\\.config$$ $(PRIVATE_INTERMEDIATES_DIR)/host.list | sed s%$(HOST_OUT)%host%g > $(PRIVATE_INTERMEDIATES_DIR)/automotive-general-tests_list
+ grep -e .*\\.config$$ $(PRIVATE_INTERMEDIATES_DIR)/target.list | sed s%$(PRODUCT_OUT)%target%g >> $(PRIVATE_INTERMEDIATES_DIR)/automotive-general-tests_list
+ $(SOONG_ZIP) -d -o $(PRIVATE_automotive_general_tests_list_zip) -C $(PRIVATE_INTERMEDIATES_DIR) -f $(PRIVATE_INTERMEDIATES_DIR)/automotive-general-tests_list
+
+automotive-general-tests: $(automotive_general_tests_zip)
+$(call dist-for-goals, automotive-general-tests, $(automotive_general_tests_zip) $(automotive_general_tests_list_zip) $(automotive_general_tests_configs_zip) $(automotive_general_tests_host_shared_libs_zip))
+
+$(call declare-1p-container,$(automotive_general_tests_zip),)
+$(call declare-container-license-deps,$(automotive_general_tests_zip),$(COMPATIBILITY.automotive-general-tests.FILES) $(automotive_general_tests_tools) $(my_host_shared_lib_for_automotive_general_tests),$(PRODUCT_OUT)/:/)
+
+intermediates_dir :=
+automotive_general_tests_tools :=
+automotive_general_tests_zip :=
+automotive_general_tests_list_zip :=
+automotive_general_tests_configs_zip :=
+automotive_general_tests_host_shared_libs_zip :=
diff --git a/core/tasks/automotive-tests.mk b/core/tasks/automotive-tests.mk
new file mode 100644
index 0000000..da6af6b
--- /dev/null
+++ b/core/tasks/automotive-tests.mk
@@ -0,0 +1,61 @@
+# Copyright (C) 2022 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.
+
+
+.PHONY: automotive-tests
+
+automotive-tests-zip := $(PRODUCT_OUT)/automotive-tests.zip
+# Create an artifact to include a list of test config files in automotive-tests.
+automotive-tests-list-zip := $(PRODUCT_OUT)/automotive-tests_list.zip
+# Create an artifact to include all test config files in automotive-tests.
+automotive-tests-configs-zip := $(PRODUCT_OUT)/automotive-tests_configs.zip
+my_host_shared_lib_for_automotive_tests := $(call copy-many-files,$(COMPATIBILITY.automotive-tests.HOST_SHARED_LIBRARY.FILES))
+automotive_tests_host_shared_libs_zip := $(PRODUCT_OUT)/automotive-tests_host-shared-libs.zip
+
+$(automotive-tests-zip) : .KATI_IMPLICIT_OUTPUTS := $(automotive-tests-list-zip) $(automotive-tests-configs-zip) $(automotive_tests_host_shared_libs_zip)
+$(automotive-tests-zip) : PRIVATE_automotive_tests_list := $(PRODUCT_OUT)/automotive-tests_list
+$(automotive-tests-zip) : PRIVATE_HOST_SHARED_LIBS := $(my_host_shared_lib_for_automotive_tests)
+$(automotive-tests-zip) : PRIVATE_automotive_host_shared_libs_zip := $(automotive_tests_host_shared_libs_zip)
+$(automotive-tests-zip) : $(COMPATIBILITY.automotive-tests.FILES) $(my_host_shared_lib_for_automotive_tests) $(SOONG_ZIP)
+ rm -f $@-shared-libs.list
+ echo $(sort $(COMPATIBILITY.automotive-tests.FILES)) | tr " " "\n" > $@.list
+ grep $(HOST_OUT_TESTCASES) $@.list > $@-host.list || true
+ grep -e .*\\.config$$ $@-host.list > $@-host-test-configs.list || true
+ $(hide) for shared_lib in $(PRIVATE_HOST_SHARED_LIBS); do \
+ echo $$shared_lib >> $@-host.list; \
+ echo $$shared_lib >> $@-shared-libs.list; \
+ done
+ grep $(HOST_OUT_TESTCASES) $@-shared-libs.list > $@-host-shared-libs.list || true
+ grep $(TARGET_OUT_TESTCASES) $@.list > $@-target.list || true
+ grep -e .*\\.config$$ $@-target.list > $@-target-test-configs.list || true
+ $(hide) $(SOONG_ZIP) -d -o $@ -P host -C $(HOST_OUT) -l $@-host.list -P target -C $(PRODUCT_OUT) -l $@-target.list
+ $(hide) $(SOONG_ZIP) -d -o $(automotive-tests-configs-zip) \
+ -P host -C $(HOST_OUT) -l $@-host-test-configs.list \
+ -P target -C $(PRODUCT_OUT) -l $@-target-test-configs.list
+ $(SOONG_ZIP) -d -o $(PRIVATE_automotive_host_shared_libs_zip) \
+ -P host -C $(HOST_OUT) -l $@-host-shared-libs.list
+ rm -f $(PRIVATE_automotive_tests_list)
+ $(hide) grep -e .*\\.config$$ $@-host.list | sed s%$(HOST_OUT)%host%g > $(PRIVATE_automotive_tests_list)
+ $(hide) grep -e .*\\.config$$ $@-target.list | sed s%$(PRODUCT_OUT)%target%g >> $(PRIVATE_automotive_tests_list)
+ $(hide) $(SOONG_ZIP) -d -o $(automotive-tests-list-zip) -C $(dir $@) -f $(PRIVATE_automotive_tests_list)
+ rm -f $@.list $@-host.list $@-target.list $@-host-test-configs.list $@-target-test-configs.list \
+ $@-shared-libs.list $@-host-shared-libs.list $(PRIVATE_automotive_tests_list)
+
+automotive-tests: $(automotive-tests-zip)
+$(call dist-for-goals, automotive-tests, $(automotive-tests-zip) $(automotive-tests-list-zip) $(automotive-tests-configs-zip) $(automotive_tests_host_shared_libs_zip))
+
+$(call declare-1p-container,$(automotive-tests-zip),)
+$(call declare-container-license-deps,$(automotive-tests-zip),$(COMPATIBILITY.automotive-tests.FILES) $(my_host_shared_lib_for_automotive_tests),$(PRODUCT_OUT)/:/)
+
+tests: automotive-tests
diff --git a/core/tasks/catbox.mk b/core/tasks/catbox.mk
index 443f4bb..a771a93 100644
--- a/core/tasks/catbox.mk
+++ b/core/tasks/catbox.mk
@@ -16,6 +16,7 @@
test_suite_tradefed := catbox-tradefed
test_suite_readme := test/catbox/tools/catbox-tradefed/README
test_suite_tools := $(HOST_OUT_JAVA_LIBRARIES)/catbox-report-lib.jar
+test_suite_tools += $(HOST_OUT_JAVA_LIBRARIES)/tradefed-contrib.jar
include $(BUILD_SYSTEM)/tasks/tools/compatibility.mk
diff --git a/core/version_defaults.mk b/core/version_defaults.mk
index d5f8b39..ae5db8f 100644
--- a/core/version_defaults.mk
+++ b/core/version_defaults.mk
@@ -58,7 +58,7 @@
# This is the user-visible version. In a final release build it should
# be empty to use PLATFORM_VERSION as the user-visible version. For
# a preview release it can be set to a user-friendly value like `12 Preview 1`
-PLATFORM_DISPLAY_VERSION := 13
+PLATFORM_DISPLAY_VERSION :=
ifndef PLATFORM_SDK_VERSION
# This is the canonical definition of the SDK version, which defines
@@ -78,7 +78,7 @@
.KATI_READONLY := PLATFORM_SDK_VERSION
# This is the sdk extension version of this tree.
-PLATFORM_SDK_EXTENSION_VERSION := 3
+PLATFORM_SDK_EXTENSION_VERSION := 5
.KATI_READONLY := PLATFORM_SDK_EXTENSION_VERSION
# This is the sdk extension version that PLATFORM_SDK_VERSION ships with.
diff --git a/core/version_util.mk b/core/version_util.mk
index cbfef96..38bd3dc 100644
--- a/core/version_util.mk
+++ b/core/version_util.mk
@@ -170,7 +170,7 @@
# to the public SDK where platform essentially supports all previous SDK versions,
# platform supports only a few number of recent system SDK versions as some of
# old system APIs are gradually deprecated, removed and then deleted.
- PLATFORM_SYSTEMSDK_MIN_VERSION := 28
+ PLATFORM_SYSTEMSDK_MIN_VERSION := 29
endif
.KATI_READONLY := PLATFORM_SYSTEMSDK_MIN_VERSION
@@ -251,6 +251,6 @@
# Used to set minimum supported target sdk version. Apps targeting sdk
# version lower than the set value will result in a warning being shown
# when any activity from the app is started.
- PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION := 23
+ PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION := 28
endif
.KATI_READONLY := PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION
diff --git a/target/product/base_system.mk b/target/product/base_system.mk
index b66d2c7..9b76de8 100644
--- a/target/product/base_system.mk
+++ b/target/product/base_system.mk
@@ -53,8 +53,11 @@
com.android.adservices \
com.android.appsearch \
com.android.btservices \
+ com.android.configinfrastructure \
com.android.conscrypt \
+ com.android.devicelock \
com.android.extservices \
+ com.android.healthfitness \
com.android.i18n \
com.android.ipsec \
com.android.location.provider \
@@ -120,6 +123,7 @@
incident-helper-cmd \
init.environ.rc \
init_system \
+ initial-package-stopped-states.xml \
input \
installd \
IntentResolver \
@@ -285,7 +289,6 @@
viewcompiler \
voip-common \
vold \
- WallpaperBackup \
watchdogd \
wificond \
wifi.rc \
@@ -319,6 +322,11 @@
endif # EMMA_INSTRUMENT_STATIC
endif # EMMA_INSTRUMENT
+ifeq (,$(DISABLE_WALLPAPER_BACKUP))
+ PRODUCT_PACKAGES += \
+ WallpaperBackup
+endif
+
# For testing purposes
ifeq ($(FORCE_AUDIO_SILENT), true)
PRODUCT_SYSTEM_PROPERTIES += ro.audio.silent=1
@@ -383,6 +391,7 @@
iotop \
iperf3 \
iw \
+ layertracegenerator \
logpersist.start \
logtagd.rc \
procrank \
@@ -407,7 +416,11 @@
# The set of packages whose code can be loaded by the system server.
PRODUCT_SYSTEM_SERVER_APPS += \
SettingsProvider \
+
+ifeq (,$(DISABLE_WALLPAPER_BACKUP))
+ PRODUCT_SYSTEM_SERVER_APPS += \
WallpaperBackup
+endif
PRODUCT_PACKAGES_DEBUG_JAVA_COVERAGE := \
libdumpcoverage
diff --git a/target/product/default_art_config.mk b/target/product/default_art_config.mk
index 752b199..d970203 100644
--- a/target/product/default_art_config.mk
+++ b/target/product/default_art_config.mk
@@ -55,7 +55,10 @@
com.android.adservices:framework-sdksandbox \
com.android.appsearch:framework-appsearch \
com.android.btservices:framework-bluetooth \
+ com.android.configinfrastructure:framework-configinfrastructure \
com.android.conscrypt:conscrypt \
+ com.android.devicelock:framework-devicelock \
+ com.android.healthfitness:framework-healthfitness \
com.android.i18n:core-icu4j \
com.android.ipsec:android.net.ipsec.ike \
com.android.media:updatable-media \
@@ -81,7 +84,10 @@
com.android.adservices:service-sdksandbox \
com.android.appsearch:service-appsearch \
com.android.art:service-art \
+ com.android.configinfrastructure:service-configinfrastructure \
+ com.android.healthfitness:service-healthfitness \
com.android.media:service-media-s \
+ com.android.ondevicepersonalization:service-ondevicepersonalization \
com.android.permission:service-permission \
com.android.rkpd:service-rkp \
@@ -100,6 +106,7 @@
# Note: For modules available in Q, DO NOT add new entries here.
PRODUCT_APEX_STANDALONE_SYSTEM_SERVER_JARS := \
com.android.btservices:service-bluetooth \
+ com.android.devicelock:service-devicelock \
com.android.os.statsd:service-statsd \
com.android.scheduling:service-scheduling \
com.android.tethering:service-connectivity \
diff --git a/target/product/generic_system.mk b/target/product/generic_system.mk
index 1a639ef..ce4e5f3 100644
--- a/target/product/generic_system.mk
+++ b/target/product/generic_system.mk
@@ -32,6 +32,7 @@
PRODUCT_PACKAGES += \
LiveWallpapersPicker \
PartnerBookmarksProvider \
+ preinstalled-packages-platform-generic-system.xml \
Stk \
Tag \
diff --git a/target/product/gsi/current.txt b/target/product/gsi/current.txt
index 474cb20..ceb2060 100644
--- a/target/product/gsi/current.txt
+++ b/target/product/gsi/current.txt
@@ -58,6 +58,9 @@
VNDK-SP: libutils.so
VNDK-SP: libutilscallstack.so
VNDK-SP: libz.so
+VNDK-core: android.frameworks.cameraservice.common-V1-ndk.so
+VNDK-core: android.frameworks.cameraservice.device-V1-ndk.so
+VNDK-core: android.frameworks.cameraservice.service-V1-ndk.so
VNDK-core: android.hardware.audio.common@2.0.so
VNDK-core: android.hardware.configstore-utils.so
VNDK-core: android.hardware.configstore@1.0.so
diff --git a/target/product/handheld_system.mk b/target/product/handheld_system.mk
index 41233b2..3009d6a 100644
--- a/target/product/handheld_system.mk
+++ b/target/product/handheld_system.mk
@@ -42,6 +42,8 @@
CameraExtensionsProxy \
CaptivePortalLogin \
CertInstaller \
+ CredentialManager \
+ DeviceAsWebcam \
DocumentsUI \
DownloadProviderUi \
EasterEgg \
@@ -56,6 +58,7 @@
MusicFX \
NfcNci \
PacProcessor \
+ preinstalled-packages-platform-handheld-system.xml \
PrintRecommendationService \
PrintSpooler \
ProxyHandler \
@@ -79,7 +82,8 @@
Telecom \
PRODUCT_COPY_FILES += \
- frameworks/av/media/libeffects/data/audio_effects.conf:system/etc/audio_effects.conf
+ frameworks/av/media/libeffects/data/audio_effects.conf:system/etc/audio_effects.conf \
+ frameworks/native/data/etc/android.software.window_magnification.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/android.software.window_magnification.xml \
PRODUCT_VENDOR_PROPERTIES += \
ro.carrier?=unknown \
diff --git a/target/product/handheld_system_ext.mk b/target/product/handheld_system_ext.mk
index d935fbf..187b627 100644
--- a/target/product/handheld_system_ext.mk
+++ b/target/product/handheld_system_ext.mk
@@ -22,6 +22,7 @@
# /system_ext packages
PRODUCT_PACKAGES += \
+ AccessibilityMenu \
Launcher3QuickStep \
Provision \
Settings \
diff --git a/target/product/runtime_libart.mk b/target/product/runtime_libart.mk
index bd4fd1c..39666ea 100644
--- a/target/product/runtime_libart.mk
+++ b/target/product/runtime_libart.mk
@@ -122,6 +122,7 @@
# without exceptions).
PRODUCT_SYSTEM_PROPERTIES += \
pm.dexopt.post-boot?=extract \
+ pm.dexopt.boot-after-mainline-update?=verify \
pm.dexopt.install?=speed-profile \
pm.dexopt.install-fast?=skip \
pm.dexopt.install-bulk?=speed-profile \
diff --git a/target/product/sysconfig/Android.bp b/target/product/sysconfig/Android.bp
index 29122e4..27ac8cf 100644
--- a/target/product/sysconfig/Android.bp
+++ b/target/product/sysconfig/Android.bp
@@ -30,8 +30,28 @@
}
prebuilt_etc {
+ name: "preinstalled-packages-platform-generic-system.xml",
+ sub_dir: "sysconfig",
+ src: "preinstalled-packages-platform-generic-system.xml",
+}
+
+prebuilt_etc {
name: "preinstalled-packages-platform-handheld-product.xml",
product_specific: true,
sub_dir: "sysconfig",
src: "preinstalled-packages-platform-handheld-product.xml",
}
+
+prebuilt_etc {
+ name: "preinstalled-packages-platform-handheld-system.xml",
+ sub_dir: "sysconfig",
+ src: "preinstalled-packages-platform-handheld-system.xml",
+}
+
+prebuilt_etc {
+ name: "preinstalled-packages-platform-telephony-product.xml",
+ product_specific: true,
+ sub_dir: "sysconfig",
+ src: "preinstalled-packages-platform-telephony-product.xml",
+}
+
diff --git a/target/product/sysconfig/preinstalled-packages-platform-aosp-product.xml b/target/product/sysconfig/preinstalled-packages-platform-aosp-product.xml
index eec1326..1295e1c 100644
--- a/target/product/sysconfig/preinstalled-packages-platform-aosp-product.xml
+++ b/target/product/sysconfig/preinstalled-packages-platform-aosp-product.xml
@@ -20,4 +20,12 @@
<install-in-user-type package="com.android.wallpaperpicker">
<install-in user-type="FULL" />
</install-in-user-type>
+
+ <!-- System packages that should not be pre-installed on the CLONE profile. -->
+ <!-- Messages -->
+ <install-in-user-type package="com.android.messaging">
+ <install-in user-type="FULL" />
+ <install-in user-type="PROFILE" />
+ <do-not-install-in user-type="android.os.usertype.profile.CLONE" />
+ </install-in-user-type>
</config>
diff --git a/target/product/sysconfig/preinstalled-packages-platform-generic-system.xml b/target/product/sysconfig/preinstalled-packages-platform-generic-system.xml
new file mode 100644
index 0000000..e2482e1
--- /dev/null
+++ b/target/product/sysconfig/preinstalled-packages-platform-generic-system.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2022 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.
+-->
+<!-- System packages to preinstall on all devices with generic_system, per user type.
+ Documentation at frameworks/base/data/etc/preinstalled-packages-platform.xml
+-->
+<config>
+ <!-- Stk (SIM ToolKit)
+ TODO(b/258055479): Check if this should be preinstalled on SYSTEM user -->
+ <install-in-user-type package="com.android.stk">
+ <install-in user-type="SYSTEM" />
+ <install-in user-type="FULL" />
+ <install-in user-type="PROFILE" />
+ <do-not-install-in user-type="android.os.usertype.profile.CLONE" />
+ </install-in-user-type>
+</config>
+
diff --git a/target/product/sysconfig/preinstalled-packages-platform-handheld-product.xml b/target/product/sysconfig/preinstalled-packages-platform-handheld-product.xml
index a5d9ba2..79c1565 100644
--- a/target/product/sysconfig/preinstalled-packages-platform-handheld-product.xml
+++ b/target/product/sysconfig/preinstalled-packages-platform-handheld-product.xml
@@ -20,4 +20,38 @@
<install-in-user-type package="com.android.wallpapercropper">
<install-in user-type="FULL" />
</install-in-user-type>
+
+ <!-- Calendar -->
+ <install-in-user-type package="com.android.calendar">
+ <install-in user-type="FULL" />
+ <install-in user-type="PROFILE" />
+ <do-not-install-in user-type="android.os.usertype.profile.CLONE" />
+ </install-in-user-type>
+
+ <!-- Camera -->
+ <install-in-user-type package="com.android.camera2">
+ <install-in user-type="FULL" />
+ <install-in user-type="PROFILE" />
+ <do-not-install-in user-type="android.os.usertype.profile.CLONE" />
+ </install-in-user-type>
+
+ <!-- Clock -->
+ <install-in-user-type package="com.android.deskclock">
+ <install-in user-type="FULL" />
+ <do-not-install-in user-type="android.os.usertype.profile.CLONE" />
+ </install-in-user-type>
+
+ <!-- Contacts -->
+ <install-in-user-type package="com.android.contacts">
+ <install-in user-type="FULL" />
+ <install-in user-type="PROFILE" />
+ <do-not-install-in user-type="android.os.usertype.profile.CLONE" />
+ </install-in-user-type>
+
+ <!-- Gallery -->
+ <install-in-user-type package="com.android.gallery3d">
+ <install-in user-type="FULL" />
+ <install-in user-type="PROFILE" />
+ <do-not-install-in user-type="android.os.usertype.profile.CLONE" />
+ </install-in-user-type>
</config>
diff --git a/target/product/sysconfig/preinstalled-packages-platform-handheld-system.xml b/target/product/sysconfig/preinstalled-packages-platform-handheld-system.xml
new file mode 100644
index 0000000..d25c17a
--- /dev/null
+++ b/target/product/sysconfig/preinstalled-packages-platform-handheld-system.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2022 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.
+-->
+<!-- System packages to preinstall on all devices with handheld_system, per user type.
+ Documentation at frameworks/base/data/etc/preinstalled-packages-platform.xml
+-->
+<config>
+ <!-- Printer (Does not show on launcher, but shows on the share sheet) -->
+ <install-in-user-type package="com.android.bips">
+ <install-in user-type="FULL" />
+ <install-in user-type="PROFILE" />
+ <do-not-install-in user-type="android.os.usertype.profile.CLONE" />
+ </install-in-user-type>
+</config>
diff --git a/target/product/sysconfig/preinstalled-packages-platform-telephony-product.xml b/target/product/sysconfig/preinstalled-packages-platform-telephony-product.xml
new file mode 100644
index 0000000..cc1c135
--- /dev/null
+++ b/target/product/sysconfig/preinstalled-packages-platform-telephony-product.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2022 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.
+-->
+<!-- System packages to preinstall on all devices with telephony_product, per user type.
+ Documentation at frameworks/base/data/etc/preinstalled-packages-platform.xml
+-->
+<config>
+ <!-- Phone
+ TODO(b/258055373): Check if this should be preinstalled on SYSTEM user -->
+ <install-in-user-type package="com.android.dialer">
+ <install-in user-type="SYSTEM" />
+ <install-in user-type="FULL" />
+ <install-in user-type="PROFILE" />
+ <do-not-install-in user-type="android.os.usertype.profile.CLONE" />
+ </install-in-user-type>
+</config>
+
diff --git a/target/product/telephony_product.mk b/target/product/telephony_product.mk
index 18374d4..aa70f46 100644
--- a/target/product/telephony_product.mk
+++ b/target/product/telephony_product.mk
@@ -21,3 +21,4 @@
PRODUCT_PACKAGES += \
Dialer \
ImsServiceEntitlement \
+ preinstalled-packages-platform-telephony-product.xml
diff --git a/tools/Android.bp b/tools/Android.bp
index 1f0d406..f446973 100644
--- a/tools/Android.bp
+++ b/tools/Android.bp
@@ -64,3 +64,8 @@
name: "check_elf_file",
srcs: ["check_elf_file.py"],
}
+
+python_binary_host {
+ name: "generate_gts_shared_report",
+ srcs: ["generate_gts_shared_report.py"],
+}
diff --git a/tools/generate_gts_shared_report.py b/tools/generate_gts_shared_report.py
new file mode 100644
index 0000000..11c9364
--- /dev/null
+++ b/tools/generate_gts_shared_report.py
@@ -0,0 +1,128 @@
+#!/usr/bin/env python3
+#
+# Copyright (C) 2022 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.
+"""
+Checks and generates a report for gts modules that should be open-sourced.
+
+Usage:
+ generate_gts_open_source_report.py
+ --gtsv-metalic [gts-verifier meta_lic]
+ --gts-test-metalic [android-gts meta_lic]
+ --checkshare [COMPLIANCE_CHECKSHARE]
+ --gts-test-dir [directory of android-gts]
+ --output [output file]
+
+Output example:
+ GTS-Verifier: PASS/FAIL
+ GTS-Modules: PASS/FAIL
+ GtsIncrementalInstallTestCases_BackgroundProcess
+ GtsUnsignedNetworkStackTestCases
+"""
+import sys
+import argparse
+import subprocess
+import re
+
+def _get_args():
+ """Parses input arguments."""
+ parser = argparse.ArgumentParser()
+ parser.add_argument(
+ '--gtsv-metalic', required=True,
+ help='license meta_lic file path of gts-verifier.zip')
+ parser.add_argument(
+ '--gts-test-metalic', required=True,
+ help='license meta_lic file path of android-gts.zip')
+ parser.add_argument(
+ '--checkshare', required=True,
+ help='path of the COMPLIANCE_CHECKSHARE tool')
+ parser.add_argument(
+ '--gts-test-dir', required=True,
+ help='directory of android-gts')
+ parser.add_argument(
+ '-o', '--output', required=True,
+ help='file path of the output report')
+ return parser.parse_args()
+
+def _check_gtsv(checkshare: str, gtsv_metalic: str) -> str:
+ """Checks gts-verifier license.
+
+ Args:
+ checkshare: path of the COMPLIANCE_CHECKSHARE tool
+ gtsv_metalic: license meta_lic file path of gts-verifier.zip
+
+ Returns:
+ PASS when gts-verifier.zip doesn't need to be shared, and FAIL
+ when gts-verifier.zip need to be shared.
+ """
+ cmd = f'{checkshare} {gtsv_metalic}'
+ proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
+ proc.communicate()
+ return 'PASS' if proc.returncode == 0 else 'FAIL'
+
+def _check_gts_test(checkshare: str, gts_test_metalic: str,
+ gts_test_dir: str) -> tuple[str, set[str]]:
+ """Checks android-gts license.
+
+ Args:
+ checkshare: path of the COMPLIANCE_CHECKSHARE tool
+ gts_test_metalic: license meta_lic file path of android-gts.zip
+ gts_test_dir: directory of android-gts
+
+ Returns:
+ Check result (PASS when android-gts doesn't need to be shared,
+ FAIL when some gts modules need to be shared) and gts modules
+ that need to be shared.
+ """
+ cmd = f'{checkshare} {gts_test_metalic}'
+ proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
+ _, str_stderr = map(lambda b: b.decode(), proc.communicate())
+ if proc.returncode == 0:
+ return 'PASS', []
+ open_source_modules = set()
+ for error_line in str_stderr.split('\n'):
+ # Skip the empty liness
+ if not error_line:
+ continue
+ module_meta_lic = error_line.strip().split()[0]
+ groups = re.fullmatch(
+ re.compile(f'.*/{gts_test_dir}/(.*)'), module_meta_lic)
+ if groups:
+ open_source_modules.add(
+ groups[1].removesuffix('.meta_lic'))
+ return 'FAIL', open_source_modules
+
+
+def main(argv):
+ args = _get_args()
+
+ gtsv_metalic = args.gtsv_metalic
+ gts_test_metalic = args.gts_test_metalic
+ output_file = args.output
+ checkshare = args.checkshare
+ gts_test_dir = args.gts_test_dir
+
+ with open(output_file, 'w') as file:
+ result = _check_gtsv(checkshare, gtsv_metalic)
+ file.write(f'GTS-Verifier: {result}\n')
+ result, open_source_modules = _check_gts_test(
+ checkshare, gts_test_metalic, gts_test_dir)
+ file.write(f'GTS-Modules: {result}\n')
+ for open_source_module in open_source_modules:
+ file.write(f'\t{open_source_module}\n')
+
+if __name__ == "__main__":
+ main(sys.argv)
\ No newline at end of file