• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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# This file includes all definitions that apply to ALL marlin and sailfish devices
18#
19# Everything in this directory will become public
20
21# Installs gsi keys into ramdisk, to boot a GSI with verified boot.
22$(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_keys.mk)
23
24ifeq ($(TARGET_PREBUILT_KERNEL),)
25    LOCAL_KERNEL := device/google/marlin-kernel/Image.lz4-dtb
26else
27LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)
28endif
29
30PRODUCT_SHIPPING_API_LEVEL := 25
31
32PRODUCT_SOONG_NAMESPACES += \
33    device/google/marlin \
34    vendor/google/camera \
35    hardware/google/pixel
36
37PRODUCT_COPY_FILES += \
38    $(LOCAL_KERNEL):kernel \
39    frameworks/native/data/etc/android.software.verified_boot.xml:system/etc/permissions/android.software.verified_boot.xml
40
41DEVICE_PACKAGE_OVERLAYS += device/google/marlin/overlay
42
43PRODUCT_ENFORCE_RRO_TARGETS := \
44    framework-res
45
46# Input device files
47PRODUCT_COPY_FILES += \
48    device/google/marlin/gpio-keys.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/gpio-keys.kl \
49    device/google/marlin/qpnp_pon.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/qpnp_pon.kl \
50    device/google/marlin/uinput-fpc.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/uinput-fpc.kl \
51    device/google/marlin/uinput-fpc.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/uinput-fpc.idc \
52    device/google/marlin/synaptics_dsxv26.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/synaptics_dsxv26.idc \
53    frameworks/native/services/vr/virtual_touchpad/idc/vr-virtual-touchpad-0.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/vr-virtual-touchpad-0.idc \
54    frameworks/native/services/vr/virtual_touchpad/idc/vr-virtual-touchpad-1.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/vr-virtual-touchpad-1.idc \
55
56# copy customized media_profiles and media_codecs xmls for msm8996
57PRODUCT_COPY_FILES += \
58    device/google/marlin/media_profiles_V1_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml \
59    device/google/marlin/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml
60
61PRODUCT_COPY_FILES += \
62    device/google/marlin/media_codecs_performance.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance.xml
63
64# Override heap growth limit due to high display density on device
65PRODUCT_PROPERTY_OVERRIDES += \
66    dalvik.vm.heapgrowthlimit=256m \
67    ro.telephony.default_cdma_sub=0
68
69$(call inherit-product, frameworks/native/build/phone-xhdpi-2048-dalvik-heap.mk)
70$(call inherit-product, device/google/marlin/common/common64.mk)
71
72#Android EGL implementation
73PRODUCT_PACKAGES += libGLES_android
74PRODUCT_PACKAGES += SSRestartDetector
75
76# graphics
77PRODUCT_PROPERTY_OVERRIDES += \
78    ro.opengles.version=196610
79
80# b/73640835
81PRODUCT_PROPERTY_OVERRIDES += \
82    sdm.debug.rotator_downscale=1
83
84# Disable buffer age (b/74534157)
85PRODUCT_PROPERTY_OVERRIDES += \
86    debug.hwui.use_buffer_age=false
87
88# HWUI common settings
89PRODUCT_PROPERTY_OVERRIDES += \
90    ro.hwui.gradient_cache_size=1 \
91    ro.hwui.drop_shadow_cache_size=6 \
92    ro.hwui.r_buffer_cache_size=8 \
93    ro.hwui.texture_cache_flushrate=0.4 \
94    ro.hwui.text_small_cache_width=1024 \
95    ro.hwui.text_small_cache_height=1024 \
96    ro.hwui.text_large_cache_width=2048 \
97    ro.hwui.text_large_cache_height=1024
98
99# For android_filesystem_config.h
100PRODUCT_PACKAGES += fs_config_files \
101                    fs_config_dirs
102
103# Audio configuration
104USE_XML_AUDIO_POLICY_CONF := 1
105PRODUCT_COPY_FILES += \
106    device/google/marlin/audio_output_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_output_policy.conf \
107    device/google/marlin/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \
108    device/google/marlin/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml \
109    device/google/marlin/mixer_paths_tasha_t50.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_tasha_t50.xml \
110    device/google/marlin/aanc_tuning_mixer.txt:$(TARGET_COPY_OUT_VENDOR)/etc/aanc_tuning_mixer.txt \
111    device/google/marlin/sound_trigger_mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths.xml \
112    device/google/marlin/sound_trigger_mixer_paths_tasha_t50.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths_tasha_t50.xml \
113    device/google/marlin/sound_trigger_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_platform_info.xml \
114    device/google/marlin/audio_platform_info_tasha_t50.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info_tasha_t50.xml \
115    device/google/marlin/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
116    device/google/marlin/audio_policy_configuration_bluetooth_legacy_hal.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_bluetooth_legacy_hal.xml \
117    device/google/marlin/audio_policy_volumes_drc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes_drc.xml \
118    frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration.xml \
119    frameworks/av/services/audiopolicy/config/a2dp_in_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_in_audio_policy_configuration.xml \
120    frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration.xml \
121    frameworks/av/services/audiopolicy/config/hearing_aid_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/hearing_aid_audio_policy_configuration.xml \
122    frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
123    frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml \
124    frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
125    frameworks/native/data/etc/android.hardware.vulkan.compute-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.compute.xml \
126    frameworks/native/data/etc/android.hardware.vulkan.level-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level.xml \
127    frameworks/native/data/etc/android.hardware.vulkan.version-1_1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version.xml
128
129# Enable AAudio MMAP/NOIRQ data path.
130# 2 is AAUDIO_POLICY_AUTO so it will try MMAP then fallback to Legacy path.
131PRODUCT_PROPERTY_OVERRIDES += aaudio.mmap_policy=2
132# Allow EXCLUSIVE then fall back to SHARED.
133PRODUCT_PROPERTY_OVERRIDES += aaudio.mmap_exclusive_policy=2
134
135# Increase the apparent size of a hardware burst from 1 msec to 2 msec.
136# A "burst" is the number of frames processed at one time.
137# That is an increase from 48 to 96 frames at 48000 Hz.
138# The DSP will still be bursting at 48 frames but AAudio will think the burst is 96 frames.
139# A low number, like 48, might increase power consumption or stress the system.
140PRODUCT_PROPERTY_OVERRIDES += aaudio.hw_burst_min_usec=2000
141
142PRODUCT_FULL_TREBLE_OVERRIDE := true
143PRODUCT_PACKAGES += \
144    android.hardware.audio@2.0-service \
145    android.hardware.bluetooth.audio@2.0-impl \
146    android.hardware.contexthub@1.0-service \
147    android.hardware.gnss@1.0-service \
148    android.hardware.drm@1.0-service \
149    android.hardware.light@2.0-service \
150    android.hardware.memtrack@1.0-service \
151    android.hardware.power@1.1-service.marlin \
152    android.hardware.sensors@1.0-service \
153    android.hardware.vr@1.0-service \
154
155PRODUCT_PROPERTY_OVERRIDES += ro.hardware.power=marlin
156
157# RenderScript HAL
158PRODUCT_PACKAGES += \
159    android.hardware.renderscript@1.0-impl
160
161# Light HAL
162PRODUCT_PACKAGES += \
163    android.hardware.light@2.0-impl:64
164
165# Keymaster HAL
166PRODUCT_PACKAGES += \
167    android.hardware.keymaster@3.0-impl:64 \
168    android.hardware.keymaster@3.0-service
169
170# Usb HAL
171PRODUCT_PACKAGES += \
172    android.hardware.usb@1.1-service.marlin
173
174# DRM HAL
175PRODUCT_PACKAGES += \
176    move_widevine_data.sh
177
178# Audio effects
179PRODUCT_PACKAGES += \
180    libqcomvisualizer \
181    libqcomvoiceprocessing \
182    libqcomvoiceprocessingdescriptors \
183    libqcompostprocbundle
184
185PRODUCT_PACKAGES += \
186    sound_trigger.primary.msm8996
187
188PRODUCT_PACKAGES += \
189    android.hardware.audio@5.0-impl:32 \
190    android.hardware.audio.effect@5.0-impl:32 \
191    android.hardware.soundtrigger@2.2-impl:32
192
193PRODUCT_PACKAGES += \
194    android.hardware.drm@1.0-impl:32
195
196PRODUCT_PACKAGES += \
197    netutils-wrapper-1.0
198
199# set audio fluence, ns, aec property
200PRODUCT_PROPERTY_OVERRIDES += \
201    ro.qc.sdk.audio.fluencetype=fluencepro \
202    persist.audio.fluence.voicecall=true \
203    persist.audio.fluence.speaker=true \
204    persist.audio.fluence.voicecomm=true \
205    persist.audio.fluence.voicerec=false
206
207# WLAN driver configuration files
208PRODUCT_COPY_FILES += \
209    device/google/marlin/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf     \
210    device/google/marlin/p2p_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/p2p_supplicant_overlay.conf     \
211    device/google/marlin/WCNSS_cfg.dat:$(TARGET_COPY_OUT_VENDOR)/firmware/wlan/qca_cld/WCNSS_cfg.dat \
212    device/google/marlin/WCNSS_qcom_cfg.ini:$(TARGET_COPY_OUT_VENDOR)/firmware/wlan/qca_cld/WCNSS_qcom_cfg.ini
213
214# MIDI feature
215PRODUCT_COPY_FILES += \
216    frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml
217
218# Audio low latency feature
219PRODUCT_COPY_FILES += \
220    frameworks/native/data/etc/android.hardware.audio.low_latency.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.low_latency.xml
221
222# Pro audio feature
223PRODUCT_COPY_FILES += \
224    frameworks/native/data/etc/android.hardware.audio.pro.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.pro.xml
225
226# Camera
227PRODUCT_COPY_FILES += \
228    frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.flash-autofocus.xml \
229    frameworks/native/data/etc/android.hardware.camera.front.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.front.xml \
230    frameworks/native/data/etc/android.hardware.camera.full.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.full.xml \
231    frameworks/native/data/etc/android.hardware.camera.raw.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.raw.xml
232
233# Dumpstate HAL
234PRODUCT_PACKAGES += \
235    android.hardware.dumpstate@1.0-service.marlin
236
237# Wi-Fi
238PRODUCT_PACKAGES += \
239    android.hardware.wifi@1.0-service \
240    libwpa_client \
241    hostapd \
242    wificond \
243    wpa_supplicant \
244    wpa_supplicant.conf
245
246#ANT+ stack
247PRODUCT_PACKAGES += \
248    AntHalService \
249    libantradio \
250    antradio_app \
251    libvolumelistener
252
253# Sensor features
254PRODUCT_COPY_FILES += \
255    frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.accelerometer.xml \
256    frameworks/native/data/etc/android.hardware.sensor.compass.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.compass.xml \
257    frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.gyroscope.xml \
258    frameworks/native/data/etc/android.hardware.sensor.light.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.light.xml \
259    frameworks/native/data/etc/android.hardware.sensor.proximity.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.proximity.xml \
260    frameworks/native/data/etc/android.hardware.sensor.barometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.barometer.xml \
261    frameworks/native/data/etc/android.hardware.sensor.stepcounter.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepcounter.xml \
262    frameworks/native/data/etc/android.hardware.sensor.stepdetector.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepdetector.xml \
263    frameworks/native/data/etc/android.hardware.sensor.hifi_sensors.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.hifi_sensors.xml
264
265# VR features
266PRODUCT_COPY_FILES += \
267    frameworks/native/data/etc/android.hardware.vr.high_performance.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vr.high_performance.xml \
268    frameworks/native/data/etc/android.hardware.vr.headtracking-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vr.headtracking.xml \
269
270# new gatekeeper HAL
271PRODUCT_PACKAGES += \
272    android.hardware.gatekeeper@1.0-impl:64 \
273    android.hardware.gatekeeper@1.0-service
274
275# Common sensor packages
276TARGET_USES_NANOHUB_SENSORHAL := true
277NANOHUB_SENSORHAL_LID_STATE_ENABLED := true
278NANOHUB_SENSORHAL_SENSORLIST := $(LOCAL_PATH)/sensorhal/sensorlist.cpp
279NANOHUB_SENSORHAL_DIRECT_REPORT_ENABLED := true
280NANOHUB_SENSORHAL_DYNAMIC_SENSOR_EXT_ENABLED := true
281
282PRODUCT_PACKAGES += \
283    android.hardware.sensors@1.0-impl:64 \
284    android.hardware.contexthub@1.0-impl.nanohub:64 \
285
286PRODUCT_PACKAGES += \
287    nanoapp_cmd
288
289# sensor utilities (only for userdebug and eng builds)
290ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
291PRODUCT_PACKAGES += \
292    nanotool \
293    sensortest
294endif
295
296PRODUCT_COPY_FILES += \
297    device/google/marlin/sec_config:$(TARGET_COPY_OUT_VENDOR)/etc/sec_config
298
299#FEATURE_OPENGLES_EXTENSION_PACK support string config file
300PRODUCT_COPY_FILES += \
301    frameworks/native/data/etc/android.hardware.opengles.aep.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.opengles.aep.xml
302
303# MSM IRQ Balancer configuration file
304PRODUCT_COPY_FILES += \
305    device/google/marlin/msm_irqbalance.conf:$(TARGET_COPY_OUT_VENDOR)/etc/msm_irqbalance.conf
306
307# init scripts
308PRODUCT_COPY_FILES += \
309    device/google/marlin/init.common.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.rc \
310    device/google/marlin/init.common.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.usb.rc \
311    device/google/marlin/init.common.nanohub.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.nanohub.rc \
312    device/google/marlin/ueventd.common.rc:$(TARGET_COPY_OUT_VENDOR)/ueventd.rc \
313    device/google/marlin/init.radio.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.radio.sh \
314    device/google/marlin/init.power.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.power.sh \
315    device/google/marlin/init.mid.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.mid.sh \
316    device/google/marlin/init.foreground.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.foreground.sh \
317    device/google/marlin/init.qcom.devstart.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.qcom.devstart.sh
318
319# Reduce client buffer size for fast audio output tracks
320PRODUCT_PROPERTY_OVERRIDES += \
321    af.fast_track_multiplier=1
322
323# Low latency audio buffer size in frames
324PRODUCT_PROPERTY_OVERRIDES += \
325    audio_hal.period_size=192
326
327# Write Manufacturer & Model information in created media files.
328# IMPORTANT: ONLY SET THIS PROPERTY TO TRUE FOR PUBLIC DEVICES
329ifneq ($(filter aosp_sailfish% sailfish% aosp_marlin% marlin%, $(TARGET_PRODUCT)),)
330PRODUCT_PROPERTY_OVERRIDES += \
331    media.recorder.show_manufacturer_and_model=true
332else
333$(error "you must decide whether to write manufacturer and model information into created media files for this device. ONLY ENABLE IT FOR PUBLIC DEVICE.")
334endif  #TARGET_PRODUCT
335
336# By default, enable zram; experiment can toggle the flag,
337# which takes effect on boot
338PRODUCT_PROPERTY_OVERRIDES += \
339    persist.sys.zram_enabled=1
340
341PRODUCT_PROPERTY_OVERRIDES += \
342    persist.camera.gyro.android=4 \
343    persist.camera.tof.direct=1 \
344    persist.camera.tnr.preview=1 \
345    persist.camera.tnr.video=1
346
347PRODUCT_PROPERTY_OVERRIDES += \
348    persist.cne.feature=1 \
349    persist.radio.data_ltd_sys_ind=1 \
350    persist.radio.is_wps_enabled=true \
351    persist.radio.RATE_ADAPT_ENABLE=1 \
352    persist.radio.ROTATION_ENABLE=1 \
353    persist.radio.sw_mbn_update=1 \
354    persist.radio.videopause.mode=1 \
355    persist.radio.VT_ENABLE=1 \
356    persist.radio.VT_HYBRID_ENABLE=1 \
357    persist.radio.data_con_rprt=true \
358    persist.rcs.supported=1 \
359    rild.libpath=/vendor/lib64/libril-qc-qmi-1.so
360
361PRODUCT_PROPERTY_OVERRIDES += \
362    persist.data.mode=concurrent
363
364# Enable SM log mechanism by default
365ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
366PRODUCT_PROPERTY_OVERRIDES += \
367    persist.radio.smlog_switch=1 \
368    ro.radio.log_prefix="modem_log_" \
369    ro.radio.log_loc="/data/smlog_dump"
370endif
371
372# Disable snapshot feature
373PRODUCT_PROPERTY_OVERRIDES += \
374    persist.radio.snapshot_enabled=0 \
375    persist.radio.snapshot_timer=0
376
377# IMS over WiFi
378PRODUCT_PROPERTY_OVERRIDES += \
379    persist.data.iwlan.enable=true
380
381# LTE, CDMA, GSM/WCDMA
382PRODUCT_PROPERTY_OVERRIDES += \
383    ro.telephony.default_network=10 \
384    telephony.lteOnCdmaDevice=1
385
386PRODUCT_AAPT_CONFIG += xlarge large
387PRODUCT_CHARACTERISTICS := nosdcard
388
389# Enable camera EIS
390# eis.enable: enables electronic image stabilization
391# is_type: sets image stabilization type
392PRODUCT_PROPERTY_OVERRIDES += \
393    persist.camera.eis.enable=1 \
394    persist.camera.is_type=4
395
396# Fingerprint HIDL implementation
397PRODUCT_PACKAGES += \
398    android.hardware.biometrics.fingerprint@2.1-service
399
400PRODUCT_COPY_FILES += \
401    frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml
402
403INIT_COMMON_DIAG_RC := $(TARGET_COPY_OUT_VENDOR)/etc/init/init.diag.rc
404
405# Modem debugger
406ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
407PRODUCT_COPY_FILES += \
408    device/google/marlin/init.common.diag.rc.userdebug:$(INIT_COMMON_DIAG_RC)
409
410# Subsystem ramdump
411PRODUCT_PROPERTY_OVERRIDES += \
412    persist.sys.ssr.enable_ramdumps=1
413else
414PRODUCT_COPY_FILES += \
415    device/google/marlin/init.common.diag.rc.user:$(INIT_COMMON_DIAG_RC)
416endif
417
418# Subsystem silent restart
419PRODUCT_PROPERTY_OVERRIDES += \
420    persist.sys.ssr.restart_level=venus,AR6320,slpi,modem,adsp
421
422PRODUCT_COPY_FILES += \
423    device/google/marlin/thermal-engine-marlin.conf:$(TARGET_COPY_OUT_VENDOR)/etc/thermal-engine.conf \
424    device/google/marlin/thermal-engine-marlin-vr.conf:$(TARGET_COPY_OUT_VENDOR)/etc/thermal-engine-vr.conf
425
426$(call inherit-product-if-exists, hardware/qcom/msm8996/msm8996.mk)
427$(call inherit-product-if-exists, vendor/qcom/gpu/msm8996/msm8996-gpu-vendor.mk)
428
429# Needed for encryption
430PRODUCT_PACKAGES += \
431    keystore.msm8996 \
432    gatekeeper.msm8996
433
434# Use the A/B updater.
435AB_OTA_UPDATER := true
436PRODUCT_PACKAGES += \
437    update_engine \
438    update_verifier
439
440# Enable update engine sideloading by including the static version of the
441# boot_control HAL and its dependencies.
442PRODUCT_STATIC_BOOT_CONTROL_HAL := \
443    bootctrl.msm8996 \
444    libgptutils \
445    libz \
446    libcutils
447PRODUCT_PACKAGES += \
448    update_engine_sideload
449
450# Tell the system to enable copying odexes from other partition.
451PRODUCT_PACKAGES += \
452	cppreopts.sh
453
454PRODUCT_PROPERTY_OVERRIDES += \
455    ro.cp_system_other_odex=1
456
457PRODUCT_PACKAGES_DEBUG += \
458    update_engine_client
459
460# A/B updater updatable partitions list. Keep in sync with the partition list
461# with "_a" and "_b" variants in the device. Note that the vendor can add more
462# more partitions to this list for the bootloader and radio.
463AB_OTA_PARTITIONS += \
464    boot \
465    system
466
467# Bluetooth HAL
468PRODUCT_PACKAGES += \
469    android.hardware.bluetooth@1.0-impl-qti:64 \
470    android.hardware.bluetooth@1.0-service-qti \
471    android.hardware.bluetooth@1.0-service-qti.rc
472
473# Bluetooth SoC
474PRODUCT_PROPERTY_OVERRIDES += \
475    vendor.qcom.bluetooth.soc=rome
476
477# Property for loading BDA from bdaddress module in kernel
478PRODUCT_PROPERTY_OVERRIDES += \
479    ro.vendor.bt.bdaddr_path=/sys/module/bdaddress/parameters/bdaddress
480
481# Bluetooth WiPower
482PRODUCT_PROPERTY_OVERRIDES += \
483    ro.vendor.bluetooth.emb_wp_mode=true \
484    ro.vendor.bluetooth.wipower=true
485
486# NFC packages
487PRODUCT_PACKAGES += \
488    NfcNci \
489    Tag \
490    android.hardware.nfc@1.1-service \
491
492#Secure Element Service
493PRODUCT_PACKAGES += \
494    SecureElement \
495
496#GNSS HAL
497PRODUCT_PACKAGES += \
498    android.hardware.gnss@1.0-impl:64
499
500# Vibrator
501PRODUCT_PACKAGES += \
502    android.hardware.vibrator@1.0-service.marlin \
503
504# Thermal HAL
505PRODUCT_PACKAGES += \
506    android.hardware.thermal@2.0-service.pixel
507
508PRODUCT_COPY_FILES += \
509    device/google/marlin/thermal_info_config.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json
510
511PRODUCT_PROPERTY_OVERRIDES += \
512    vendor.thermal.config=thermal_info_config.json
513
514# VR
515PRODUCT_PACKAGES += \
516    android.hardware.vr@1.0-impl:64
517
518# Gralloc
519PRODUCT_PACKAGES += \
520    android.hardware.graphics.allocator@2.0-impl:64 \
521    android.hardware.graphics.allocator@2.0-service \
522    android.hardware.graphics.mapper@2.0-impl-2.1
523
524# HW Composer
525PRODUCT_PACKAGES += \
526    android.hardware.graphics.composer@2.1-impl:64 \
527    android.hardware.graphics.composer@2.1-service
528
529# Boot control
530PRODUCT_PACKAGES += \
531    android.hardware.boot@1.0-impl:64 \
532    android.hardware.boot@1.0-service
533
534# Library used for VTS tests  (only for userdebug and eng builds)
535ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
536# For VTS profiling.
537PRODUCT_PACKAGES += \
538     libvts_profiling \
539     libvts_multidevice_proto
540endif
541
542# NFC/camera interaction workaround - DO NOT COPY TO NEW DEVICES
543PRODUCT_PROPERTY_OVERRIDES += \
544    ro.camera.notify_nfc=1
545
546PRODUCT_COPY_FILES += \
547    device/google/marlin/nfc/libnfc-nci.conf:$(TARGET_COPY_OUT_PRODUCT)/etc/libnfc-nci.conf \
548    device/google/marlin/nfc/libpn551_fw.so:$(TARGET_COPY_OUT_VENDOR)/lib/libpn551_fw.so
549
550# Bootloader HAL used for A/B updates.
551PRODUCT_PACKAGES += \
552    bootctrl.msm8996
553PRODUCT_PACKAGES_DEBUG += \
554    bootctl
555
556# Storage: for factory reset protection feature
557PRODUCT_PROPERTY_OVERRIDES += \
558    ro.frp.pst=/dev/block/platform/soc/624000.ufshc/by-name/frp
559
560PRODUCT_PROPERTY_OVERRIDES += \
561    sdm.debug.disable_rotator_split=1 \
562    qdcm.only_pcc_for_trans=1 \
563    qdcm.diagonal_matrix_mode=1
564
565# Enable low power video mode for 4K encode
566PRODUCT_PROPERTY_OVERRIDES += \
567    vidc.debug.perf.mode=2
568
569# OEM Unlock reporting
570PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
571    ro.oem_unlock_supported=1
572
573# Setup dm-verity configs
574PRODUCT_SYSTEM_VERITY_PARTITION := /dev/block/platform/soc/624000.ufshc/by-name/system
575PRODUCT_VENDOR_VERITY_PARTITION := /dev/block/platform/soc/624000.ufshc/by-name/vendor
576$(call inherit-product, build/target/product/verity.mk)
577
578# Partitions (listed in the file) to be wiped under recovery.
579TARGET_RECOVERY_WIPE := \
580    device/google/marlin/recovery.wipe.common
581
582# GPS configuration file
583PRODUCT_COPY_FILES += \
584    device/google/marlin/gps.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gps.conf
585
586# Default permission grant exceptions
587PRODUCT_COPY_FILES += \
588    device/google/marlin/default-permissions.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default-permissions/default-permissions.xml
589
590# A/B OTA dexopt package
591PRODUCT_PACKAGES += otapreopt_script
592
593# A/B OTA dexopt update_engine hookup
594AB_OTA_POSTINSTALL_CONFIG += \
595    RUN_POSTINSTALL_system=true \
596    POSTINSTALL_PATH_system=system/bin/otapreopt_script \
597    FILESYSTEM_TYPE_system=ext4 \
598    POSTINSTALL_OPTIONAL_system=true
599
600#Reduce cost of scrypt for FBE CE decryption
601PRODUCT_PROPERTY_OVERRIDES += \
602    ro.crypto.scrypt_params=13:3:1
603
604# Set if a device image has the VTS coverage instrumentation.
605ifeq ($(NATIVE_COVERAGE),true)
606PRODUCT_PROPERTY_OVERRIDES += \
607    ro.vts.coverage=1
608PRODUCT_SUPPORTS_VERITY_FEC := false
609endif
610
611# b/35633646
612# Statically linked toybox for modprobe in recovery mode
613PRODUCT_PACKAGES += \
614    toybox_static
615
616# b/30349163
617# Set Marlin/Sailfish default log size on userdebug/eng build to 1M
618ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
619PRODUCT_PROPERTY_OVERRIDES += ro.logd.size=1M
620endif
621
622# b/32109329
623# Workaround for audio glitches
624PRODUCT_PROPERTY_OVERRIDES += \
625    audio.adm.buffering.ms=3
626
627# Vendor seccomp policy files for media components:
628PRODUCT_COPY_FILES += \
629    device/google/marlin/seccomp_policy/mediacodec.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediacodec.policy
630
631# whitelisted app
632PRODUCT_COPY_FILES += \
633    device/google/marlin/qti_whitelist.xml:system/etc/sysconfig/qti_whitelist.xml
634
635# Privileged permissions whitelist
636PRODUCT_COPY_FILES += \
637    device/google/marlin/permissions/privapp-permissions-marlin.xml:system/etc/permissions/privapp-permissions-marlin.xml
638
639PRODUCT_PACKAGES += \
640    vndk-sp
641
642# Marlin/Sailfish kernel doesn't have HEH filename encryption
643PRODUCT_PROPERTY_OVERRIDES += \
644    ro.crypto.volume.filenames_mode=aes-256-cts
645
646# Enable Perfetto traced
647PRODUCT_PROPERTY_OVERRIDES += \
648    persist.traced.enable=1
649
650# health HAL
651PRODUCT_PACKAGES += \
652    android.hardware.health@2.0-service.marlin
653
654# default atrace HAL
655PRODUCT_PACKAGES += \
656    android.hardware.atrace@1.0-service
657
658# a_sns_test for sensor testing
659PRODUCT_PACKAGES_DEBUG += a_sns_test
660
661# Write flags to the vendor space in /misc partition.
662PRODUCT_PACKAGES += \
663    misc_writer
664