1#
2# Copyright (C) 2016 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# Base platform for car builds
18# car packages should be added to car.mk instead of here
19
20ifeq ($(DISABLE_CAR_PRODUCT_CONFIG_OVERLAY),)
21PRODUCT_PACKAGES += \
22    CarFrameworkResConfigRRO \
23    CarCertInstallerConfigRRO \
24    CarSettingsProviderConfigRRO \
25    CarTelecommConfigRRO
26endif
27
28ifeq ($(DISABLE_CAR_PRODUCT_VISUAL_OVERLAY),)
29PRODUCT_PACKAGE_OVERLAYS += packages/services/Car/car_product/overlay-visual
30PRODUCT_PACKAGES += CarFrameworkResVisualRRO
31endif
32
33PRODUCT_PACKAGES += \
34    com.android.wifi \
35    Home \
36    BasicDreams \
37    CaptivePortalLogin \
38    CertInstaller \
39    DownloadProviderUi \
40    FusedLocation \
41    InputDevices \
42    KeyChain \
43    Keyguard \
44    LatinIME \
45    Launcher2 \
46    PacProcessor \
47    PrintSpooler \
48    ProxyHandler \
49    Settings \
50    SharedStorageBackup \
51    VpnDialogs \
52    MmsService \
53    ExternalStorageProvider \
54    atrace \
55    libandroidfw \
56    libaudioutils \
57    libnfc_ndef \
58    libpowermanager \
59    libvariablespeed \
60    PackageInstaller \
61    carbugreportd \
62    vehicle_binding_util \
63
64# ENABLE_CAMERA_SERVICE must be set as true from the product's makefile if it wants to support
65# Android Camera service.
66ifneq ($(ENABLE_CAMERA_SERVICE), true)
67PRODUCT_PROPERTY_OVERRIDES += config.disable_cameraservice=true
68PRODUCT_PACKAGES += HideCameraApps
69endif
70
71# ENABLE_EVS_SERVICE must be set as true from the product's makefile if it wants to support
72# the Extended View System service.
73ifeq ($(ENABLE_EVS_SERVICE), true)
74PRODUCT_PACKAGES += evsmanagerd
75
76# CUSTOMIZE_EVS_SERVICE_PARAMETER must be set as true from the product's makefile if it wants
77# to use IEvsEnumearor instances other than hw/1.
78ifneq ($(CUSTOMIZE_EVS_SERVICE_PARAMETER), true)
79PRODUCT_COPY_FILES += \
80    packages/services/Car/cpp/evs/manager/aidl/init.evs.rc:$(TARGET_COPY_OUT_SYSTEM)/etc/init/init.evs.rc
81endif
82
83ifeq ($(ENABLE_EVS_SAMPLE), true)
84# ENABLE_EVS_SAMPLE should set be true or their vendor specific equivalents should be included in
85# the device.mk with the corresponding selinux policies
86PRODUCT_PACKAGES += evs_app \
87                    android.hardware.automotive.evs-default \
88                    cardisplayproxyd
89include packages/services/Car/cpp/evs/apps/sepolicy/evsapp.mk
90endif  # ENABLE_EVS_SAMPLE
91
92ifeq ($(ENABLE_CAREVSSERVICE_SAMPLE), true)
93PRODUCT_PACKAGES += CarEvsCameraPreviewApp
94endif
95ifeq ($(ENABLE_REAR_VIEW_CAMERA_SAMPLE), true)
96PRODUCT_PACKAGES += SampleRearViewCamera
97endif
98# This is needed to be available to all builds because overlay config doesn't support optional overlays.
99PRODUCT_PACKAGE_OVERLAYS += packages/services/Car/tests/SampleRearViewCamera/overlay
100
101endif  # ENABLE_EVS_SERVICE
102
103# Device running Android is a car
104PRODUCT_COPY_FILES += \
105    frameworks/native/data/etc/android.hardware.type.automotive.xml:system/etc/permissions/android.hardware.type.automotive.xml
106
107# Default permission grant exceptions
108PRODUCT_COPY_FILES += \
109    packages/services/Car/car_product/build/preinstalled-packages-product-car-base.xml:system/etc/sysconfig/preinstalled-packages-product-car-base.xml
110
111$(call inherit-product, $(SRC_TARGET_DIR)/product/core_minimal.mk)
112
113# Default dex optimization configurations
114PRODUCT_PROPERTY_OVERRIDES += \
115    pm.dexopt.disable_bg_dexopt=false \
116    pm.dexopt.downgrade_after_inactive_days=10 \
117    dalvik.vm.dex2oat-cpu-set=0,1 \
118    dalvik.vm.dex2oat-threads=2
119
120# Required init rc files for car
121PRODUCT_COPY_FILES += \
122    packages/services/Car/car_product/init/init.bootstat.rc:system/etc/init/init.bootstat.car.rc \
123    packages/services/Car/car_product/init/init.car.rc:system/etc/init/init.car.rc
124
125# Device policy management support
126PRODUCT_COPY_FILES += \
127    frameworks/native/data/etc/android.software.device_admin.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.device_admin.xml
128
129# Enable car watchdog
130include packages/services/Car/cpp/watchdog/product/carwatchdog.mk
131
132# Enable car power policy
133include packages/services/Car/cpp/powerpolicy/product/carpowerpolicy.mk
134
135# Conditionally enable the telemetry service
136ifeq ($(ENABLE_CARTELEMETRY_SERVICE), true)
137include packages/services/Car/cpp/telemetry/cartelemetryd/products/telemetry.mk
138endif
139
140# Disable Dynamic System Update for automotive targets
141PRODUCT_NO_DYNAMIC_SYSTEM_UPDATE := true
142