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