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$(call inherit-product, packages/services/Car/car_product/build/car_vendor.mk) 17 18# Need this for gles libraries to load properly 19# after moving to /vendor/lib/ 20PRODUCT_PACKAGES += \ 21 vndk-sp 22 23DEVICE_PACKAGE_OVERLAYS := device/generic/goldfish/overlay 24 25PRODUCT_CHARACTERISTICS := emulator 26 27PRODUCT_FULL_TREBLE_OVERRIDE := true 28 29# Enable Google-specific location features, 30# like NetworkLocationProvider and LocationCollector 31PRODUCT_VENDOR_PROPERTIES += \ 32 ro.com.google.locationfeatures=1 33 34# Enable setupwizard 35PRODUCT_VENDOR_PROPERTIES += \ 36 ro.setupwizard.mode?=OPTIONAL 37 38# More configurations 39PRODUCT_VENDOR_PROPERTIES += \ 40 ro.carwatchdog.client_healthcheck.interval=20 \ 41 ro.carwatchdog.vhal_healthcheck.interval=10 \ 42 ro.surface_flinger.has_wide_color_display=false \ 43 ro.surface_flinger.has_HDR_display=false \ 44 ro.surface_flinger.protected_contents=false \ 45 ro.surface_flinger.use_color_management=false 46 47ifeq (,$(ENABLE_REAR_VIEW_CAMERA_SAMPLE)) 48ENABLE_REAR_VIEW_CAMERA_SAMPLE := true 49endif 50 51# Auto modules 52PRODUCT_PACKAGES += \ 53 android.hardware.automotive.vehicle@V3-emulator-service \ 54 android.hardware.broadcastradio-service.default \ 55 android.hardware.audio.service-caremu \ 56 android.hardware.automotive.remoteaccess@V2-default-service \ 57 android.hardware.automotive.ivn@V1-default-service 58 59# Copy car_core_hardware and overwrite handheld_core_hardware.xml with a disable config. 60# Overwrite goldfish related xml with a disable config. 61PRODUCT_COPY_FILES += \ 62 device/generic/car/common/android.hardware.disable.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml \ 63 device/generic/car/common/car_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/car_core_hardware.xml \ 64 device/generic/car/common/android.hardware.disable.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.ar.xml \ 65 device/generic/car/common/android.hardware.disable.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.autofocus.xml \ 66 device/generic/car/common/android.hardware.disable.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.concurrent.xml \ 67 device/generic/car/common/android.hardware.disable.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.full.xml \ 68 device/generic/car/common/android.hardware.disable.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.front.xml \ 69 device/generic/car/common/android.hardware.disable.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.any.xml \ 70 device/generic/car/common/android.hardware.disable.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.flash-autofocus.xml \ 71 device/generic/car/common/android.hardware.disable.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.raw.xml \ 72 device/generic/car/common/android.hardware.disable.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml \ 73 device/generic/car/common/android.hardware.disable.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \ 74 75# Overwrite goldfish fstab.ranchu to turn off adoptable_storage 76PRODUCT_COPY_FILES += \ 77 device/generic/car/common/fstab.ranchu.car:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.ranchu 78 79# Enable landscape 80PRODUCT_COPY_FILES += \ 81 frameworks/native/data/etc/android.hardware.screen.landscape.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.screen.landscape.xml \ 82 frameworks/native/data/etc/android.hardware.screen.portrait.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.screen.portrait.xml 83 84# Used to embed a map in an activity view 85PRODUCT_COPY_FILES += \ 86 frameworks/native/data/etc/android.software.activities_on_secondary_displays.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.activities_on_secondary_displays.xml 87 88# Permission for Wi-Fi passpoint support 89PRODUCT_COPY_FILES += \ 90 frameworks/native/data/etc/android.hardware.wifi.passpoint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.passpoint.xml 91 92# Additional permissions 93PRODUCT_COPY_FILES += \ 94 frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml \ 95 frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml \ 96 frameworks/native/data/etc/android.hardware.broadcastradio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.broadcastradio.xml \ 97 frameworks/native/data/etc/android.hardware.type.automotive.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.type.automotive.xml \ 98 99# Sensor features 100PRODUCT_COPY_FILES += \ 101 frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.accelerometer.xml \ 102 frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.gyroscope.xml \ 103 frameworks/native/data/etc/android.hardware.sensor.accelerometer_limited_axes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.accelerometer_limited_axes.xml \ 104 frameworks/native/data/etc/android.hardware.sensor.gyroscope_limited_axes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.gyroscope_limited_axes.xml \ 105 frameworks/native/data/etc/android.hardware.sensor.accelerometer_limited_axes_uncalibrated.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.accelerometer_limited_axes_uncalibrated.xml \ 106 frameworks/native/data/etc/android.hardware.sensor.gyroscope_limited_axes_uncalibrated.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.gyroscope_limited_axes_uncalibrated.xml \ 107 108# Additional selinux policy 109BOARD_SEPOLICY_DIRS += device/generic/car/common/sepolicy 110 111# This overrides device/generic/car/common/car.mk 112$(call inherit-product, device/generic/car/emulator/audio/car_emulator_audio.mk) 113$(call inherit-product, device/generic/car/emulator/rotary/car_rotary.mk) 114# Enables USB related passthrough 115$(call inherit-product, device/generic/car/emulator/usbpt/car_usbpt.mk) 116 117# EVS 118# By default, we enable EvsManager, a sample EVS app, and a mock EVS HAL implementation. 119# If you want to use your own EVS HAL implementation, please set ENABLE_MOCK_EVSHAL as false 120# and add your HAL implementation to the product. Please also check init.evs.rc and see how 121# you can configure EvsManager to use your EVS HAL implementation. Similarly, please set 122# ENABLE_SAMPLE_EVS_APP as false if you want to use your own EVS app configuration or own EVS 123# app implementation. 124ENABLE_EVS_SAMPLE ?= false 125ENABLE_EVS_SERVICE ?= true 126ENABLE_MOCK_EVSHAL ?= true 127ENABLE_CAREVSSERVICE_SAMPLE ?= false 128ENABLE_SAMPLE_EVS_APP ?= false 129ENABLE_CARTELEMETRY_SERVICE ?= false 130ifeq ($(ENABLE_MOCK_EVSHAL), true) 131CUSTOMIZE_EVS_SERVICE_PARAMETER := true 132endif # ENABLE_MOCK_EVSHAL 133$(call inherit-product, device/generic/car/emulator/evs/evs.mk) 134 135ifeq ($(EMULATOR_DYNAMIC_MULTIDISPLAY_CONFIG),true) 136# This section configures multi-display without hardcoding the 137# displays on hwservicemanager. 138$(call inherit-product, device/generic/car/emulator/multi-display-dynamic/multi-display-dynamic.mk) 139else # EMULATOR_DYNAMIC_MULTIDISPLAY_CONFIG 140ifeq (true,$(BUILD_EMULATOR_CLUSTER_DISPLAY)) 141$(call inherit-product, device/generic/car/emulator/cluster/cluster-hwservicemanager.mk) 142endif # BUILD_EMULATOR_CLUSTER_DISPLAY 143endif # EMULATOR_DYNAMIC_MULTIDISPLAY_CONFIG 144 145# Should use car bluetooth.prop. 146# This replaces value from device/generic/goldfish/product/generic.mk below 147ifeq (,$(ENABLE_CAR_USB_PASSTHROUGH)) 148ENABLE_CAR_USB_PASSTHROUGH := false 149endif 150ifeq (true,$(ENABLE_CAR_USB_PASSTHROUGH)) 151TARGET_PRODUCT_PROP := device/generic/car/emulator/usbpt/bluetooth/bluetooth.prop 152endif 153 154# Disable biometrics for AAOS emulators 155EMULATOR_VENDOR_NO_BIOMETRICS := true 156 157# Goldfish vendor partition configurations 158$(call inherit-product, device/generic/goldfish/product/generic.mk) 159 160# Enable socket for qemu VHAL 161BOARD_SEPOLICY_DIRS += device/generic/car/emulator/sepolicy 162 163$(call inherit-product-if-exists, device/generic/car/emulator/skins/overlays/car_emu_skin_overlays.mk)