1#
2# Copyright (C) 2022 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
17PRODUCT_RELEASE_CONFIG_MAPS += $(wildcard build/release/automotive/release_config_map.textproto)
18
19# This makefile comprises the minimal system partition content for an
20# automotive device.
21$(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_system.mk)
22$(call inherit-product, $(SRC_TARGET_DIR)/product/languages_default.mk)
23# Add adb keys to debuggable AOSP builds (if they exist)
24$(call inherit-product-if-exists, vendor/google/security/adb/vendor_key.mk)
25
26# If your device needs telephony stack for mobile network, please include
27# telephony_system.mk and APN configs in your device makefile.
28
29# Enable updating of APEXes
30$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
31
32# Applications
33PRODUCT_PACKAGES += \
34    LiveWallpapersPicker \
35    PartnerBookmarksProvider \
36    preinstalled-packages-platform-generic-system.xml \
37    Stk \
38    Tag \
39
40# OTA support
41PRODUCT_PACKAGES += \
42    recovery-refresh \
43    update_engine \
44    update_verifier \
45
46# Wrapped net utils for /vendor access.
47PRODUCT_PACKAGES += netutils-wrapper-1.0
48
49# Charger images
50PRODUCT_PACKAGES += charger_res_images
51
52# system_other support
53PRODUCT_PACKAGES += \
54    cppreopts.sh \
55    otapreopt_script \
56
57# For ringtones that rely on forward lock encryption
58PRODUCT_PACKAGES += libfwdlockengine
59
60# System libraries commonly depended on by things on the system_ext or product partitions.
61# These lists will be pruned periodically.
62PRODUCT_PACKAGES += \
63    android.hardware.biometrics.fingerprint@2.1 \
64    android.hardware.radio@1.0 \
65    android.hardware.radio@1.1 \
66    android.hardware.radio@1.2 \
67    android.hardware.radio@1.3 \
68    android.hardware.radio@1.4 \
69    android.hardware.radio.config@1.0 \
70    android.hardware.radio.deprecated@1.0 \
71    android.hardware.secure_element@1.0 \
72    android.hardware.wifi \
73    libaudio-resampler \
74    libaudiohal \
75    libdrm \
76    liblogwrap \
77    liblz4 \
78    libminui \
79    libnl \
80    libprotobuf-cpp-full \
81
82# These libraries are empty and have been combined into libhidlbase, but are still depended
83# on by things off /system.
84# TODO(b/135686713): remove these
85PRODUCT_PACKAGES += \
86    libhidltransport \
87    libhwbinder \
88
89PRODUCT_HOST_PACKAGES += \
90    tinyplay
91
92# Enable configurable audio policy
93PRODUCT_PACKAGES += \
94    libaudiopolicyengineconfigurable \
95    libpolicy-subsystem
96
97# Include all zygote init scripts. "ro.zygote" will select one of them.
98PRODUCT_PACKAGES += \
99    init.zygote32.rc \
100    init.zygote64.rc \
101    init.zygote64_32.rc
102
103# Enable dynamic partition size
104PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true
105
106PRODUCT_ENFORCE_RRO_TARGETS := *
107
108PRODUCT_PACKAGES += \
109    Bluetooth \
110    CarActivityResolver \
111    CarManagedProvisioning \
112    StatementService \
113    SystemUpdater \
114    pppd \
115    screenrecord
116
117# Set default Bluetooth profiles
118TARGET_SYSTEM_PROP := \
119    packages/services/Car/car_product/properties/bluetooth.prop
120
121PRODUCT_SYSTEM_PROPERTIES += \
122    config.disable_systemtextclassifier=true
123
124###
125### Suggested values for multi-user properties - can be overridden
126###
127
128# Enable headless system user mode
129PRODUCT_SYSTEM_PROPERTIES += \
130    ro.fw.mu.headless_system_user?=true
131
132# Enable User HAL integration
133# NOTE: when set to true, VHAL must also implement the user-related properties,
134# otherwise CarService will ignore it
135PRODUCT_SYSTEM_PROPERTIES += \
136    android.car.user_hal_enabled?=true
137
138### end of multi-user properties ###
139
140# TODO(b/198516172): Find a better location to add this read only property
141# It is added here to check the functionality, will be updated in next CL
142PRODUCT_SYSTEM_PROPERTIES += \
143    ro.android.car.carservice.overlay.packages?=com.android.car.resources.vendor;com.google.android.car.resources.vendor;
144
145# Vendor layer can override this
146PRODUCT_SYSTEM_PROPERTIES += \
147    ro.android.car.carservice.package?=com.android.car.updatable
148
149# Update with PLATFORM_VERSION_MINOR_INT update
150PRODUCT_SYSTEM_PROPERTIES += ro.android.car.version.platform_minor=0
151
152PRODUCT_PACKAGES += \
153    com.android.wifi \
154    Home \
155    BasicDreams \
156    CaptivePortalLogin \
157    CertInstaller \
158    DownloadProviderUi \
159    FusedLocation \
160    InputDevices \
161    KeyChain \
162    Keyguard \
163    Launcher2 \
164    PacProcessor \
165    PrintSpooler \
166    ProxyHandler \
167    Settings \
168    SharedStorageBackup \
169    VpnDialogs \
170    MmsService \
171    ExternalStorageProvider \
172    atrace \
173    libandroidfw \
174    libaudioutils \
175    libpowermanager \
176    libvariablespeed \
177    PackageInstaller \
178    carbugreportd \
179    vehicle_binding_util \
180
181# Device running Android is a car
182PRODUCT_COPY_FILES += \
183    frameworks/native/data/etc/android.hardware.type.automotive.xml:system/etc/permissions/android.hardware.type.automotive.xml
184
185# Default permission grant exceptions
186PRODUCT_COPY_FILES += \
187    packages/services/Car/car_product/build/preinstalled-packages-product-car-base.xml:system/etc/sysconfig/preinstalled-packages-product-car-base.xml
188
189# Required init rc files for car
190PRODUCT_COPY_FILES += \
191    packages/services/Car/car_product/init/init.bootstat.rc:system/etc/init/init.bootstat.car.rc \
192    packages/services/Car/car_product/init/init.car.rc:system/etc/init/init.car.rc
193
194# Device policy management support
195PRODUCT_COPY_FILES += \
196    frameworks/native/data/etc/android.software.device_admin.xml:system/etc/permissions/android.software.device_admin.xml
197
198# Enable car watchdog
199PRODUCT_PACKAGES += carwatchdogd
200
201# Enable car power policy
202PRODUCT_PACKAGES += carpowerpolicyd
203
204PRODUCT_IS_AUTOMOTIVE := true
205
206PRODUCT_PACKAGES += \
207    CarDocumentsUI \
208    CarFrameworkPackageStubs \
209    CarService \
210    CarShell \
211    CarDialerApp \
212    CarRadioApp \
213    OverviewApp \
214    CarLauncher \
215    LocalMediaPlayer \
216    CarMediaApp \
217    CarMessengerApp \
218    CarHTMLViewer \
219    CarMapsPlaceholder \
220    CarLatinIME \
221    CarSettings \
222    CarUsbHandler \
223    android.car.builtin \
224    libcarservicehelperjni \
225    car-frameworks-service \
226    com.android.car.procfsinspector \
227    com.android.permission \
228
229# CAN bus
230PRODUCT_PACKAGES += \
231    canhalctrl \
232    canhaldump \
233    canhalsend
234
235# RROs
236PRODUCT_PACKAGES += \
237    CarPermissionControllerRRO \
238    CarSystemUIRRO
239
240# System Server components
241# Order is important: if X depends on Y, then Y should precede X on the list.
242PRODUCT_SYSTEM_SERVER_JARS += car-frameworks-service
243
244PRODUCT_BOOT_JARS += \
245    android.car.builtin
246
247USE_CAR_FRAMEWORK_APEX ?= false
248
249ifeq ($(USE_CAR_FRAMEWORK_APEX),true)
250    PRODUCT_PACKAGES += com.android.car.framework
251
252    PRODUCT_APEX_BOOT_JARS += com.android.car.framework:android.car-module
253    PRODUCT_APEX_SYSTEM_SERVER_JARS += com.android.car.framework:car-frameworks-service-module
254
255    $(call soong_config_set,bootclasspath,car_bootclasspath_fragment,true)
256
257    PRODUCT_HIDDENAPI_STUBS := android.car-module.stubs
258    PRODUCT_HIDDENAPI_STUBS_SYSTEM := android.car-module.stubs.system
259    PRODUCT_HIDDENAPI_STUBS_TEST := android.car-module.stubs.test
260else # !USE_CAR_FRAMEWORK_APEX
261    PRODUCT_BOOT_JARS += android.car
262    PRODUCT_PACKAGES += android.car CarServiceUpdatableNonModule car-frameworks-service-module
263    PRODUCT_SYSTEM_SERVER_JARS += car-frameworks-service-module
264
265    PRODUCT_HIDDENAPI_STUBS := android.car-stubs-dex
266    PRODUCT_HIDDENAPI_STUBS_SYSTEM := android.car-system-stubs-dex
267    PRODUCT_HIDDENAPI_STUBS_TEST := android.car-test-stubs-dex
268endif # USE_CAR_FRAMEWORK_APEX
269
270# Disable Dynamic System Update for automotive targets
271PRODUCT_NO_DYNAMIC_SYSTEM_UPDATE := true
272
273