1# 2# Copyright (C) 2021 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 17TARGET_KERNEL_DIR ?= device/google/lynx-kernel 18TARGET_BOARD_KERNEL_HEADERS := device/google/lynx-kernel/kernel-headers 19 20$(call inherit-product-if-exists, vendor/google_devices/lynx/prebuilts/device-vendor-lynx.mk) 21$(call inherit-product-if-exists, vendor/google_devices/gs201/prebuilts/device-vendor.mk) 22$(call inherit-product-if-exists, vendor/google_devices/gs201/proprietary/device-vendor.mk) 23$(call inherit-product-if-exists, vendor/google_devices/lynx/proprietary/lynx/device-vendor-lynx.mk) 24$(call inherit-product-if-exists, vendor/google_devices/lynx/proprietary/device-vendor.mk) 25$(call inherit-product-if-exists, vendor/google_devices/lynx/proprietary/WallpapersLynx.mk) 26 27DEVICE_PACKAGE_OVERLAYS += device/google/lynx/lynx/overlay 28 29include device/google/lynx/audio/lynx/audio-tables.mk 30include device/google/gs201/device-shipping-common.mk 31include device/google/lynx/vibrator/cs40l26/device.mk 32 33# go/lyric-soong-variables 34$(call soong_config_set,lyric,camera_hardware,lynx) 35$(call soong_config_set,lyric,tuning_product,lynx) 36$(call soong_config_set,google3a_config,target_device,lynx) 37 38# Init files 39PRODUCT_COPY_FILES += \ 40 device/google/lynx/conf/init.lynx.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.lynx.rc 41 42# Recovery files 43PRODUCT_COPY_FILES += \ 44 device/google/lynx/conf/init.recovery.device.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.lynx.rc 45 46# insmod files 47PRODUCT_COPY_FILES += \ 48 device/google/lynx/init.insmod.lynx.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/init.insmod.lynx.cfg 49 50# Camera 51PRODUCT_COPY_FILES += \ 52 device/google/lynx/media_profiles_lynx.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml 53 54# Media Performance Class 13 55PRODUCT_PROPERTY_OVERRIDES += ro.odm.build.media_performance_class=33 56 57# Display Config 58PRODUCT_COPY_FILES += \ 59 device/google/lynx/lynx/display_colordata_dev_cal0.pb:$(TARGET_COPY_OUT_VENDOR)/etc/display_colordata_dev_cal0.pb 60# Display 61PRODUCT_DEFAULT_PROPERTY_OVERRIDES += vendor.display.lbe.supported=1 62PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.set_idle_timer_ms=1500 63PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.ignore_hdr_camera_layers=true 64 65#config of primary display frames to reach LHBM peak brightness 66PRODUCT_DEFAULT_PROPERTY_OVERRIDES += vendor.primarydisplay.lhbm.frames_to_reach_peak_brightness=2 67 68# NFC 69PRODUCT_COPY_FILES += \ 70 frameworks/native/data/etc/android.hardware.nfc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.xml \ 71 frameworks/native/data/etc/android.hardware.nfc.hce.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hce.xml \ 72 frameworks/native/data/etc/android.hardware.nfc.hcef.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hcef.xml \ 73 frameworks/native/data/etc/com.nxp.mifare.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/com.nxp.mifare.xml \ 74 frameworks/native/data/etc/android.hardware.nfc.ese.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.ese.xml \ 75 device/google/lynx/nfc/libnfc-hal-st.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-hal-st.conf \ 76 device/google/lynx/nfc/libnfc-nci-lynx.conf:$(TARGET_COPY_OUT_PRODUCT)/etc/libnfc-nci.conf 77 78PRODUCT_PACKAGES += \ 79 NfcNci \ 80 Tag \ 81 android.hardware.nfc-service.st 82 83# SecureElement 84PRODUCT_PACKAGES += \ 85 android.hardware.secure_element@1.2-service-gto \ 86 android.hardware.secure_element@1.2-service-gto-ese2 87 88PRODUCT_COPY_FILES += \ 89 frameworks/native/data/etc/android.hardware.se.omapi.ese.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.ese.xml \ 90 frameworks/native/data/etc/android.hardware.se.omapi.uicc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.uicc.xml \ 91 device/google/lynx/nfc/libse-gto-hal.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libse-gto-hal.conf \ 92 device/google/lynx/nfc/libse-gto-hal2.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libse-gto-hal2.conf 93 94DEVICE_MANIFEST_FILE += \ 95 device/google/lynx/nfc/manifest_se.xml 96 97# Thermal Config 98PRODUCT_COPY_FILES += \ 99 device/google/lynx/thermal_info_config_lynx.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json \ 100 device/google/lynx/thermal_info_config_charge_lynx.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_charge.json 101 102# Power HAL config 103PRODUCT_COPY_FILES += \ 104 device/google/lynx/powerhint.json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.json 105 106# PowerStats HAL 107PRODUCT_SOONG_NAMESPACES += \ 108 device/google/lynx/powerstats \ 109 device/google/lynx 110 111# Bluetooth HAL and Pixel extension 112include device/google/lynx/bluetooth/qti_default.mk 113 114# Keymaster HAL 115#LOCAL_KEYMASTER_PRODUCT_PACKAGE ?= android.hardware.keymaster@4.1-service 116 117# Gatekeeper HAL 118#LOCAL_GATEKEEPER_PRODUCT_PACKAGE ?= android.hardware.gatekeeper@1.0-service.software 119 120 121# Gatekeeper 122# PRODUCT_PACKAGES += \ 123# android.hardware.gatekeeper@1.0-service.software 124 125# Keymint replaces Keymaster 126# PRODUCT_PACKAGES += \ 127# android.hardware.security.keymint-service 128 129# Keymaster 130#PRODUCT_PACKAGES += \ 131# android.hardware.keymaster@4.0-impl \ 132# android.hardware.keymaster@4.0-service 133 134#PRODUCT_PACKAGES += android.hardware.keymaster@4.0-service.remote 135#PRODUCT_PACKAGES += android.hardware.keymaster@4.1-service.remote 136#LOCAL_KEYMASTER_PRODUCT_PACKAGE := android.hardware.keymaster@4.1-service 137#LOCAL_KEYMASTER_PRODUCT_PACKAGE ?= android.hardware.keymaster@4.1-service 138 139# PRODUCT_PROPERTY_OVERRIDES += \ 140# ro.hardware.keystore_desede=true \ 141# ro.hardware.keystore=software \ 142# ro.hardware.gatekeeper=software 143 144# Fingerprint HAL 145GOODIX_CONFIG_BUILD_VERSION := g7_trusty 146include device/google/gs101/fingerprint/udfps_common.mk 147ifeq ($(filter factory%, $(TARGET_PRODUCT)),) 148include device/google/gs101/fingerprint/udfps_shipping.mk 149else 150include device/google/gs101/fingerprint/udfps_factory.mk 151endif 152 153# Vibrator HAL 154PRODUCT_VENDOR_PROPERTIES += \ 155 ro.vendor.vibrator.hal.supported_primitives=243 \ 156 ro.vendor.vibrator.hal.f0.comp.enabled=1 \ 157 ro.vendor.vibrator.hal.redc.comp.enabled=0 \ 158 persist.vendor.vibrator.hal.context.enable=false \ 159 persist.vendor.vibrator.hal.context.scale=40 \ 160 persist.vendor.vibrator.hal.context.fade=true \ 161 persist.vendor.vibrator.hal.context.cooldowntime=1600 \ 162 persist.vendor.vibrator.hal.context.settlingtime=5000 163 164# Trusty liboemcrypto.so 165PRODUCT_SOONG_NAMESPACES += vendor/google_devices/lynx/prebuilts 166 167# GPS xml 168ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) 169 PRODUCT_COPY_FILES += \ 170 device/google/lynx/location/gps.xml.l10:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml \ 171 device/google/lynx/location/lhd.conf.l10:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/lhd.conf \ 172 device/google/lynx/location/scd.conf.l10:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/scd.conf 173else 174 PRODUCT_COPY_FILES += \ 175 device/google/lynx/location/gps_user.xml.l10:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml \ 176 device/google/lynx/location/lhd_user.conf.l10:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/lhd.conf \ 177 device/google/lynx/location/scd_user.conf.l10:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/scd.conf 178endif 179 180# DCK properties based on target 181PRODUCT_PROPERTY_OVERRIDES += \ 182 ro.gms.dck.eligible_wcc=2 183 184# WIFI COEX 185PRODUCT_COPY_FILES += \ 186 device/google/lynx/wifi/coex_table.xml:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/coex_table.xml 187 188# WiFi Overlay 189PRODUCT_PACKAGES += \ 190 WifiOverlay2023Mid 191 192# Wifi Aware Interface 193PRODUCT_PROPERTY_OVERRIDES += \ 194 wifi.aware.interface=wifi-aware0 195 196# Set zram size 197PRODUCT_VENDOR_PROPERTIES += \ 198 vendor.zram.size=3g 199 200# Increment the SVN for any official public releases 201PRODUCT_VENDOR_PROPERTIES += \ 202 ro.vendor.build.svn=10 203 204# Set support hide display cutout feature 205PRODUCT_PRODUCT_PROPERTIES += \ 206 ro.support_hide_display_cutout=true 207 208# Set support One-handed mode 209PRODUCT_PRODUCT_PROPERTIES += \ 210 ro.support_one_handed_mode=true 211 212# Fingerprint als feed forward 213PRODUCT_VENDOR_PROPERTIES += \ 214 persist.vendor.udfps.als_feed_forward_supported=true \ 215 persist.vendor.udfps.lhbm_controlled_in_hal_supported=true 216 217# Hide cutout overlays 218PRODUCT_PACKAGES += \ 219 NoCutoutOverlay \ 220 AvoidAppsInCutoutOverlay 221 222# MIPI Coex Configs 223PRODUCT_COPY_FILES += \ 224 device/google/lynx/lynx/radio/lynx_display_primary_mipi_coex_table.csv:$(TARGET_COPY_OUT_VENDOR)/etc/modem/display_primary_mipi_coex_table.csv 225 226# Camera 227PRODUCT_PROPERTY_OVERRIDES += \ 228 persist.vendor.camera.extended_launch_boost=1 \ 229 persist.vendor.camera.optimized_tnr_freq=1 \ 230 persist.vendor.camera.raise_buf_allocation_priority=1 \ 231 persist.vendor.camera.start_cpu_throttling_at_moderate_thermal=1 232 233# Enable camera 1080P 60FPS binning mode 234PRODUCT_VENDOR_PROPERTIES += \ 235 persist.vendor.camera.1080P_60fps_binning=true 236 237# Increase thread priority for nodes stop 238PRODUCT_VENDOR_PROPERTIES += \ 239 persist.vendor.camera.increase_thread_priority_nodes_stop=true 240 241# OIS with system imu 242PRODUCT_VENDOR_PROPERTIES += \ 243 persist.vendor.camera.ois_with_system_imu=true 244 245# Enable camera exif model/make reporting 246PRODUCT_VENDOR_PROPERTIES += \ 247 persist.vendor.camera.exif_reveal_make_model=true 248 249# Enable front camera always binning for 720P or smaller resolution 250PRODUCT_VENDOR_PROPERTIES += \ 251 persist.vendor.camera.front_720P_always_binning=true 252 253# Use GmsCorePrebuilt y2022w28 254USE_GMSCORE_PREBUILT_Y2022W28 := true 255 256# Device features 257PRODUCT_COPY_FILES += \ 258 frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml 259 260# Enable adpf cpu hint session for SurfaceFlinger 261PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ 262 debug.sf.enable_adpf_cpu_hint=true 263 264# The default value of this variable is false and should only be set to true when 265# the device allows users to enable the seamless transfer feature. 266PRODUCT_PRODUCT_PROPERTIES += \ 267 euicc.seamless_transfer_enabled_in_non_qs=true 268 269##Audio Vendor property 270PRODUCT_PROPERTY_OVERRIDES += \ 271 persist.vendor.audio.cca.enabled=true 272 273# userdebug specific 274ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) 275 PRODUCT_COPY_FILES += \ 276 device/google/gs201/init.hardware.wlc.rc.userdebug:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.wlc.rc 277endif 278 279# SKU specific RROs 280PRODUCT_PACKAGES += \ 281 SettingsOverlayG82U8 \ 282 SettingsOverlayG0DZQ \ 283 SettingsOverlayGHL1X \ 284 SettingsOverlayGWKK3 285 286