blob: b511aa6b94b940679026e1f51be52b6d54469e53 [file] [log] [blame]
Brian Carlstrom1aeee8b2013-06-27 12:02:46 -07001#
2# Copyright (C) 2013 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17# Provides a functioning ART environment without Android frameworks
18
Nicolas Geoffray897fe0e2021-01-15 16:17:36 +000019$(call inherit-product, $(SRC_TARGET_DIR)/product/default_art_config.mk)
20
Andreas Gampe9a3e5ac2016-11-17 13:54:49 -080021# Additional mixins to the boot classpath.
22PRODUCT_PACKAGES += \
Paul Duffina8407522017-11-30 17:13:36 +000023 android.test.base \
Andreas Gampe9a3e5ac2016-11-17 13:54:49 -080024
25# Why are we pulling in ext, which is frameworks/base, depending on tagsoup and nist-sip?
26PRODUCT_PACKAGES += \
Ying Wangd54520a2014-12-08 14:46:29 -080027 ext \
Andreas Gampe9a3e5ac2016-11-17 13:54:49 -080028
Martin Stjernholm4cb80612019-07-05 22:39:19 +010029# Runtime (Bionic) APEX module.
Roland Levillainfbf4dbe2019-01-14 15:23:48 +000030PRODUCT_PACKAGES += com.android.runtime
Martin Stjernholm4cb80612019-07-05 22:39:19 +010031
32# ART APEX module.
Martin Stjernholmc481de02020-12-16 02:55:18 +000033#
34# Select either release (com.android.art) or debug (com.android.art.debug)
35# variant of the ART APEX. By default, "user" build variants contain the release
36# module, while the "eng" build variant contain the debug module. However, if
37# `PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD` is defined, it overrides the previous
38# logic:
39# - if `PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD` is set to `false`, the
40# build will include the release module (whatever the build
41# variant);
42# - if `PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD` is set to `true`, the
43# build will include the debug module (whatever the build variant).
44#
45# Note that the ART APEX package includes the minimal boot classpath JARs
46# (listed in ART_APEX_JARS), which should no longer be added directly to
47# PRODUCT_PACKAGES.
48
49art_target_include_debug_build := $(PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD)
50ifneq (false,$(art_target_include_debug_build))
51 ifneq (,$(filter eng,$(TARGET_BUILD_VARIANT)))
52 art_target_include_debug_build := true
53 endif
54endif
55
56ifeq (true,$(art_target_include_debug_build))
57 PRODUCT_PACKAGES += com.android.art.debug
58 apex_test_module := art-check-debug-apex-gen-fakebin
59else
60 PRODUCT_PACKAGES += com.android.art
61 apex_test_module := art-check-release-apex-gen-fakebin
62endif
63
64ifeq (true,$(SOONG_CONFIG_art_module_source_build)
65 PRODUCT_HOST_PACKAGES += $(apex_test_module)
66endif
67
68art_target_include_debug_build :=
69apex_test_module :=
Andreas Gampe9a3e5ac2016-11-17 13:54:49 -080070
71# Certificates.
72PRODUCT_PACKAGES += \
73 cacerts \
74
Mathew Inwooda2a7baa2018-02-20 10:56:48 +000075PRODUCT_PACKAGES += \
76 hiddenapi-package-whitelist.xml \
77
Chris Wailes0c650892021-05-12 17:24:13 -070078# The dalvik.vm.dexopt.thermal-cutoff property must contain one of the values
79# listed here:
80#
81# https://source.android.com/devices/architecture/hidl/thermal-mitigation#thermal-api
82#
83# If the thermal status of the device reaches or exceeds the value set here
84# background dexopt will be terminated and rescheduled using an exponential
85# backoff polcy.
86#
87# The thermal cutoff value is currently set to THERMAL_STATUS_MODERATE.
Jiyong Park1ea01c52020-05-29 17:50:03 +090088PRODUCT_SYSTEM_PROPERTIES += \
Nicolas Geoffray56a84e12015-11-05 16:49:49 +000089 dalvik.vm.usejit=true \
Mathieu Chartierb7a044e2016-01-28 15:58:02 -080090 dalvik.vm.usejitprofiles=true \
Calin Juravledc308c12017-02-06 19:03:05 -080091 dalvik.vm.dexopt.secondary=true \
Chris Wailes0c650892021-05-12 17:24:13 -070092 dalvik.vm.dexopt.thermal-cutoff=2 \
Mathieu Chartierb7a044e2016-01-28 15:58:02 -080093 dalvik.vm.appimageformat=lz4
Nicolas Geoffray10030bc2017-04-25 12:25:33 +010094
Jiyong Park1ea01c52020-05-29 17:50:03 +090095PRODUCT_SYSTEM_PROPERTIES += \
Lev Rumyantsevbe80acf2017-08-09 10:57:33 -070096 ro.dalvik.vm.native.bridge=0
97
Nicolas Geoffray10030bc2017-04-25 12:25:33 +010098# Different dexopt types for different package update/install times.
99# On eng builds, make "boot" reasons only extract for faster turnaround.
100ifeq (eng,$(TARGET_BUILD_VARIANT))
Jiyong Park1ea01c52020-05-29 17:50:03 +0900101 PRODUCT_SYSTEM_PROPERTIES += \
Peter Kalauskas9255f592021-02-11 10:41:11 -0800102 pm.dexopt.first-boot?=extract \
Calin Juravleb7e744c2021-01-22 00:11:10 +0000103 pm.dexopt.boot-after-ota?=extract
Nicolas Geoffray10030bc2017-04-25 12:25:33 +0100104else
Jiyong Park1ea01c52020-05-29 17:50:03 +0900105 PRODUCT_SYSTEM_PROPERTIES += \
Calin Juravleb7e744c2021-01-22 00:11:10 +0000106 pm.dexopt.first-boot?=verify \
107 pm.dexopt.boot-after-ota?=verify
Nicolas Geoffray10030bc2017-04-25 12:25:33 +0100108endif
109
Calin Juravleb5dadc32018-03-28 18:31:51 -0700110# The install filter is speed-profile in order to enable the use of
111# profiles from the dex metadata files. Note that if a profile is not provided
112# or if it is empty speed-profile is equivalent to (quicken + empty app image).
Calin Juravleccb4cdc2021-05-18 08:36:36 -0700113# Note that `cmdline` is not strictly needed but it simplifies the management
114# of compilation reason in the platform (as we have a unified, single path,
115# without exceptions).
Jiyong Park1ea01c52020-05-29 17:50:03 +0900116PRODUCT_SYSTEM_PROPERTIES += \
Calin Juravleb7e744c2021-01-22 00:11:10 +0000117 pm.dexopt.post-boot?=extract \
Jiyong Park8af29d42020-06-23 16:46:38 +0900118 pm.dexopt.install?=speed-profile \
Chris Wailesedbbf822020-10-29 16:40:28 -0700119 pm.dexopt.install-fast?=skip \
120 pm.dexopt.install-bulk?=speed-profile \
121 pm.dexopt.install-bulk-secondary?=verify \
122 pm.dexopt.install-bulk-downgraded?=verify \
123 pm.dexopt.install-bulk-secondary-downgraded?=extract \
Jiyong Park8af29d42020-06-23 16:46:38 +0900124 pm.dexopt.bg-dexopt?=speed-profile \
125 pm.dexopt.ab-ota?=speed-profile \
126 pm.dexopt.inactive?=verify \
Calin Juravleccb4cdc2021-05-18 08:36:36 -0700127 pm.dexopt.cmdline?=verify \
Jiyong Park8af29d42020-06-23 16:46:38 +0900128 pm.dexopt.shared?=speed
Andreas Gampe0f3e16a2017-11-03 14:37:32 -0700129
Vladimir Marko09e885d2020-04-06 12:12:34 +0100130# Pass file with the list of updatable boot class path packages to dex2oat.
Jiyong Park1ea01c52020-05-29 17:50:03 +0900131PRODUCT_SYSTEM_PROPERTIES += \
Vladimir Marko09e885d2020-04-06 12:12:34 +0100132 dalvik.vm.dex2oat-updatable-bcp-packages-file=/system/etc/updatable-bcp-packages.txt
133
Mathieu Chartiercf5a8b12019-01-25 09:16:28 -0800134# Enable resolution of startup const strings.
Jiyong Park1ea01c52020-05-29 17:50:03 +0900135PRODUCT_SYSTEM_PROPERTIES += \
Mathieu Chartiercf5a8b12019-01-25 09:16:28 -0800136 dalvik.vm.dex2oat-resolve-startup-strings=true
137
Mathieu Chartier6cbc3892019-04-08 13:32:06 -0700138# Specify default block size of 512K to enable parallel image decompression.
Jiyong Park1ea01c52020-05-29 17:50:03 +0900139PRODUCT_SYSTEM_PROPERTIES += \
Mathieu Chartier6cbc3892019-04-08 13:32:06 -0700140 dalvik.vm.dex2oat-max-image-block-size=524288
141
Andreas Gampe0f3e16a2017-11-03 14:37:32 -0700142# Enable minidebuginfo generation unless overridden.
Jiyong Park1ea01c52020-05-29 17:50:03 +0900143PRODUCT_SYSTEM_PROPERTIES += \
David Srbecky99ae76e2019-01-08 17:02:14 +0000144 dalvik.vm.minidebuginfo=true \
Andreas Gampe0f3e16a2017-11-03 14:37:32 -0700145 dalvik.vm.dex2oat-minidebuginfo=true
Yan Wangaf2e8042021-01-22 05:41:21 +0000146
147# Two other device configs are added to IORap besides "ro.iorapd.enable".
148# IORap by default is off and starts when
149# (https://source.corp.google.com/android/system/iorap/iorapd.rc?q=iorapd.rc)
150#
151# * "ro.iorapd.enable" is true excluding unset
152# * One of the device configs is true.
153#
154# "ro.iorapd.enable" has to be set to true, so that iorap can be started.
155PRODUCT_SYSTEM_PROPERTIES += \
156 ro.iorapd.enable?=true
157
Jagadeesh Pakaravoorbee9f1d2021-03-12 13:20:09 -0800158# Enable Madvising of the whole art, odex and vdex files to MADV_WILLNEED.
159# The size specified here is the size limit of how much of the file
Jagadeesh Pakaravoor3a10cc52021-03-18 15:21:41 -0700160# (in bytes) is madvised.
161# We madvise the whole .art file to MADV_WILLNEED with UINT_MAX limit.
162# For odex and vdex files, we limit madvising to 100MB.
Jagadeesh Pakaravoorbee9f1d2021-03-12 13:20:09 -0800163PRODUCT_SYSTEM_PROPERTIES += \
Jagadeesh Pakaravoor3a10cc52021-03-18 15:21:41 -0700164 dalvik.vm.madvise.vdexfile.size=104857600 \
165 dalvik.vm.madvise.odexfile.size=104857600 \
Jagadeesh Pakaravoorbee9f1d2021-03-12 13:20:09 -0800166 dalvik.vm.madvise.artfile.size=4294967295