1#
2# Copyright (C) 2011 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
17include device/google/gs-common/device.mk
18include device/google/gs-common/gs_watchdogd/watchdog.mk
19include device/google/gs-common/ramdump_and_coredump/ramdump_and_coredump.mk
20include device/google/gs-common/soc/soc.mk
21include device/google/gs-common/modem/modem.mk
22include device/google/gs-common/aoc/aoc.mk
23include device/google/gs-common/trusty/trusty.mk
24include device/google/gs-common/pcie/pcie.mk
25include device/google/gs-common/storage/storage.mk
26include device/google/gs-common/thermal/dump/thermal.mk
27include device/google/gs-common/thermal/thermal_hal/device.mk
28include device/google/gs-common/performance/perf.mk
29include device/google/gs-common/power/power.mk
30include device/google/gs-common/pixel_metrics/pixel_metrics.mk
31include device/google/gs-common/soc/freq.mk
32include device/google/gs-common/gps/dump/log.mk
33include device/google/gs-common/bcmbt/dump/dumplog.mk
34include device/google/gs-common/display/dump.mk
35include device/google/gs-common/display_logbuffer/dump.mk
36include device/google/gs-common/gxp/gxp.mk
37include device/google/gs-common/camera/dump.mk
38include device/google/gs-common/radio/dump.mk
39include device/google/gs-common/gear/dumpstate/aidl.mk
40include device/google/gs-common/umfw_stat/umfw_stat.mk
41include device/google/gs-common/widevine/widevine.mk
42include device/google/gs-common/sota_app/factoryota.mk
43include device/google/gs-common/misc_writer/misc_writer.mk
44include device/google/gs-common/gyotaku_app/gyotaku.mk
45include device/google/gs-common/bootctrl/bootctrl_aidl.mk
46include device/google/gs-common/betterbug/betterbug.mk
47include device/google/gs-common/fingerprint/fingerprint.mk
48
49include device/google/zuma/dumpstate/item.mk
50
51TARGET_BOARD_PLATFORM := zuma
52ALLOW_MISSING_DEPENDENCIES := true
53
54AB_OTA_POSTINSTALL_CONFIG += \
55	RUN_POSTINSTALL_system=true \
56	POSTINSTALL_PATH_system=system/bin/otapreopt_script \
57	FILESYSTEM_TYPE_system=ext4 \
58POSTINSTALL_OPTIONAL_system=true
59
60# Set Vendor SPL to match platform
61VENDOR_SECURITY_PATCH = $(PLATFORM_SECURITY_PATCH)
62
63# Set boot SPL
64BOOT_SECURITY_PATCH = $(PLATFORM_SECURITY_PATCH)
65
66# TODO(b/207450311): Remove this flag once implemented
67USE_PIXEL_GRALLOC := false
68ifeq ($(USE_PIXEL_GRALLOC),true)
69	PRODUCT_SOONG_NAMESPACES += hardware/google/gchips/GrallocHAL
70endif
71
72PRODUCT_SOONG_NAMESPACES += \
73	hardware/google/av \
74	hardware/google/gchips \
75	hardware/google/gchips/gralloc4 \
76	hardware/google/graphics/common \
77	hardware/google/graphics/zuma \
78	hardware/google/graphics/zuma/libhwc2.1 \
79	hardware/google/interfaces \
80	hardware/google/pixel \
81	device/google/zuma \
82	device/google/zuma/powerstats \
83	vendor/google_devices/common/chre/host/hal \
84	vendor/google_devices/zuma/proprietary/debugpolicy \
85	vendor/google/whitechapel/tools \
86	vendor/google/interfaces \
87	vendor/google_nos/host/android \
88	vendor/google_nos/test/system-test-harness \
89	vendor/google/camera
90
91LOCAL_KERNEL := $(TARGET_KERNEL_DIR)/Image.lz4
92
93# Set the environment variable to switch the Keymint HAL service to Rust
94TRUSTY_KEYMINT_IMPL := rust
95
96ifeq ($(RELEASE_AVF_ENABLE_LLPVM_CHANGES),true)
97	# Set the environment variable to enable the Secretkeeper HAL service.
98	SECRETKEEPER_ENABLED := true
99endif
100
101# OEM Unlock reporting
102PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
103	ro.oem_unlock_supported=1
104
105# Include vendor telephony soong namespace
106PRODUCT_SOONG_NAMESPACES += \
107	vendor/samsung_slsi/telephony/$(BOARD_USES_SHARED_VENDOR_TELEPHONY)
108
109ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
110#Set IKE logs to verbose for WFC
111PRODUCT_PROPERTY_OVERRIDES += log.tag.IKE=VERBOSE
112
113#Set Shannon IMS logs to debug
114PRODUCT_PROPERTY_OVERRIDES += log.tag.SHANNON_IMS=DEBUG
115
116#Set Shannon QNS logs to debug
117PRODUCT_PROPERTY_OVERRIDES += log.tag.ShannonQNS=DEBUG
118PRODUCT_PROPERTY_OVERRIDES += log.tag.ShannonQNS-ims=DEBUG
119PRODUCT_PROPERTY_OVERRIDES += log.tag.ShannonQNS-emergency=DEBUG
120PRODUCT_PROPERTY_OVERRIDES += log.tag.ShannonQNS-mms=DEBUG
121PRODUCT_PROPERTY_OVERRIDES += log.tag.ShannonQNS-xcap=DEBUG
122PRODUCT_PROPERTY_OVERRIDES += log.tag.ShannonQNS-HC=DEBUG
123
124# Modem userdebug
125include device/google/zuma/modem/userdebug.mk
126endif
127
128ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
129# b/36703476: Set default log size to 1M
130PRODUCT_PROPERTY_OVERRIDES += \
131	ro.logd.size=1M
132# b/114766334: persist all logs by default rotating on 30 files of 1MiB
133# change to 60 files for zuma
134PRODUCT_PROPERTY_OVERRIDES += \
135	logd.logpersistd=logcatd \
136	logd.logpersistd.size=60
137
138PRODUCT_PRODUCT_PROPERTIES += \
139	ro.logcat.compress=true
140endif
141
142# From system.property
143PRODUCT_PROPERTY_OVERRIDES += \
144	ro.telephony.default_network=27 \
145	persist.vendor.ril.db_ecc.use.iccid_to_plmn=1 \
146	persist.vendor.ril.db_ecc.id.type=5
147	#rild.libpath=/system/lib64/libsec-ril.so \
148	#rild.libargs=-d /dev/umts_ipc0
149
150# SIT-RIL Logging setting
151PRODUCT_PROPERTY_OVERRIDES += \
152	persist.vendor.ril.log_mask=3 \
153	persist.vendor.ril.log.base_dir=/data/vendor/radio/sit-ril \
154	persist.vendor.ril.log.chunk_size=5242880 \
155	persist.vendor.ril.log.num_file=3
156
157# Enable reboot free DSDS
158PRODUCT_PRODUCT_PROPERTIES += \
159	persist.radio.reboot_on_modem_change=false
160
161# Configure DSDS by default
162PRODUCT_PRODUCT_PROPERTIES += \
163	persist.radio.multisim.config=dsds
164
165# Enable Early Camping
166PRODUCT_PRODUCT_PROPERTIES += \
167	persist.vendor.ril.camp_on_earlier=1
168
169# Enable SET_SCREEN_STATE request
170PRODUCT_PROPERTY_OVERRIDES += \
171	persist.vendor.ril.enable_set_screen_state=1
172
173# Set the Bluetooth Class of Device
174# Service Field: 0x5A -> 90
175#    Bit 14: LE audio
176#    Bit 17: Networking
177#    Bit 19: Capturing
178#    Bit 20: Object Transfer
179#    Bit 22: Telephony
180# MAJOR_CLASS: 0x42 -> 66 (Phone)
181# MINOR_CLASS: 0x0C -> 12 (Smart Phone)
182PRODUCT_PRODUCT_PROPERTIES += \
183    bluetooth.device.class_of_device=90,66,12
184
185# Set supported Bluetooth profiles to enabled
186PRODUCT_PRODUCT_PROPERTIES += \
187	bluetooth.profile.asha.central.enabled?=true \
188	bluetooth.profile.a2dp.source.enabled?=true \
189	bluetooth.profile.avrcp.target.enabled?=true \
190	bluetooth.profile.bap.unicast.client.enabled?=true \
191	bluetooth.profile.bas.client.enabled?=true \
192	bluetooth.profile.csip.set_coordinator.enabled?=true \
193	bluetooth.profile.gatt.enabled?=true \
194	bluetooth.profile.hap.client.enabled?=true \
195	bluetooth.profile.hfp.ag.enabled?=true \
196	bluetooth.profile.hid.device.enabled?=true \
197	bluetooth.profile.hid.host.enabled?=true \
198	bluetooth.profile.map.server.enabled?=true \
199	bluetooth.profile.mcp.server.enabled?=true \
200	bluetooth.profile.opp.enabled?=true \
201	bluetooth.profile.pan.nap.enabled?=true \
202	bluetooth.profile.pan.panu.enabled?=true \
203	bluetooth.profile.pbap.server.enabled?=true \
204	bluetooth.profile.sap.server.enabled?=true \
205	bluetooth.profile.ccp.server.enabled?=true \
206	bluetooth.profile.vcp.controller.enabled?=true
207
208# Carrier configuration default location
209PRODUCT_PROPERTY_OVERRIDES += \
210	persist.vendor.radio.config.carrier_config_dir=/vendor/firmware/carrierconfig
211
212PRODUCT_PROPERTY_OVERRIDES += \
213	telephony.active_modems.max_count=2
214
215ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
216PRODUCT_PROPERTY_OVERRIDES += \
217	persist.vendor.usb.displayport.enabled=1
218else
219PRODUCT_PROPERTY_OVERRIDES += \
220	persist.vendor.usb.displayport.enabled=1
221endif
222
223PRODUCT_PROPERTY_OVERRIDES += \
224	persist.sys.hdcp_checking=drm-only
225
226USE_LASSEN_OEMHOOK := true
227# The "power-anomaly-sitril" is added into PRODUCT_SOONG_NAMESPACES when
228# $(USE_LASSEN_OEMHOOK) is true and $(BOARD_WITHOUT_RADIO) is not true.
229ifneq ($(BOARD_WITHOUT_RADIO),true)
230    $(call soong_config_set,sitril,use_lassen_oemhook_with_radio,true)
231    PRODUCT_SOONG_NAMESPACES += vendor/google/tools/power-anomaly-sitril
232endif
233
234# Use for GRIL
235USES_LASSEN_MODEM := true
236$(call soong_config_set, vendor_ril_google_feature, use_lassen_modem, true)
237ifneq ($(BOARD_WITHOUT_RADIO),true)
238$(call soong_config_set_bool,grilservice,use_google_qns,true)
239endif
240
241ifeq ($(USES_GOOGLE_DIALER_CARRIER_SETTINGS),true)
242USE_GOOGLE_DIALER := true
243USE_GOOGLE_CARRIER_SETTINGS := true
244# GoogleDialer in PDK build with "USES_GOOGLE_DIALER_CARRIER_SETTINGS=true"
245PRODUCT_SOONG_NAMESPACES += vendor/google_devices/zuma/proprietary/GoogleDialer
246endif
247
248ifeq ($(USES_GOOGLE_PREBUILT_MODEM_SVC),true)
249USE_GOOGLE_PREBUILT_MODEM_SVC := true
250endif
251
252# Audio client implementation for RIL
253USES_GAUDIO := true
254
255# ######################
256# GRAPHICS - GPU (begin)
257
258# Must match BOARD_USES_SWIFTSHADER in BoardConfig.mk
259USE_SWIFTSHADER := false
260
261# HWUI
262TARGET_USES_VULKAN = true
263
264# "vendor/arm" doesn't exist in PDK build
265ifeq (,$(realpath $(TOPDIR)vendor/arm/mali/valhall/Android.bp))
266PRODUCT_SOONG_NAMESPACES += \
267	vendor/google_devices/zuma/prebuilts/firmware/gpu \
268	vendor/google_devices/zuma/prebuilts/gpu
269else
270PRODUCT_SOONG_NAMESPACES += \
271	vendor/arm/mali/valhall
272endif
273
274$(call soong_config_set,pixel_mali,soc,$(TARGET_BOARD_PLATFORM))
275$(call soong_config_set,arm_gralloc,soc,$(TARGET_BOARD_PLATFORM))
276
277include device/google/gs-common/gpu/gpu.mk
278PRODUCT_PACKAGES += \
279	csffw_image_prebuilt__firmware_prebuilt_ttux_mali_csffw.bin \
280	libGLES_mali \
281	vulkan.mali \
282	libgpudataproducer
283
284# Install the OpenCL ICD Loader
285PRODUCT_SOONG_NAMESPACES += external/OpenCL-ICD-Loader
286PRODUCT_PACKAGES += \
287       libOpenCL \
288       mali_icd__customer_pixel_opencl-icd_ARM.icd
289ifeq ($(DEVICE_IS_64BIT_ONLY),false)
290PRODUCT_PACKAGES += \
291	mali_icd__customer_pixel_opencl-icd_ARM32.icd
292endif
293
294ifeq ($(USE_SWIFTSHADER),true)
295PRODUCT_PACKAGES += \
296	libEGL_angle \
297	libGLESv1_CM_angle \
298	libGLESv2_angle \
299	vulkan.pastel
300
301PRODUCT_VENDOR_PROPERTIES += \
302	ro.hardware.egl=angle \
303	ro.hardware.vulkan=pastel
304else
305PRODUCT_VENDOR_PROPERTIES += \
306	ro.hardware.egl=mali \
307	ro.hardware.vulkan=mali
308endif
309
310# Mali Configuration Properties
311PRODUCT_VENDOR_PROPERTIES += \
312	vendor.mali.platform.config=/vendor/etc/mali/platform.config \
313	vendor.mali.debug.config=/vendor/etc/mali/debug.config \
314	vendor.mali.base_protected_max_core_count=4 \
315	vendor.mali.base_protected_tls_max=67108864 \
316	vendor.mali.platform_agt_frequency_khz=24576
317
318PRODUCT_COPY_FILES += \
319	frameworks/native/data/etc/android.hardware.opengles.aep.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.opengles.aep.xml \
320	frameworks/native/data/etc/android.hardware.vulkan.version-1_3.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version.xml \
321	frameworks/native/data/etc/android.hardware.vulkan.level-1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level.xml \
322	frameworks/native/data/etc/android.hardware.vulkan.compute-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.compute.xml \
323	frameworks/native/data/etc/android.software.vulkan.deqp.level-2024-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.vulkan.deqp.level.xml \
324	frameworks/native/data/etc/android.software.opengles.deqp.level-2024-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.opengles.deqp.level.xml
325
326#endif
327
328# Configure EGL blobcache
329PRODUCT_VENDOR_PROPERTIES += \
330	ro.egl.blobcache.multifile=true \
331	ro.egl.blobcache.multifile_limit=33554432 \
332
333PRODUCT_VENDOR_PROPERTIES += \
334	ro.opengles.version=196610 \
335	graphics.gpu.profiler.support=true
336
337# b/295257834 Add HDR shaders to SurfaceFlinger's pre-warming cache
338PRODUCT_VENDOR_PROPERTIES += ro.surface_flinger.prime_shader_cache.ultrahdr=1
339
340# GRAPHICS - GPU (end)
341# ####################
342
343# Device Manifest, Device Compatibility Matrix for Treble
344DEVICE_MANIFEST_FILE := \
345	device/google/zuma/manifest.xml
346
347BOARD_USE_CODEC2_AIDL := V1
348ifneq (,$(filter aosp_%,$(TARGET_PRODUCT)))
349DEVICE_MANIFEST_FILE += \
350	device/google/zuma/manifest_media_aosp.xml
351
352PRODUCT_COPY_FILES += \
353	device/google/zuma/media_codecs_aosp_c2.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_c2.xml
354else
355DEVICE_MANIFEST_FILE += \
356	device/google/zuma/manifest_media.xml
357
358PRODUCT_COPY_FILES += \
359	device/google/zuma/media_codecs_bo_c2.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_c2.xml \
360	device/google/zuma/media_codecs_aosp_c2.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_aosp_c2.xml
361endif
362
363DEVICE_MATRIX_FILE := \
364	device/google/zuma/compatibility_matrix.xml
365
366DEVICE_PACKAGE_OVERLAYS += device/google/zuma/overlay
367
368# This device is shipped with 34 (Android U)
369PRODUCT_SHIPPING_API_LEVEL := 34
370
371# RKP VINTF
372-include vendor/google_nos/host/android/hals/keymaster/aidl/strongbox/RemotelyProvisionedComponent-citadel.mk
373
374# Enforce the Product interface
375PRODUCT_PRODUCT_VNDK_VERSION := current
376PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE := true
377
378# Init files
379PRODUCT_COPY_FILES += \
380	$(LOCAL_KERNEL):kernel \
381	device/google/zuma/conf/init.zuma.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.zuma.usb.rc \
382	device/google/zuma/conf/ueventd.zuma.rc:$(TARGET_COPY_OUT_VENDOR)/etc/ueventd.rc
383
384PRODUCT_COPY_FILES += \
385	device/google/zuma/conf/init.zuma.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.zuma.rc \
386	device/google/zuma/conf/init.persist.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.persist.rc
387
388ifeq (true,$(filter $(TARGET_BOOTS_16K) $(PRODUCT_16K_DEVELOPER_OPTION),true))
389PRODUCT_COPY_FILES += \
390	device/google/zuma/conf/init.efs.16k.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.efs.rc \
391	device/google/$(TARGET_BOARD_PLATFORM)/conf/fstab.efs.from_data:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.efs.from_data \
392
393PRODUCT_PACKAGES += copy_efs_files_to_data
394PRODUCT_PACKAGES += fsck.f2fs.vendor
395else
396PRODUCT_COPY_FILES += \
397	device/google/zuma/conf/init.efs.4k.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.efs.rc
398endif
399
400ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
401PRODUCT_COPY_FILES += \
402	device/google/zuma/conf/init.debug.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.debug.rc
403PRODUCT_COPY_FILES += \
404	device/google/zuma/conf/init.freq.userdebug.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.freq.userdebug.rc
405endif
406
407ifneq (,$(filter 5.%, $(TARGET_LINUX_KERNEL_VERSION)))
408PRODUCT_COPY_FILES += \
409	device/google/zuma/storage/5.15/init.zuma.storage.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.zuma.storage.rc
410else
411PRODUCT_COPY_FILES += \
412	device/google/zuma/storage/6.1/init.zuma.storage.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.zuma.storage.rc
413endif
414
415# Recovery files
416PRODUCT_COPY_FILES += \
417	device/google/zuma/conf/init.recovery.device.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.zuma.rc
418
419# Fstab files
420ifeq (ext4,$(TARGET_RW_FILE_SYSTEM_TYPE))
421PRODUCT_SOONG_NAMESPACES += \
422        device/google/zuma/conf/ext4
423else
424PRODUCT_SOONG_NAMESPACES += \
425        device/google/zuma/conf/f2fs
426endif
427
428PRODUCT_PACKAGES += \
429	fstab.zuma \
430	fstab.zuma.vendor_ramdisk \
431	fstab.zuma-fips \
432	fstab.zuma-fips.vendor_ramdisk
433
434PRODUCT_COPY_FILES += \
435	device/google/$(TARGET_BOARD_PLATFORM)/conf/fstab.persist:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.persist \
436	device/google/$(TARGET_BOARD_PLATFORM)/conf/fstab.modem:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.modem \
437	device/google/$(TARGET_BOARD_PLATFORM)/conf/fstab.efs:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.efs
438
439
440# Shell scripts
441PRODUCT_PACKAGES += \
442	disable_contaminant_detection.sh
443
444include device/google/gs-common/insmod/insmod.mk
445
446# Insmod config files
447PRODUCT_COPY_FILES += \
448	$(call find-copy-subdir-files,init.insmod.*.cfg,$(TARGET_KERNEL_DIR),$(TARGET_COPY_OUT_VENDOR_DLKM)/etc)
449
450# For creating dtbo image
451PRODUCT_HOST_PACKAGES += \
452	mkdtimg
453
454# CHRE
455## Tools
456ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
457PRODUCT_PACKAGES += \
458	chre_power_test_client \
459	chre_test_client \
460	chre_aidl_hal_client
461endif
462
463## HAL
464include device/google/gs-common/chre/hal.mk
465PRODUCT_COPY_FILES += \
466	frameworks/native/data/etc/android.hardware.context_hub.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.context_hub.xml
467
468## Enable the CHRE Daemon
469CHRE_USF_DAEMON_ENABLED := false
470CHRE_DEDICATED_TRANSPORT_CHANNEL_ENABLED := true
471
472# Filesystem management tools
473PRODUCT_PACKAGES += \
474	linker.vendor_ramdisk \
475	tune2fs.vendor_ramdisk \
476	resize2fs.vendor_ramdisk
477
478# Userdata Checkpointing OTA GC
479PRODUCT_PACKAGES += \
480	checkpoint_gc
481
482# Vendor verbose logging default property
483ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
484PRODUCT_PROPERTY_OVERRIDES += \
485	persist.vendor.verbose_logging_enabled=true
486else
487PRODUCT_PROPERTY_OVERRIDES += \
488	persist.vendor.verbose_logging_enabled=false
489endif
490
491# Vendor modem extensive logging default property
492PRODUCT_PROPERTY_OVERRIDES += \
493	persist.vendor.modem.extensive_logging_enabled=false
494
495# CP Logging properties
496PRODUCT_PROPERTY_OVERRIDES += \
497	ro.vendor.sys.modem.logging.loc = /data/vendor/slog \
498	persist.vendor.sys.silentlog.tcp = "On" \
499	ro.vendor.cbd.modem_removable = "1" \
500	ro.vendor.cbd.modem_type = "s5100sit" \
501	persist.vendor.sys.modem.logging.br_num=5 \
502	persist.vendor.sys.modem.logging.enable=true
503
504# Enable silent CP crash handling
505ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
506PRODUCT_PROPERTY_OVERRIDES += \
507	persist.vendor.ril.crash_handling_mode=1
508else
509PRODUCT_PROPERTY_OVERRIDES += \
510	persist.vendor.ril.crash_handling_mode=2
511endif
512
513# Add support dual SIM mode
514PRODUCT_PROPERTY_OVERRIDES += \
515	persist.vendor.radio.multisim_switch_support=true
516
517# RPMB TA
518PRODUCT_PACKAGES += \
519	tlrpmb
520
521# Touch firmware
522#PRODUCT_COPY_FILES += \
523	device/google/zuma/firmware/touch/s6sy761.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/s6sy761.fw
524# Touch
525PRODUCT_COPY_FILES += \
526	frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml
527
528# Sensors
529PRODUCT_COPY_FILES += \
530	frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.accelerometer.xml \
531	frameworks/native/data/etc/android.hardware.sensor.barometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.barometer.xml \
532	frameworks/native/data/etc/android.hardware.sensor.compass.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.compass.xml \
533	frameworks/native/data/etc/android.hardware.sensor.dynamic.head_tracker.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.dynamic.head_tracker.xml \
534	frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.gyroscope.xml \
535	frameworks/native/data/etc/android.hardware.sensor.hifi_sensors.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.hifi_sensors.xml \
536	frameworks/native/data/etc/android.hardware.sensor.light.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.light.xml\
537	frameworks/native/data/etc/android.hardware.sensor.proximity.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.proximity.xml \
538	frameworks/native/data/etc/android.hardware.sensor.stepcounter.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepcounter.xml \
539	frameworks/native/data/etc/android.hardware.sensor.stepdetector.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepdetector.xml
540
541# Add sensor HAL AIDL product packages
542PRODUCT_PACKAGES += android.hardware.sensors-service.multihal
543
544# USB HAL
545PRODUCT_PACKAGES += \
546	android.hardware.usb-service
547PRODUCT_PACKAGES += \
548	android.hardware.usb.gadget-service
549
550# MIDI feature
551PRODUCT_COPY_FILES += \
552	frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml
553
554# default usb debug functions
555ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
556PRODUCT_PROPERTY_OVERRIDES += \
557	persist.vendor.usb.usbradio.config=dm
558endif
559
560# adpf 16ms update rate
561PRODUCT_PRODUCT_PROPERTIES += \
562        vendor.powerhal.adpf.rate=16666666
563
564PRODUCT_COPY_FILES += \
565	device/google/zuma/task_profiles.json:$(TARGET_COPY_OUT_VENDOR)/etc/task_profiles.json
566
567-include hardware/google/pixel/power-libperfmgr/aidl/device.mk
568
569# IRQ rebalancing.
570include hardware/google/pixel/rebalance_interrupts/rebalance_interrupts.mk
571
572# PowerStats HAL
573PRODUCT_PACKAGES += \
574	android.hardware.power.stats-service.pixel
575
576#
577# Audio HALs
578#
579
580# Audio Configurations
581#USE_LEGACY_LOCAL_AUDIO_HAL := false
582#USE_XML_AUDIO_POLICY_CONF := 1
583
584# Enable AAudio MMAP/NOIRQ data path.
585PRODUCT_PROPERTY_OVERRIDES += aaudio.mmap_policy=2
586PRODUCT_PROPERTY_OVERRIDES += aaudio.mmap_exclusive_policy=2
587PRODUCT_PROPERTY_OVERRIDES += aaudio.hw_burst_min_usec=2000
588
589# Set util_clamp_min for s/w spatializer
590PRODUCT_PROPERTY_OVERRIDES += audio.spatializer.effect.util_clamp_min=300
591
592# Calliope firmware overwrite
593#PRODUCT_COPY_FILES += \
594	device/google/zuma/firmware/calliope_dram.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/calliope_dram.bin \
595	device/google/zuma/firmware/calliope_sram.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/calliope_sram.bin \
596	device/google/zuma/firmware/calliope_dram_2.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/calliope_dram_2.bin \
597	device/google/zuma/firmware/calliope_sram_2.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/calliope_sram_2.bin \
598	device/google/zuma/firmware/calliope2.dt:$(TARGET_COPY_OUT_VENDOR)/firmware/calliope2.dt \
599
600# Cannot reference variables defined in BoardConfig.mk, uncomment this if
601# BOARD_USE_OFFLOAD_AUDIO and BOARD_USE_OFFLOAD_EFFECT are true
602## AudioEffectHAL library
603#PRODUCT_PACKAGES += \
604#	libexynospostprocbundle
605
606# Cannot reference variables defined in BoardConfig.mk, uncomment this if
607# BOARD_USE_SOUNDTRIGGER_HAL is true
608#PRODUCT_PACKAGES += \
609#	sound_trigger.primary.maran9820
610
611# A-Box Service Daemon
612#PRODUCT_PACKAGES += main_abox
613
614# Libs
615PRODUCT_PACKAGES += \
616	com.android.future.usb.accessory
617
618PRODUCT_PACKAGES += \
619	android.hardware.memtrack-service.pixel \
620	libion_exynos \
621	libion
622
623PRODUCT_PACKAGES += \
624	libhwjpeg
625
626# Video Editor
627PRODUCT_PACKAGES += \
628	VideoEditorGoogle
629
630# WideVine modules
631include device/google/zuma/widevine/device.mk
632PRODUCT_PACKAGES += \
633	liboemcrypto \
634
635RIPCURRENT_PRODUCT := %ripcurrent
636ifneq (,$(filter $(RIPCURRENT_PRODUCT), $(TARGET_PRODUCT)))
637        LOCAL_TARGET_PRODUCT := ripcurrent
638else
639        # WAR: continue defaulting to slider build on zuma
640        LOCAL_TARGET_PRODUCT := slider
641endif
642
643# Lyric Camera HAL settings
644include device/google/gs-common/camera/lyric.mk
645$(call soong_config_set,lyric,soc,zuma)
646$(call soong_config_set,google3a_config,soc,zuma)
647
648# WiFi
649PRODUCT_PACKAGES += \
650	android.hardware.wifi-service \
651	wificond \
652	libwpa_client
653
654# Connectivity
655PRODUCT_PACKAGES += \
656        ConnectivityOverlay
657
658PRODUCT_PACKAGES_DEBUG += \
659	f2fs_io \
660	check_f2fs \
661	f2fs.fibmap \
662	dump.f2fs
663
664# Storage health HAL
665PRODUCT_PACKAGES += \
666	android.hardware.health.storage-service.default
667
668# Battery Mitigation
669include device/google/gs-common/battery_mitigation/bcl.mk
670# storage pixelstats
671-include hardware/google/pixel/pixelstats/device.mk
672
673# Enable project quotas and casefolding for emulated storage without sdcardfs
674$(call inherit-product, $(SRC_TARGET_DIR)/product/emulated_storage.mk)
675
676$(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota/android_t_baseline.mk)
677PRODUCT_VIRTUAL_AB_COMPRESSION_METHOD := lz4
678
679# Enforce generic ramdisk allow list
680$(call inherit-product, $(SRC_TARGET_DIR)/product/generic_ramdisk.mk)
681
682# Titan-M
683ifeq (,$(filter true, $(BOARD_WITHOUT_DTLS)))
684include device/google/gs-common/dauntless/gsc.mk
685endif
686
687PRODUCT_PACKAGES_DEBUG += \
688	WvInstallKeybox
689
690# Copy Camera HFD Setfiles
691#PRODUCT_COPY_FILES += \
692	device/google/zuma/firmware/camera/libhfd/default_configuration.hfd.cfg.json:$(TARGET_COPY_OUT_VENDOR)/firmware/default_configuration.hfd.cfg.json \
693	device/google/zuma/firmware/camera/libhfd/pp_cfg.json:$(TARGET_COPY_OUT_VENDOR)/firmware/pp_cfg.json \
694	device/google/zuma/firmware/camera/libhfd/tracker_cfg.json:$(TARGET_COPY_OUT_VENDOR)/firmware/tracker_cfg.json \
695	device/google/zuma/firmware/camera/libhfd/WithLightFixNoBN.SDNNmodel:$(TARGET_COPY_OUT_VENDOR)/firmware/WithLightFixNoBN.SDNNmodel
696
697# WiFi
698PRODUCT_COPY_FILES += \
699	frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \
700	frameworks/native/data/etc/android.hardware.wifi.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \
701	frameworks/native/data/etc/android.hardware.wifi.aware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.aware.xml \
702	frameworks/native/data/etc/android.hardware.wifi.passpoint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.passpoint.xml \
703	frameworks/native/data/etc/android.hardware.wifi.rtt.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.rtt.xml
704
705PRODUCT_COPY_FILES += \
706	frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml \
707	frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml
708
709PRODUCT_COPY_FILES += \
710	frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.flash-autofocus.xml \
711	frameworks/native/data/etc/android.hardware.camera.front.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.front.xml \
712	frameworks/native/data/etc/android.hardware.camera.concurrent.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.concurrent.xml \
713	frameworks/native/data/etc/android.hardware.camera.full.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.full.xml\
714	frameworks/native/data/etc/android.hardware.camera.raw.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.raw.xml\
715
716#PRODUCT_COPY_FILES += \
717	frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml \
718	frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \
719	frameworks/native/data/etc/android.hardware.wifi.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \
720	frameworks/native/data/etc/android.hardware.wifi.passpoint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.passpoint.xml \
721
722PRODUCT_COPY_FILES += \
723	frameworks/native/data/etc/android.hardware.audio.low_latency.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.low_latency.xml \
724	frameworks/native/data/etc/android.hardware.audio.pro.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.pro.xml \
725
726PRODUCT_COPY_FILES += \
727	frameworks/native/data/etc/android.software.ipsec_tunnels.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.ipsec_tunnels.xml \
728
729PRODUCT_PROPERTY_OVERRIDES += \
730	debug.slsi_platform=1 \
731	debug.hwc.winupdate=1
732
733ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
734PRODUCT_PACKAGES += displaycolor_service
735endif
736
737PRODUCT_PROPERTY_OVERRIDES += \
738	debug.sf.disable_backpressure=0 \
739	debug.sf.enable_gl_backpressure=1 \
740	debug.sf.enable_sdr_dimming=1 \
741        debug.sf.dim_in_gamma_in_enhanced_screenshots=1
742
743PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.use_phase_offsets_as_durations=1
744PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.late.sf.duration=10500000
745PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.late.app.duration=16600000
746PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.early.sf.duration=16600000
747PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.early.app.duration=16600000
748PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.earlyGl.sf.duration=16600000
749PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.earlyGl.app.duration=16600000
750PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.frame_rate_multiple_threshold=120
751PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.treat_170m_as_sRGB=1
752PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.hwc_hotplug_error_via_neg_vsync=1
753PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.hwc_hdcp_via_neg_vsync=1
754
755PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.enable_layer_caching=true
756PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.set_idle_timer_ms?=80
757PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.set_touch_timer_ms=200
758PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.set_display_power_timer_ms=1000
759PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.use_content_detection_for_refresh_rate=true
760PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.max_frame_buffer_acquired_buffers=3
761
762PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.supports_background_blur=1
763PRODUCT_SYSTEM_PROPERTIES += ro.launcher.blur.appLaunch=0
764
765# Must align with HAL types Dataspace
766# The data space of wide color gamut composition preference is Dataspace::DISPLAY_P3
767PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.wcg_composition_dataspace=143261696
768
769# Display
770PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.has_wide_color_display=true
771PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.has_HDR_display=true
772PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.use_color_management=true
773PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.protected_contents=true
774PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.display_update_imminent_timeout_ms=50
775
776PRODUCT_PROPERTY_OVERRIDES += \
777	persist.sys.sf.native_mode=2
778PRODUCT_COPY_FILES += \
779	device/google/zuma/display/display_colordata_cal0.pb:$(TARGET_COPY_OUT_VENDOR)/etc/display_colordata_cal0.pb \
780	device/google/zuma/display/display_colordata_cal2.pb:$(TARGET_COPY_OUT_VENDOR)/etc/display_colordata_cal2.pb
781
782# limit DPP downscale ratio
783PRODUCT_DEFAULT_PROPERTY_OVERRIDES += vendor.hwc.dpp.downscale=4
784
785# Cannot reference variables defined in BoardConfig.mk, uncomment this if
786# BOARD_USES_EXYNOS_DSS_FEATURE is true
787## set the dss enable status setup
788#PRODUCT_PROPERTY_OVERRIDES += \
789#        ro.exynos.dss=1
790
791# Cannot reference variables defined in BoardConfig.mk, uncomment this if
792# BOARD_USES_EXYNOS_AFBC_FEATURE is true
793# set the dss enable status setup
794PRODUCT_PROPERTY_OVERRIDES += \
795	ro.vendor.ddk.set.afbc=1
796
797PRODUCT_CHARACTERISTICS := nosdcard
798
799# WIFI COEX
800PRODUCT_COPY_FILES += \
801	device/google/zuma/wifi/coex_table.xml:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/coex_table.xml
802
803PRODUCT_PACKAGES += hostapd
804PRODUCT_PACKAGES += wpa_supplicant
805PRODUCT_PACKAGES += wpa_supplicant.conf
806
807WIFI_PRIV_CMD_UPDATE_MBO_CELL_STATUS := enabled
808
809ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
810PRODUCT_PACKAGES += wpa_cli
811PRODUCT_PACKAGES += hostapd_cli
812endif
813
814####################################
815## VIDEO
816####################################
817
818# Video
819PRODUCT_SOONG_NAMESPACES += vendor/google/media/bigwave
820
821$(call soong_config_set,bigw,soc,$(TARGET_BOARD_PLATFORM))
822
823PRODUCT_PACKAGES += \
824	google.hardware.media.c2@2.0-service \
825	libgc2_bw_store \
826	libgc2_bw_base \
827	libgc2_bw_av1_dec \
828	libgc2_bw_av1_enc \
829	libbw_av1dec \
830	libbw_av1enc \
831	libgc2_bw_cwl \
832	libgc2_bw_log \
833	libgc2_bw_utils
834
835# 1. Codec 2.0
836# for settings used by different C2 hal
837include device/google/gs-common/mediacodec/common/mediacodec_common.mk
838# for Exynos C2 Hal
839include device/google/gs-common/mediacodec/samsung/mediacodec_samsung.mk
840
841PRODUCT_COPY_FILES += \
842	device/google/zuma/media_codecs_performance_c2.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance_c2.xml \
843
844PRODUCT_PROPERTY_OVERRIDES += \
845       debug.c2.use_dmabufheaps=1 \
846       media.c2.dmabuf.padding=512 \
847       debug.stagefright.ccodec_delayed_params=1 \
848       ro.vendor.gpu.dataspace=1
849
850ifneq ($(BOARD_USE_CODEC2_AIDL), )
851PRODUCT_PROPERTY_OVERRIDES += \
852        debug.stagefright.c2-poolmask=1507328
853else
854PRODUCT_PROPERTY_OVERRIDES += \
855        debug.stagefright.c2-poolmask=458752
856endif
857
858# Create input surface on the framework side
859PRODUCT_PROPERTY_OVERRIDES += \
860	debug.stagefright.c2inputsurface=-1 \
861
862PRODUCT_PROPERTY_OVERRIDES += media.c2.hal.selection=aidl
863
864# 2. OpenMAX IL
865PRODUCT_COPY_FILES += \
866	device/google/zuma/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \
867	device/google/zuma/media_codecs_performance.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance.xml
868####################################
869
870# Telephony
871#PRODUCT_COPY_FILES += \
872	frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_telephony.xml
873
874# CBD (CP booting deamon)
875CBD_USE_V2 := true
876CBD_PROTOCOL_SIT := true
877
878# setup dalvik vm configs.
879$(call inherit-product, frameworks/native/build/phone-xhdpi-6144-dalvik-heap.mk)
880
881PRODUCT_TAGS += dalvik.gc.type-precise
882
883# Exynos OpenVX framework
884PRODUCT_PACKAGES += \
885		libexynosvision
886
887ifeq ($(TARGET_USES_CL_KERNEL),true)
888PRODUCT_PACKAGES += \
889	libopenvx-opencl
890endif
891
892# Trusty (KM, GK, Storage)
893$(call inherit-product, system/core/trusty/trusty-storage.mk)
894$(call inherit-product, system/core/trusty/trusty-base.mk)
895
896# Trusty unit test tool and code coverage tool
897PRODUCT_PACKAGES_DEBUG += \
898   trusty-ut-ctrl \
899   tipc-test \
900   trusty_stats_test \
901   trusty-coverage-controller \
902
903# Trusty Metrics Daemon
904PRODUCT_SOONG_NAMESPACES += \
905	vendor/google/trusty/common
906
907PRODUCT_PACKAGES += \
908	trusty_metricsd
909
910$(call soong_config_set,google_displaycolor,displaycolor_platform,zuma)
911PRODUCT_PACKAGES += \
912	android.hardware.composer.hwc3-service.pixel \
913	libdisplaycolor
914
915# Storage: for factory reset protection feature
916PRODUCT_PROPERTY_OVERRIDES += \
917	ro.frp.pst=/dev/block/by-name/frp
918
919# System props to enable Bluetooth Quality Report (BQR) feature
920ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
921PRODUCT_PRODUCT_PROPERTIES += \
922	persist.bluetooth.bqr.event_mask?=262174 \
923	persist.bluetooth.bqr.min_interval_ms=500
924else
925PRODUCT_PRODUCT_PROPERTIES += \
926	persist.bluetooth.bqr.event_mask?=30 \
927	persist.bluetooth.bqr.min_interval_ms=500
928endif
929
930#VNDK
931PRODUCT_PACKAGES += \
932	vndk-libs
933
934PRODUCT_ENFORCE_RRO_TARGETS := \
935	framework-res
936
937# Dynamic Partitions
938PRODUCT_USE_DYNAMIC_PARTITIONS := true
939
940# Use FUSE passthrough
941PRODUCT_PRODUCT_PROPERTIES += \
942	persist.sys.fuse.passthrough.enable=true
943
944# Use /product/etc/fstab.postinstall to mount system_other
945PRODUCT_PRODUCT_PROPERTIES += \
946	ro.postinstall.fstab.prefix=/product
947
948PRODUCT_COPY_FILES += \
949	device/google/zuma/conf/fstab.postinstall:$(TARGET_COPY_OUT_PRODUCT)/etc/fstab.postinstall
950
951# fastbootd
952PRODUCT_PACKAGES += \
953	android.hardware.fastboot@1.1-impl.pixel \
954	fastbootd
955
956#google iwlan
957PRODUCT_PACKAGES += \
958	Iwlan
959
960#Iwlan test app for userdebug/eng builds
961ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
962PRODUCT_PACKAGES += \
963	IwlanTestApp
964endif
965
966PRODUCT_PACKAGES += \
967	whitelist \
968	libstagefright_hdcp \
969	libskia_opt
970
971#PRODUCT_PACKAGES += \
972	mfc_fw.bin \
973	calliope_sram.bin \
974	calliope_dram.bin \
975	calliope_iva.bin \
976	vts.bin
977
978# This will be called only if IMSService is building with source code for dev branches.
979$(call inherit-product-if-exists, vendor/samsung_slsi/telephony/$(BOARD_USES_SHARED_VENDOR_TELEPHONY)/shannon-ims/device-vendor.mk)
980
981PRODUCT_PACKAGES += ShannonIms
982
983PRODUCT_PACKAGES += ShannonRcs
984
985# Exynos RIL and telephony
986# Multi SIM(DSDS)
987SIM_COUNT := 2
988$(call soong_config_set,sim,sim_count,$(SIM_COUNT))
989SUPPORT_MULTI_SIM := true
990
991# Support NR
992SUPPORT_NR := true
993# Support 5G on both stacks
994SUPPORT_NR_DS := true
995# Using IRadio 2.1
996USE_RADIO_HAL_2_1 := true
997# Using Early Send Device Info
998USE_EARLY_SEND_DEVICE_INFO := true
999
1000#$(call inherit-product, vendor/google_devices/telephony/common/device-vendor.mk)
1001#$(call inherit-product, vendor/google_devices/zuma/proprietary/device-vendor.mk)
1002
1003ifneq ($(BOARD_WITHOUT_RADIO),true)
1004$(call inherit-product-if-exists, vendor/samsung_slsi/telephony/$(BOARD_USES_SHARED_VENDOR_TELEPHONY)/common/device-vendor.mk)
1005endif
1006
1007$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit_only.mk)
1008#$(call inherit-product, hardware/google_devices/exynos5/exynos5.mk)
1009#$(call inherit-product-if-exists, hardware/google_devices/zuma/zuma.mk)
1010#$(call inherit-product-if-exists, vendor/google_devices/common/exynos-vendor.mk)
1011#$(call inherit-product-if-exists, hardware/broadcom/wlan/bcmdhd/firmware/bcm4375/device-bcm.mk)
1012include device/google/gs-common/sensors/sensors.mk
1013$(call soong_config_set,usf,target_soc,zuma)
1014
1015PRODUCT_COPY_FILES += \
1016	device/google/zuma/default-permissions.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/default-permissions/default-permissions.xml \
1017	device/google/zuma/component-overrides.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sysconfig/component-overrides.xml \
1018	frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml \
1019
1020ifneq ($(BOARD_WITHOUT_RADIO),true)
1021
1022# Use Lassen specifc Shared Modem Platform
1023SHARED_MODEM_PLATFORM_VENDOR := lassen
1024
1025# Shared Modem Platform
1026include device/google/gs-common/modem/modem_svc_sit/shared_modem_platform.mk
1027
1028# modem_ml_svc_sit daemon
1029PRODUCT_PACKAGES += modem_ml_svc_sit
1030
1031# modem ML models configs
1032ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
1033PRODUCT_COPY_FILES += \
1034	device/google/zuma/modem_ml/modem_ml_models_userdebug.conf:$(TARGET_COPY_OUT_VENDOR)/etc/modem_ml_models.conf
1035else
1036PRODUCT_COPY_FILES += \
1037	device/google/zuma/modem_ml/modem_ml_models_user.conf:$(TARGET_COPY_OUT_VENDOR)/etc/modem_ml_models.conf
1038endif
1039
1040# modem logging binary/configs
1041PRODUCT_PACKAGES += modem_logging_control
1042
1043# libeomservice_proxy binary/configs
1044PRODUCT_PACKAGES += liboemservice_proxy_default
1045
1046# PILOT SCENARIOS
1047PRODUCT_PACKAGES += \
1048	Pixel_stability.cfg \
1049	Pixel_stability.nprf
1050
1051# Default modem log mask for pixel logger
1052PRODUCT_PACKAGES += \
1053	logging.conf \
1054	default.cfg \
1055	default.nprf \
1056	default_metrics.xml \
1057	extensive_logging.conf
1058
1059# Log Masks for logmasklibrary below
1060# default modem log mask
1061PRODUCT_PACKAGES += \
1062	default_modem_log_mask.conf \
1063	default_modem_log_mask.cfg \
1064	default_modem_log_mask.nprf \
1065	default_modem_log_mask.xml
1066
1067# Empty modem log mask
1068PRODUCT_PACKAGES += \
1069	empty_modem_log_mask.conf \
1070	empty_modem_log_mask.cfg \
1071	empty_modem_log_mask.nprf \
1072	empty_modem_log_mask.xml
1073
1074# Lassen default log mask
1075PRODUCT_PACKAGES += \
1076	lassen_default.conf
1077
1078endif
1079
1080# Vibrator Diag
1081PRODUCT_PACKAGES_DEBUG += \
1082	diag-vibrator \
1083	diag-vibrator-cs40l25a \
1084	diag-vibrator-drv2624 \
1085	$(NULL)
1086
1087PRODUCT_PACKAGES += \
1088	android.hardware.health-service.zuma \
1089	android.hardware.health-service.zuma_recovery \
1090
1091# Audio
1092# Audio HAL Server & Default Implementations
1093ifeq ($(USE_AUDIO_HAL_AIDL),true)
1094include device/google/gs-common/audio/aidl.mk
1095else
1096include device/google/gs-common/audio/hidl_zuma.mk
1097endif
1098
1099## AoC soong
1100PRODUCT_SOONG_NAMESPACES += \
1101        vendor/google/whitechapel/aoc
1102
1103$(call soong_config_set,aoc,target_soc,$(TARGET_BOARD_PLATFORM))
1104$(call soong_config_set,aoc,target_product,$(TARGET_PRODUCT))
1105
1106#
1107## Audio properties
1108##Audio Vendor property
1109PRODUCT_PROPERTY_OVERRIDES += \
1110	persist.vendor.audio.cca.unsupported=false
1111
1112PRODUCT_PROPERTY_OVERRIDES += \
1113	ro.config.vc_call_vol_steps=7 \
1114	ro.config.media_vol_steps=25 \
1115	ro.audio.monitorRotation = true \
1116	ro.audio.offload_wakelock=false
1117
1118# vndservicemanager and vndservice no longer included in API 30+, however needed by vendor code.
1119# See b/148807371 for reference
1120PRODUCT_PACKAGES += vndservicemanager
1121PRODUCT_PACKAGES += vndservice
1122
1123## TinyTools, debug tool and cs35l41 speaker calibration tool for Audio
1124ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
1125PRODUCT_PACKAGES += \
1126	tinyplay \
1127	tinycap \
1128	tinymix \
1129	tinypcminfo \
1130	tinyhostless \
1131	cplay \
1132	aoc_hal \
1133	aoc_tuning_inft \
1134	mahal_test \
1135	ma_aoc_tuning_test \
1136	crus_sp_cal
1137endif
1138
1139PRODUCT_PACKAGES += \
1140	google.hardware.media.c2@1.0-service \
1141	libgc2_store \
1142	libgc2_base \
1143	libgc2_av1_dec \
1144	libbo_av1 \
1145	libgc2_cwl \
1146	libgc2_utils
1147
1148## Start packet router
1149include device/google/gs101/telephony/pktrouter.mk
1150
1151# Thermal HAL
1152PRODUCT_PROPERTY_OVERRIDES += persist.vendor.enable.thermal.genl=true
1153
1154# EdgeTPU
1155include device/google/gs-common/edgetpu/edgetpu.mk
1156# Config variables for TPU chip on device.
1157$(call soong_config_set,edgetpu_config,chip,rio)
1158# Include the edgetpu targets defined the namespaces below into the final image.
1159PRODUCT_SOONG_NAMESPACES += \
1160	vendor/google_devices/zuma/proprietary/gchips/tpu/metrics \
1161	vendor/google_devices/zuma/proprietary/gchips/tpu/tflite_delegate \
1162	vendor/google_devices/zuma/proprietary/gchips/tpu/darwinn_logging_service \
1163	vendor/google_devices/zuma/proprietary/gchips/tpu/nnapi_stable_aidl \
1164	vendor/google_devices/zuma/proprietary/gchips/tpu/aidl \
1165	vendor/google_devices/zuma/proprietary/gchips/tpu/hal \
1166	vendor/google_devices/zuma/proprietary/gchips/tpu/tachyon/tachyon_apis \
1167	vendor/google_devices/zuma/proprietary/gchips/tpu/tachyon/service
1168# TPU firmware
1169PRODUCT_PACKAGES += edgetpu-rio.fw
1170
1171# Connectivity Thermal Power Manager
1172PRODUCT_PACKAGES += \
1173	ConnectivityThermalPowerManager
1174
1175# A/B support
1176PRODUCT_PACKAGES += \
1177	otapreopt_script \
1178	cppreopts.sh \
1179	update_engine \
1180	update_engine_sideload \
1181	update_verifier
1182
1183# pKVM
1184$(call inherit-product, packages/modules/Virtualization/apex/product_packages.mk)
1185PRODUCT_BUILD_PVMFW_IMAGE := true
1186
1187# Enable to build standalone vendor_kernel_boot image.
1188PRODUCT_BUILD_VENDOR_KERNEL_BOOT_IMAGE := true
1189
1190# Enable watchdog timeout loop breaker.
1191PRODUCT_PROPERTY_OVERRIDES += \
1192	framework_watchdog.fatal_window.second=600 \
1193	framework_watchdog.fatal_count=3
1194
1195# Enable zygote critical window.
1196PRODUCT_PROPERTY_OVERRIDES += \
1197	zygote.critical_window.minute=10
1198
1199# Suspend properties
1200PRODUCT_PROPERTY_OVERRIDES += \
1201    suspend.short_suspend_threshold_millis=2000 \
1202    suspend.max_sleep_time_millis=40000 \
1203    suspend.short_suspend_backoff_enabled=true
1204
1205# Enable Incremental on the device
1206PRODUCT_PROPERTY_OVERRIDES += \
1207	ro.incremental.enable=true
1208
1209# Project
1210include hardware/google/pixel/common/pixel-common-device.mk
1211
1212# Pixel Logger
1213ifneq ($(BOARD_WITHOUT_RADIO),true)
1214include hardware/google/pixel/PixelLogger/PixelLogger.mk
1215else
1216BOARD_SEPOLICY_DIRS += hardware/google/pixel-sepolicy/logger_app
1217endif
1218
1219# RadioExt Version
1220USES_RADIOEXT_V1_6 = true
1221
1222# Wifi ext
1223include hardware/google/pixel/wifi_ext/device.mk
1224
1225# Battery Stats Viewer
1226PRODUCT_PACKAGES_DEBUG += BatteryStatsViewer
1227
1228# Install product specific framework compatibility matrix
1229# (TODO: b/169535506) This includes the FCM for system_ext and product partition.
1230# It must be split into the FCM of each partition.
1231DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/zuma/device_framework_matrix_product.xml
1232
1233# Keymint configuration
1234PRODUCT_COPY_FILES += \
1235    frameworks/native/data/etc/android.software.device_id_attestation.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.device_id_attestation.xml \
1236    frameworks/native/data/etc/android.hardware.device_unique_attestation.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.device_unique_attestation.xml
1237
1238# Call deleteAllKeys if vold detects a factory reset
1239PRODUCT_VENDOR_PROPERTIES += ro.crypto.metadata_init_delete_all_keys.enabled?=true
1240
1241# Use HCTR2 for filenames encryption on adoptable storage.
1242PRODUCT_PROPERTY_OVERRIDES += \
1243    ro.crypto.volume.options=aes-256-xts:aes-256-hctr2
1244
1245# Hardware Info Collection
1246include hardware/google/pixel/HardwareInfo/HardwareInfo.mk
1247
1248# UFS: the script is used to select the corresponding firmware to run FFU.
1249PRODUCT_PACKAGES_DEBUG += ufs_firmware_update.sh
1250
1251# RIL extension service
1252ifeq (,$(filter aosp_% factory_%,$(TARGET_PRODUCT)))
1253include device/google/gs-common/pixel_ril/ril.mk
1254endif
1255
1256# Touch service
1257include device/google/gs-common/touch/twoshay/aidl_zuma.mk
1258include device/google/gs-common/touch/twoshay/twoshay.mk
1259
1260# Allow longer timeout for incident report generation in bugreport
1261# Overriding in /product partition instead of /vendor intentionally,
1262# since it can't be overridden from /vendor.
1263PRODUCT_PRODUCT_PROPERTIES += \
1264	dumpstate.strict_run=false
1265