• 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
21ifeq ($(TARGET_PREBUILT_KERNEL),)
22    LOCAL_KERNEL := device/google/marlin-kernel/Image.gz-dtb
23else
24LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)
25endif
26
27PRODUCT_SHIPPING_API_LEVEL := 24
28
29PRODUCT_COPY_FILES += \
30    $(LOCAL_KERNEL):kernel
31
32DEVICE_PACKAGE_OVERLAYS += device/google/marlin/overlay
33
34# Input device files
35PRODUCT_COPY_FILES += \
36    device/google/marlin/gpio-keys.kl:system/usr/keylayout/gpio-keys.kl \
37    device/google/marlin/qpnp_pon.kl:system/usr/keylayout/qpnp_pon.kl \
38    device/google/marlin/uinput-fpc.kl:system/usr/keylayout/uinput-fpc.kl \
39    device/google/marlin/uinput-fpc.idc:system/usr/idc/uinput-fpc.idc \
40    device/google/marlin/synaptics_dsxv26.idc:system/usr/idc/synaptics_dsxv26.idc
41
42# copy customized media_profiles and media_codecs xmls for msm8996
43PRODUCT_COPY_FILES += device/google/marlin/media_profiles.xml:system/etc/media_profiles.xml \
44                      device/google/marlin/media_codecs.xml:system/etc/media_codecs.xml \
45                      device/google/marlin/media_codecs_performance.xml:system/etc/media_codecs_performance.xml
46
47# Override heap growth limit due to high display density on device
48PRODUCT_PROPERTY_OVERRIDES += \
49    dalvik.vm.heapgrowthlimit=256m \
50    ro.telephony.default_cdma_sub=0
51
52$(call inherit-product, frameworks/native/build/phone-xhdpi-2048-dalvik-heap.mk)
53$(call inherit-product, device/google/marlin/common/common64.mk)
54
55#Android EGL implementation
56PRODUCT_PACKAGES += libGLES_android
57PRODUCT_PACKAGES += SSRestartDetector
58
59ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
60PRODUCT_PACKAGES += TelephonyMonitor
61endif
62
63# graphics
64PRODUCT_PROPERTY_OVERRIDES += \
65    ro.opengles.version=196610
66
67# HWUI common settings
68PRODUCT_PROPERTY_OVERRIDES += \
69    ro.hwui.gradient_cache_size=1 \
70    ro.hwui.drop_shadow_cache_size=6 \
71    ro.hwui.r_buffer_cache_size=8 \
72    ro.hwui.texture_cache_flushrate=0.4 \
73    ro.hwui.text_small_cache_width=1024 \
74    ro.hwui.text_small_cache_height=1024 \
75    ro.hwui.text_large_cache_width=2048 \
76    ro.hwui.text_large_cache_height=1024
77
78# For android_filesystem_config.h
79PRODUCT_PACKAGES += fs_config_files \
80                    fs_config_dirs
81
82# Audio configuration
83USE_XML_AUDIO_POLICY_CONF := 1
84PRODUCT_COPY_FILES += \
85    device/google/marlin/audio_output_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_output_policy.conf \
86    device/google/marlin/audio_effects.conf:system/etc/audio_effects.conf \
87    device/google/marlin/mixer_paths.xml:system/etc/mixer_paths.xml \
88    device/google/marlin/mixer_paths_tasha_t50.xml:system/etc/mixer_paths_tasha_t50.xml \
89    device/google/marlin/aanc_tuning_mixer.txt:system/etc/aanc_tuning_mixer.txt \
90    device/google/marlin/sound_trigger_mixer_paths.xml:system/etc/sound_trigger_mixer_paths.xml \
91    device/google/marlin/sound_trigger_mixer_paths_tasha_t50.xml:system/etc/sound_trigger_mixer_paths_tasha_t50.xml \
92    device/google/marlin/sound_trigger_platform_info.xml:system/etc/sound_trigger_platform_info.xml \
93    device/google/marlin/audio_platform_info.xml:system/etc/audio_platform_info.xml \
94    device/google/marlin/audio_platform_info_tasha_t50.xml:system/etc/audio_platform_info_tasha_t50.xml \
95    device/google/marlin/audio_policy_configuration.xml:system/etc/audio_policy_configuration.xml \
96    device/google/marlin/audio_policy_volumes_drc.xml:system/etc/audio_policy_volumes_drc.xml \
97    frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:system/etc/a2dp_audio_policy_configuration.xml \
98    frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:system/etc/r_submix_audio_policy_configuration.xml \
99    frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:system/etc/usb_audio_policy_configuration.xml \
100    frameworks/av/services/audiopolicy/config/default_volume_tables.xml:system/etc/default_volume_tables.xml \
101    frameworks/native/data/etc/android.hardware.vulkan.level-0.xml:system/etc/permissions/android.hardware.vulkan.level.xml \
102    frameworks/native/data/etc/android.hardware.vulkan.version-1_0_3.xml:system/etc/permissions/android.hardware.vulkan.version.xml
103
104# Audio effects
105PRODUCT_PACKAGES += \
106    libqcomvisualizer \
107    libqcomvoiceprocessing \
108    libqcomvoiceprocessingdescriptors \
109    libqcompostprocbundle
110
111PRODUCT_PACKAGES += \
112    sound_trigger.primary.msm8996
113
114# set audio fluence, ns, aec property
115PRODUCT_PROPERTY_OVERRIDES += \
116    ro.qc.sdk.audio.fluencetype=fluencepro \
117    persist.audio.fluence.voicecall=true \
118    persist.audio.fluence.speaker=true \
119    persist.audio.fluence.voicecomm=true \
120    persist.audio.fluence.voicerec=false
121
122# WLAN driver configuration files
123PRODUCT_COPY_FILES += \
124    device/google/marlin/wpa_supplicant_overlay.conf:system/etc/wifi/wpa_supplicant_overlay.conf     \
125    device/google/marlin/p2p_supplicant_overlay.conf:system/etc/wifi/p2p_supplicant_overlay.conf     \
126    device/google/marlin/WCNSS_cfg.dat:system/etc/firmware/wlan/qca_cld/WCNSS_cfg.dat \
127    device/google/marlin/WCNSS_qcom_cfg.ini:system/etc/firmware/wlan/qca_cld/WCNSS_qcom_cfg.ini
128
129# MIDI feature
130PRODUCT_COPY_FILES += \
131    frameworks/native/data/etc/android.software.midi.xml:system/etc/permissions/android.software.midi.xml
132
133# Audio low latency feature
134PRODUCT_COPY_FILES += \
135    frameworks/native/data/etc/android.hardware.audio.low_latency.xml:system/etc/permissions/android.hardware.audio.low_latency.xml
136
137# Pro audio feature
138PRODUCT_COPY_FILES += \
139    frameworks/native/data/etc/android.hardware.audio.pro.xml:system/etc/permissions/android.hardware.audio.pro.xml
140
141# Camera
142PRODUCT_COPY_FILES += \
143    frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:system/etc/permissions/android.hardware.camera.flash-autofocus.xml \
144    frameworks/native/data/etc/android.hardware.camera.front.xml:system/etc/permissions/android.hardware.camera.front.xml \
145    frameworks/native/data/etc/android.hardware.camera.full.xml:system/etc/permissions/android.hardware.camera.full.xml \
146    frameworks/native/data/etc/android.hardware.camera.raw.xml:system/etc/permissions/android.hardware.camera.raw.xml
147
148# Wi-Fi
149PRODUCT_PACKAGES += \
150    libwpa_client \
151    hostapd \
152    wpa_supplicant \
153    wpa_supplicant.conf
154
155# Listen configuration file
156PRODUCT_COPY_FILES += \
157    device/google/marlin/listen_platform_info.xml:system/etc/listen_platform_info.xml
158
159#ANT+ stack
160PRODUCT_PACKAGES += \
161    AntHalService \
162    libantradio \
163    antradio_app \
164    libvolumelistener
165
166# Sensor features
167PRODUCT_COPY_FILES += \
168    frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:system/etc/permissions/android.hardware.sensor.accelerometer.xml \
169    frameworks/native/data/etc/android.hardware.sensor.compass.xml:system/etc/permissions/android.hardware.sensor.compass.xml \
170    frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:system/etc/permissions/android.hardware.sensor.gyroscope.xml \
171    frameworks/native/data/etc/android.hardware.sensor.light.xml:system/etc/permissions/android.hardware.sensor.light.xml \
172    frameworks/native/data/etc/android.hardware.sensor.proximity.xml:system/etc/permissions/android.hardware.sensor.proximity.xml \
173    frameworks/native/data/etc/android.hardware.sensor.barometer.xml:system/etc/permissions/android.hardware.sensor.barometer.xml \
174    frameworks/native/data/etc/android.hardware.sensor.stepcounter.xml:system/etc/permissions/android.hardware.sensor.stepcounter.xml \
175    frameworks/native/data/etc/android.hardware.sensor.stepdetector.xml:system/etc/permissions/android.hardware.sensor.stepdetector.xml \
176    frameworks/native/data/etc/android.hardware.sensor.hifi_sensors.xml:system/etc/permissions/android.hardware.sensor.hifi_sensors.xml
177
178# Other hardware-specific features
179PRODUCT_COPY_FILES += \
180    frameworks/native/data/etc/android.hardware.vr.high_performance.xml:system/etc/permissions/android.hardware.vr.high_performance.xml
181
182# For SPN display
183PRODUCT_COPY_FILES += \
184    device/google/marlin/spn-conf.xml:system/etc/spn-conf.xml
185
186# Common sensor packages
187TARGET_USES_NANOHUB_SENSORHAL := true
188NANOHUB_SENSORHAL_LID_STATE_ENABLED := true
189NANOHUB_SENSORHAL_SENSORLIST := $(LOCAL_PATH)/sensorhal/sensorlist.cpp
190PRODUCT_PACKAGES += context_hub.default
191
192PRODUCT_PACKAGES += \
193    nanoapp_cmd
194
195# sensor utilities (only for userdebug and eng builds)
196ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
197PRODUCT_PACKAGES += \
198    nanotool \
199    sensortest
200endif
201
202PRODUCT_COPY_FILES += \
203    device/google/marlin/sec_config:system/etc/sec_config
204
205PRODUCT_SYSTEM_VERITY_PARTITION := /dev/block/bootdevice/by-name/system
206
207#FEATURE_OPENGLES_EXTENSION_PACK support string config file
208PRODUCT_COPY_FILES += \
209    frameworks/native/data/etc/android.hardware.opengles.aep.xml:system/etc/permissions/android.hardware.opengles.aep.xml
210
211# MSM IRQ Balancer configuration file
212PRODUCT_COPY_FILES += \
213    device/google/marlin/msm_irqbalance.conf:$(TARGET_COPY_OUT_VENDOR)/etc/msm_irqbalance.conf
214
215# init launched script
216PRODUCT_COPY_FILES += \
217    device/google/marlin/init.qcom.qseecomd.sh:system/bin/init.qcom.qseecomd.sh \
218    device/google/marlin/init.radio.sh:system/bin/init.radio.sh \
219    device/google/marlin/init.power.sh:system/bin/init.power.sh \
220    device/google/marlin/init.mid.sh:system/bin/init.mid.sh \
221    device/google/marlin/init.foreground.sh:system/bin/init.foreground.sh
222
223# Reduce client buffer size for fast audio output tracks
224PRODUCT_PROPERTY_OVERRIDES += \
225    af.fast_track_multiplier=1
226
227# Low latency audio buffer size in frames
228PRODUCT_PROPERTY_OVERRIDES += \
229    audio_hal.period_size=192
230
231PRODUCT_PROPERTY_OVERRIDES += \
232    persist.camera.gyro.android=4 \
233    persist.camera.tof.direct=1 \
234    persist.camera.tnr.preview=1 \
235    persist.camera.tnr.video=1
236
237# Set bluetooth soc to rome
238PRODUCT_PROPERTY_OVERRIDES += \
239    qcom.bluetooth.soc=rome
240
241PRODUCT_PROPERTY_OVERRIDES += \
242    persist.cne.feature=1 \
243    persist.radio.data_ltd_sys_ind=1 \
244    persist.radio.is_wps_enabled=true \
245    persist.radio.RATE_ADAPT_ENABLE=1 \
246    persist.radio.ROTATION_ENABLE=1 \
247    persist.radio.sw_mbn_update=1 \
248    persist.radio.videopause.mode=1 \
249    persist.radio.VT_ENABLE=1 \
250    persist.radio.VT_HYBRID_ENABLE=1 \
251    persist.radio.data_con_rprt=true \
252    persist.rcs.supported=1 \
253    rild.libpath=/vendor/lib64/libril-qc-qmi-1.so
254
255PRODUCT_PROPERTY_OVERRIDES += \
256    persist.data.mode=concurrent
257
258# Enable SM log mechanism by default
259ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
260PRODUCT_PROPERTY_OVERRIDES += \
261    persist.radio.smlog_switch=1 \
262    ro.radio.log_prefix="modem_log_"
263endif
264
265# Set snapshot timer to 3 second
266PRODUCT_PROPERTY_OVERRIDES += \
267    persist.radio.snapshot_enabled=1 \
268    persist.radio.snapshot_timer=3
269
270# IMS over WiFi
271PRODUCT_PROPERTY_OVERRIDES += \
272    persist.data.iwlan.enable=true
273
274# LTE, CDMA, GSM/WCDMA
275PRODUCT_PROPERTY_OVERRIDES += \
276    ro.telephony.default_network=10 \
277    telephony.lteOnCdmaDevice=1
278
279PRODUCT_AAPT_CONFIG += xlarge large
280PRODUCT_CHARACTERISTICS := nosdcard
281
282# Enable camera EIS
283# eis.enable: enables electronic image stabilization
284# is_type: sets image stabilization type
285PRODUCT_PROPERTY_OVERRIDES += \
286    persist.camera.eis.enable=1 \
287    persist.camera.is_type=4
288
289# Fingerprint
290PRODUCT_PACKAGES += \
291    fingerprintd
292
293PRODUCT_COPY_FILES += \
294    frameworks/native/data/etc/android.hardware.fingerprint.xml:system/etc/permissions/android.hardware.fingerprint.xml
295
296# Modem debugger
297ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
298PRODUCT_COPY_FILES += \
299    device/google/marlin/init.common.diag.rc.userdebug:root/init.common.diag.rc
300
301# Subsystem ramdump
302PRODUCT_PROPERTY_OVERRIDES += \
303    persist.sys.ssr.enable_ramdumps=1
304else
305PRODUCT_COPY_FILES += \
306    device/google/marlin/init.common.diag.rc.user:root/init.common.diag.rc
307endif
308
309# Subsystem silent restart
310PRODUCT_PROPERTY_OVERRIDES += \
311    persist.sys.ssr.restart_level=venus,AR6320,slpi,modem,adsp
312
313PRODUCT_COPY_FILES += \
314    device/google/marlin/thermal-engine-marlin.conf:system/etc/thermal-engine.conf
315
316$(call inherit-product-if-exists, hardware/qcom/msm8996/msm8996.mk)
317$(call inherit-product-if-exists, vendor/qcom/gpu/msm8996/msm8996-gpu-vendor.mk)
318
319# TODO:
320# setup dm-verity configs.
321# PRODUCT_SYSTEM_VERITY_PARTITION := /dev/block/platform/soc/7464900.sdhci/by-name/system
322# $(call inherit-product, build/target/product/verity.mk)
323
324#Property of the BDA module path for loading BDA
325PRODUCT_PROPERTY_OVERRIDES += \
326    ro.bt.bdaddr_path=/sys/module/bdaddress/parameters/bdaddress
327
328# Needed for encryption
329PRODUCT_PACKAGES += \
330    keystore.msm8996 \
331    gatekeeper.msm8996
332
333# Use the A/B updater.
334AB_OTA_UPDATER := true
335PRODUCT_PACKAGES += \
336    update_engine \
337    update_verifier
338
339# Enable update engine sideloading by including the static version of the
340# boot_control HAL and its dependencies.
341PRODUCT_STATIC_BOOT_CONTROL_HAL := \
342    bootctrl.msm8996 \
343    librecovery_updater_msm \
344    libsparse_static
345PRODUCT_PACKAGES += \
346    update_engine_sideload
347
348# Tell the system to enable copying odexes from other partition.
349PRODUCT_PACKAGES += \
350	cppreopts.sh
351
352PRODUCT_PROPERTY_OVERRIDES += \
353    ro.cp_system_other_odex=1
354
355# Script that copies preloads directory from system_other to data partition
356PRODUCT_COPY_FILES += \
357    device/google/marlin/preloads_copy.sh:system/bin/preloads_copy.sh
358
359PRODUCT_PACKAGES_DEBUG += \
360    update_engine_client
361
362# A/B updater updatable partitions list. Keep in sync with the partition list
363# with "_a" and "_b" variants in the device. Note that the vendor can add more
364# more partitions to this list for the bootloader and radio.
365AB_OTA_PARTITIONS += \
366    boot \
367    system
368
369# NFC packages
370PRODUCT_PACKAGES += \
371    NfcNci \
372    Tag
373
374# NFC/camera interaction workaround - DO NOT COPY TO NEW DEVICES
375PRODUCT_PROPERTY_OVERRIDES += \
376    ro.camera.notify_nfc=1
377
378PRODUCT_COPY_FILES += \
379    device/google/marlin/nfc/libnfc-brcm.conf:system/etc/libnfc-brcm.conf \
380    device/google/marlin/nfc/libpn551_fw.so:$(TARGET_COPY_OUT_VENDOR)/firmware/libpn551_fw.so
381
382# Bootloader HAL used for A/B updates.
383PRODUCT_PACKAGES += \
384    bootctrl.msm8996
385PRODUCT_PACKAGES_DEBUG += \
386    bootctl
387
388# Storage: for factory reset protection feature
389PRODUCT_PROPERTY_OVERRIDES += \
390    ro.frp.pst=/dev/block/platform/soc/624000.ufshc/by-name/frp
391
392PRODUCT_PROPERTY_OVERRIDES += \
393    sdm.debug.disable_rotator_split=1 \
394    qdcm.only_pcc_for_trans=1 \
395    qdcm.diagonal_matrix_mode=1
396
397# Enable low power video mode for 4K encode
398PRODUCT_PROPERTY_OVERRIDES += \
399    vidc.debug.perf.mode=2
400
401# OEM Unlock reporting
402ADDITIONAL_DEFAULT_PROPERTIES += \
403    ro.oem_unlock_supported=1
404
405# Setup dm-verity configs
406PRODUCT_SYSTEM_VERITY_PARTITION := /dev/block/bootdevice/by-name/system
407PRODUCT_VENDOR_VERITY_PARTITION := /dev/block/bootdevice/by-name/vendor
408$(call inherit-product, build/target/product/verity.mk)
409
410# Partitions (listed in the file) to be wiped under recovery.
411TARGET_RECOVERY_WIPE := \
412    device/google/marlin/recovery.wipe.common
413
414# GPS configuration file
415PRODUCT_COPY_FILES += \
416    device/google/marlin/gps.conf:system/etc/gps.conf
417
418# Default permission grant exceptions
419PRODUCT_COPY_FILES += \
420    device/google/marlin/default-permissions.xml:system/etc/default-permissions/default-permissions.xml
421
422# A/B OTA dexopt package
423PRODUCT_PACKAGES += otapreopt_script
424
425# A/B OTA dexopt update_engine hookup
426AB_OTA_POSTINSTALL_CONFIG += \
427    RUN_POSTINSTALL_system=true \
428    POSTINSTALL_PATH_system=system/bin/otapreopt_script \
429    FILESYSTEM_TYPE_system=ext4 \
430    POSTINSTALL_OPTIONAL_system=true
431
432#Reduce cost of scrypt for FBE CE decryption
433PRODUCT_PROPERTY_OVERRIDES += \
434    ro.crypto.scrypt_params=13:3:1
435
436# Add minidebug info to the system server to support diagnosing native crashes.
437ifneq (,$(filter user userdebug, $(TARGET_BUILD_VARIANT)))
438    # System server and some of its services.
439    # Note: we cannot use PRODUCT_SYSTEM_SERVER_JARS, as it has not been expanded at this point.
440    $(call add-product-dex-preopt-module-config,services,--generate-mini-debug-info)
441    $(call add-product-dex-preopt-module-config,wifi-service,--generate-mini-debug-info)
442endif
443
444# b/28423767
445$(call add-product-sanitizer-module-config,rmt_storage,never)
446
447# b/30302693
448$(call add-product-sanitizer-module-config,surfaceflinger libsigchain,never)
449
450# b/28992626
451# For Hangouts, make ASAN-lite only sanitize 32-bit.
452ifeq (true,$(SANITIZE_LITE))
453  SANITIZE_ARCH := 32
454endif
455
456# b/30349163
457# Set Marlin/Sailfish default log size on userdebug/eng build to 1M
458ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
459PRODUCT_PROPERTY_OVERRIDES += ro.logd.size=1M
460endif
461
462# b/30022738
463# Work around janky screenrecord performance by disabling hardware composer
464# virtual displays
465PRODUCT_PROPERTY_OVERRIDES += \
466    debug.sf.disable_hwc_vds=1
467
468# b/32109329
469# Workaround for audio glitches
470PRODUCT_PROPERTY_OVERRIDES += \
471    audio.adm.buffering.ms=3
472