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
17# Restrict the visibility of Android.bp files to improve build analysis time
18$(call inherit-product-if-exists, vendor/google/products/sources_pixel.mk)
19
20RELEASE_GOOGLE_BOOTLOADER_RIPCURRENT_DIR ?= pdk# Keep this for pdk TODO: b/327119000
21RELEASE_GOOGLE_PRODUCT_BOOTLOADER_DIR := bootloader/$(RELEASE_GOOGLE_BOOTLOADER_RIPCURRENT_DIR)
22$(call soong_config_set,shusky_bootloader,prebuilt_dir,$(RELEASE_GOOGLE_BOOTLOADER_RIPCURRENT_DIR))
23
24
25TARGET_LINUX_KERNEL_VERSION := $(RELEASE_KERNEL_RIPCURRENT_VERSION)
26TARGET_KERNEL_DIR ?= $(RELEASE_KERNEL_RIPCURRENT_DIR)
27TARGET_BOARD_KERNEL_HEADERS ?= $(RELEASE_KERNEL_RIPCURRENT_DIR)/kernel-headers
28
29ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
30    USE_UWBFIELDTESTQM := true
31endif
32ifeq ($(filter factory_ripcurrent, $(TARGET_PRODUCT)),)
33    include device/google/shusky/uwb/uwb_calibration.mk
34endif
35
36
37$(call inherit-product-if-exists, vendor/google_devices/shusky/prebuilts/device-vendor-ripcurrent.mk)
38$(call inherit-product-if-exists, vendor/google_devices/zuma/prebuilts/device-vendor.mk)
39$(call inherit-product-if-exists, vendor/google_devices/zuma/proprietary/device-vendor.mk)
40$(call inherit-product-if-exists, vendor/google_devices/shusky/proprietary/ripcurrent/device-vendor-ripcurrent.mk)
41$(call inherit-product-if-exists, vendor/qorvo/uwb/qm35-hal/Device.mk)
42
43CAMERA_PRODUCT ?= ripcurrent
44
45include device/google/shusky/audio/ripcurrent/audio-tables.mk
46include device/google/shusky/camera/camera.mk
47include device/google/zuma/device-shipping-common.mk
48include device/google/gs-common/bcmbt/bluetooth.mk
49include device/google/gs-common/gps/brcm/cbd_gps.mk
50include device/google/gs-common/touch/stm/stm20.mk
51
52# display
53DEVICE_PACKAGE_OVERLAYS += device/google/shusky/ripcurrent/overlay
54
55# Init files
56PRODUCT_COPY_FILES += \
57	device/google/shusky/conf/init.ripcurrent.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.ripcurrent.rc
58
59# Recovery files
60PRODUCT_COPY_FILES += \
61        device/google/shusky/conf/init.recovery.device.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.ripcurrent.rc
62
63# NFC
64PRODUCT_COPY_FILES += \
65	frameworks/native/data/etc/android.hardware.nfc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.xml \
66	frameworks/native/data/etc/android.hardware.nfc.hce.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hce.xml \
67	frameworks/native/data/etc/android.hardware.nfc.hcef.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hcef.xml \
68	frameworks/native/data/etc/com.nxp.mifare.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/com.nxp.mifare.xml \
69	frameworks/native/data/etc/android.hardware.nfc.ese.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.ese.xml \
70	device/google/shusky/nfc/libnfc-hal-st-disable.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-hal-st.conf \
71	device/google/shusky/nfc/libnfc-hal-st.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-hal-st-enable.conf \
72	device/google/shusky/nfc/libnfc-nci.conf:$(TARGET_COPY_OUT_PRODUCT)/etc/libnfc-nci.conf
73
74PRODUCT_PACKAGES += \
75	$(RELEASE_PACKAGE_NFC_STACK) \
76	Tag \
77	android.hardware.nfc-service.st
78
79# SecureElement
80PRODUCT_PACKAGES += \
81	android.hardware.secure_element-service.thales
82
83PRODUCT_COPY_FILES += \
84	frameworks/native/data/etc/android.hardware.se.omapi.ese.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.ese.xml \
85	frameworks/native/data/etc/android.hardware.se.omapi.uicc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.uicc.xml \
86	device/google/shusky/nfc/libse-gto-hal-disable.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libse-gto-hal.conf
87
88
89# Bluetooth HAL
90PRODUCT_COPY_FILES += \
91	device/google/shusky/bluetooth/bt_vendor_overlay_ripcurrent.conf:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth/bt_vendor_overlay.conf
92PRODUCT_PROPERTY_OVERRIDES += \
93    ro.bluetooth.a2dp_offload.supported=true \
94    persist.bluetooth.a2dp_offload.disabled=false \
95    persist.bluetooth.a2dp_offload.cap=sbc-aac-aptx-aptxhd-ldac-opus
96
97# Spatial Audio
98PRODUCT_PACKAGES += \
99	libspatialaudio
100
101# declare use of spatial audio
102PRODUCT_PROPERTY_OVERRIDES += \
103       ro.audio.spatializer_enabled=true
104
105# DCK properties based on target
106PRODUCT_PROPERTY_OVERRIDES += \
107    ro.gms.dck.eligible_wcc=3 \
108    ro.gms.dck.se_capability=1
109
110# Bluetooth hci_inject test tool
111PRODUCT_PACKAGES_DEBUG += \
112    hci_inject
113
114# Bluetooth OPUS codec
115PRODUCT_PRODUCT_PROPERTIES += \
116    persist.bluetooth.opus.enabled=true
117
118# Bluetooth SAR test tool
119PRODUCT_PACKAGES_DEBUG += \
120    sar_test
121
122# Bluetooth EWP test tool
123PRODUCT_PACKAGES_DEBUG += \
124    ewp_tool
125
126# Bluetooth AAC VBR
127PRODUCT_PRODUCT_PROPERTIES += \
128    persist.bluetooth.a2dp_aac.vbr_supported=true
129
130# Override BQR mask to enable LE Audio Choppy report, remove BTRT logging
131ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
132PRODUCT_PRODUCT_PROPERTIES += \
133    persist.bluetooth.bqr.event_mask=295006 \
134    persist.bluetooth.bqr.vnd_quality_mask=29 \
135    persist.bluetooth.bqr.vnd_trace_mask=0
136else
137PRODUCT_PRODUCT_PROPERTIES += \
138    persist.bluetooth.bqr.event_mask=295006 \
139    persist.bluetooth.bqr.vnd_quality_mask=16 \
140    persist.bluetooth.bqr.vnd_trace_mask=0
141endif
142
143# default BDADDR for EVB only
144PRODUCT_PROPERTY_OVERRIDES += \
145	ro.vendor.bluetooth.evb_bdaddr="22:22:22:33:44:55"
146
147# Spatial Audio
148PRODUCT_PACKAGES += \
149	libspatialaudio \
150	librondo
151
152# Bluetooth Super Wide Band
153PRODUCT_PRODUCT_PROPERTIES += \
154	bluetooth.hfp.swb.supported=true
155
156# Bluetooth LE Audio
157PRODUCT_PRODUCT_PROPERTIES += \
158	ro.bluetooth.leaudio_switcher.supported=true \
159	bluetooth.profile.bap.unicast.client.enabled=true \
160	bluetooth.profile.csip.set_coordinator.enabled=true \
161	bluetooth.profile.hap.client.enabled=true \
162	bluetooth.profile.mcp.server.enabled=true \
163	bluetooth.profile.ccp.server.enabled=true \
164	bluetooth.profile.vcp.controller.enabled=true
165
166ifeq ($(RELEASE_PIXEL_BROADCAST_ENABLED), true)
167PRODUCT_PRODUCT_PROPERTIES += \
168	bluetooth.profile.bap.broadcast.assist.enabled=true \
169	bluetooth.profile.bap.broadcast.source.enabled=true
170endif
171
172# Bluetooth LE Audio enable hardware offloading
173PRODUCT_PRODUCT_PROPERTIES += \
174	ro.bluetooth.leaudio_offload.supported=true \
175	persist.bluetooth.leaudio_offload.disabled=false
176
177# Bluetooth LE Auido offload capabilities setting
178PRODUCT_COPY_FILES += \
179	device/google/shusky/bluetooth/le_audio_codec_capabilities.xml:$(TARGET_COPY_OUT_VENDOR)/etc/le_audio_codec_capabilities.xml
180
181# Bluetooth LE Audio CIS handover to SCO
182# Set the property only for the controller couldn't support CIS/SCO simultaneously. More detailed in b/242908683.
183PRODUCT_PRODUCT_PROPERTIES += \
184	persist.bluetooth.leaudio.notify.idle.during.call=true
185
186# Support LE Audio dual mic SWB call
187PRODUCT_PRODUCT_PROPERTIES += \
188    bluetooth.leaudio.dual_bidirection_swb.supported=true
189
190# Support LE & Classic concurrent encryption (b/330704060)
191PRODUCT_PRODUCT_PROPERTIES += \
192    bluetooth.ble.allow_enc_with_bredr=true
193
194# Keymaster HAL
195#LOCAL_KEYMASTER_PRODUCT_PACKAGE ?= [email protected]
196
197# Gatekeeper HAL
198#LOCAL_GATEKEEPER_PRODUCT_PACKAGE ?= [email protected]
199
200
201# Gatekeeper
202# PRODUCT_PACKAGES += \
203# 	[email protected]
204
205# Keymint replaces Keymaster
206# PRODUCT_PACKAGES += \
207# 	android.hardware.security.keymint-service
208
209# Keymaster
210#PRODUCT_PACKAGES += \
211#	[email protected] \
212#	[email protected]
213
214#PRODUCT_PACKAGES += [email protected]
215#PRODUCT_PACKAGES += [email protected]
216#LOCAL_KEYMASTER_PRODUCT_PACKAGE := [email protected]
217#LOCAL_KEYMASTER_PRODUCT_PACKAGE ?= [email protected]
218
219# PRODUCT_PROPERTY_OVERRIDES += \
220# 	ro.hardware.keystore_desede=true \
221# 	ro.hardware.keystore=software \
222# 	ro.hardware.gatekeeper=software
223
224# PowerStats HAL
225PRODUCT_SOONG_NAMESPACES += \
226    device/google/shusky/powerstats/ripcurrent
227
228# WiFi Overlay
229PRODUCT_PACKAGES += \
230    WifiOverlay2023
231
232# Trusty liboemcrypto.so
233PRODUCT_SOONG_NAMESPACES += vendor/google_devices/shusky/prebuilts
234
235# UWB
236PRODUCT_SOONG_NAMESPACES += \
237    device/google/shusky/uwb
238
239# Location
240# SDK build system
241include device/google/gs-common/gps/brcm/device.mk
242
243PRODUCT_COPY_FILES += \
244       device/google/shusky/location/gps.cer:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.cer
245
246ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
247        PRODUCT_COPY_FILES += \
248            device/google/shusky/location/lhd.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/lhd.conf \
249            device/google/shusky/location/scd.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/scd.conf \
250            device/google/shusky/location/gps.xml:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml
251else
252        PRODUCT_COPY_FILES += \
253            device/google/shusky/location/lhd_user.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/lhd.conf \
254            device/google/shusky/location/scd_user.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/scd.conf \
255            device/google/shusky/location/gps_user.xml:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml
256endif
257
258# Set zram size
259PRODUCT_VENDOR_PROPERTIES += \
260	vendor.zram.size=50p \
261	persist.device_config.configuration.disable_rescue_party=true
262
263PRODUCT_VENDOR_PROPERTIES += \
264    persist.vendor.udfps.als_feed_forward_supported=true \
265    persist.vendor.udfps.lhbm_controlled_in_hal_supported=true
266
267# Camera Vendor property
268PRODUCT_VENDOR_PROPERTIES += \
269    persist.vendor.camera.front_720P_always_binning=true
270
271# Vibrator HAL
272$(call soong_config_set,haptics,kernel_ver,v$(subst .,_,$(TARGET_LINUX_KERNEL_VERSION)))
273ACTUATOR_MODEL := luxshare_ict_081545
274PRODUCT_VENDOR_PROPERTIES += \
275    persist.vendor.vibrator.hal.chirp.enabled=0 \
276    ro.vendor.vibrator.hal.device.mass=0.222 \
277    ro.vendor.vibrator.hal.loc.coeff=2.8
278
279# PKVM Memory Reclaim
280PRODUCT_VENDOR_PROPERTIES += \
281    hypervisor.memory_reclaim.supported=1
282
283# Enable APF by default
284PRODUCT_VENDOR_PROPERTIES += \
285    vendor.powerhal.apf_disabled=false \
286    vendor.powerhal.apf_enabled=true
287