android_device_oneplus_sm81.../common.mk

383 lines
14 KiB
Makefile

#
# Copyright (C) 2018-2019 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
# Get non-open-source specific aspects
$(call inherit-product, vendor/oneplus/sm8150-common/sm8150-common-vendor.mk)
# A/B
AB_OTA_POSTINSTALL_CONFIG += \
RUN_POSTINSTALL_vendor=true \
POSTINSTALL_PATH_vendor=bin/checkpoint_gc \
FILESYSTEM_TYPE_vendor=erofs \
POSTINSTALL_OPTIONAL_vendor=true
AB_OTA_POSTINSTALL_CONFIG += \
RUN_POSTINSTALL_system=true \
POSTINSTALL_PATH_system=system/bin/otapreopt_script \
FILESYSTEM_TYPE_system=erofs \
POSTINSTALL_OPTIONAL_system=true
PRODUCT_PACKAGES += \
checkpoint_gc \
otapreopt_script
# Audio
PRODUCT_VENDOR_PROPERTIES += \
af.fast_track_multiplier=2 \
audio.deep_buffer.media=true \
persist.vendor.audio_hal.dsp_bit_width_enforce_mode=24 \
ro.audio.monitorRotation=true \
ro.config.vc_call_vol_steps=6 \
vendor.audio.cts.media=false \
vendor.audio.noisy.broadcast.delay=600 \
vendor.audio.offload.pstimeout.secs=3
PRODUCT_ODM_PROPERTIES += \
persist.vendor.audio.fluence.voicerec=true \
persist.vendor.audio.hac.enable=false \
ro.vendor.audio.sdk.fluencetype=fluence \
vendor.audio.hal.output.suspend.supported=false
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/audio/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \
$(LOCAL_PATH)/configs/audio/audio_io_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_io_policy.conf \
$(LOCAL_PATH)/configs/audio/audio_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info.xml \
$(LOCAL_PATH)/configs/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
$(LOCAL_PATH)/configs/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio/audio_policy_configuration.xml \
$(LOCAL_PATH)/configs/audio/bluetooth_hearing_aid_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_hearing_aid_audio_policy_configuration.xml \
$(LOCAL_PATH)/configs/audio/sound_trigger_mixer_paths_wcd9340.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths_wcd9340.xml \
$(LOCAL_PATH)/configs/audio/sound_trigger_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_platform_info.xml \
frameworks/av/services/audiopolicy/config/a2dp_in_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_in_audio_policy_configuration.xml \
frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml
# Bluetooth
PRODUCT_PACKAGES += \
android.hardware.bluetooth.audio@2.0-impl:32 \
audio.bluetooth.default:32 \
com.dsi.ant@1.0.vendor:64 \
vendor.qti.hardware.bluetooth_audio@2.0.vendor:32 \
vendor.qti.hardware.btconfigstore@1.0.vendor:64 \
vendor.qti.hardware.btconfigstore@2.0.vendor:64
PRODUCT_VENDOR_PROPERTIES += \
persist.vendor.oneplus.bt.asd.chain=0 \
persist.vendor.oneplus.bt.asd.firmware=false \
persist.vendor.qcom.bluetooth.a2dp_offload_cap=sbc-aptx-aptxtws-aptxhd-aac-ldac-aptxadaptive \
persist.vendor.qcom.bluetooth.aac_frm_ctl.enabled=true \
persist.vendor.qcom.bluetooth.aac_vbr_ctl.enabled=false \
persist.vendor.qcom.bluetooth.enable.splita2dp=true \
persist.vendor.qcom.bluetooth.scram.enabled=true \
persist.vendor.qcom.bluetooth.soc=cherokee \
persist.vendor.qcom.bluetooth.twsp_state.enabled=false \
vendor.bluetooth.soc=cherokee \
vendor.hw.fm.init=0
PRODUCT_SYSTEM_EXT_PROPERTIES += \
persist.vendor.bt.a2dp.hal.implementation=true
# Boot control
PRODUCT_PACKAGES += \
android.hardware.boot@1.2-impl-qti:64 \
android.hardware.boot@1.2-impl-qti.recovery \
android.hardware.boot@1.2-service
# Camera
PRODUCT_PACKAGES += \
android.frameworks.displayservice@1.0 \
android.hardware.camera.provider@2.4-impl:64 \
android.hardware.camera.provider@2.4-service_64 \
libxml2 \
vendor.oneplus.hardware.camera@1.0.vendor:64 \
vendor.qti.hardware.camera.device@1.0.vendor:64
PRODUCT_VENDOR_PROPERTIES += \
ro.vendor.camera.res.fmq.size=1048576
PRODUCT_SYSTEM_EXT_PROPERTIES += \
persist.vendor.camera.privapp.list=com.oneplus.camera \
vendor.camera.aux.packagelist=org.codeaurora.snapcam,com.oneplus.camera
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.flash-autofocus.xml \
frameworks/native/data/etc/android.hardware.camera.front.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.front.xml \
frameworks/native/data/etc/android.hardware.camera.full.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.full.xml \
frameworks/native/data/etc/android.hardware.camera.raw.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.raw.xml
# Dalvik
$(call inherit-product, frameworks/native/build/phone-xhdpi-6144-dalvik-heap.mk)
# Device ID attestation
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.software.device_id_attestation.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.device_id_attestation.xml
# Display
PRODUCT_PACKAGES += \
vendor.oneplus.hardware.display@1.0.vendor
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
ro.surface_flinger.set_idle_timer_ms=2500 \
ro.surface_flinger.set_touch_timer_ms=2500 \
ro.surface_flinger.set_display_power_timer_ms=500 \
ro.surface_flinger.use_content_detection_for_refresh_rate=true
PRODUCT_VENDOR_PROPERTIES += \
ro.vendor.display.ad.hdr_calib_data=/vendor/etc/hdr_config.cfg \
ro.vendor.display.ad.sdr_calib_data=/vendor/etc/sdr_config.cfg \
ro.vendor.display.ad=1 \
ro.vendor.display.sensortype=2 \
persist.vendor.color.matrix=2 \
vendor.display.disable_mask_layer_hint=1
# Display Mode
PRODUCT_PACKAGES += \
DisplayMode
# DPM
PRODUCT_VENDOR_PROPERTIES += \
persist.vendor.dpmhalservice.enable=1
# DRM
PRODUCT_PACKAGES += \
android.hardware.drm@1.4-service.clearkey
PRODUCT_VENDOR_PROPERTIES += \
drm.service.enabled=true
PRODUCT_SYSTEM_EXT_PROPERTIES += \
ro.netflix.bsp_rev=Q855-16947-1
# fastbootd
PRODUCT_PACKAGES += \
fastbootd
# Fingerprint
PRODUCT_PACKAGES += \
android.hardware.biometrics.fingerprint@2.3-service.oneplus \
vendor.goodix.hardware.biometrics.fingerprint@2.1.vendor:64
PRODUCT_VENDOR_PROPERTIES += \
persist.vendor.qfp=true \
vendor.boot.fingerprintbstate=orange
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml
# FRP
PRODUCT_VENDOR_PROPERTIES += \
ro.frp.pst=/dev/block/bootdevice/by-name/config
# Gatekeeper
PRODUCT_VENDOR_PROPERTIES += \
vendor.gatekeeper.disable_spu=true
# GPS
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/gps/apdr.conf:$(TARGET_COPY_OUT_VENDOR)/etc/apdr.conf \
$(LOCAL_PATH)/configs/gps/flp.conf:$(TARGET_COPY_OUT_VENDOR)/etc/flp.conf \
$(LOCAL_PATH)/configs/gps/gps.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gps.conf \
$(LOCAL_PATH)/configs/gps/izat.conf:$(TARGET_COPY_OUT_VENDOR)/etc/izat.conf \
$(LOCAL_PATH)/configs/gps/lowi.conf:$(TARGET_COPY_OUT_VENDOR)/etc/lowi.conf \
$(LOCAL_PATH)/configs/gps/sap.conf:$(TARGET_COPY_OUT_VENDOR)/etc/sap.conf \
$(LOCAL_PATH)/configs/gps/xtwifi.conf:$(TARGET_COPY_OUT_VENDOR)/etc/xtwifi.conf
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.location.gps.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.location.gps.xml
# Health
PRODUCT_PACKAGES += \
android.hardware.health@2.1-impl-qti:64 \
android.hardware.health@2.1-service
# Init
PRODUCT_PACKAGES += \
init.class_main.sh \
init.oem.rc \
init.oneplus.display.rc \
init.oneplus.usb.rc \
init.qcom.class_core.sh \
init.qcom.early_boot.sh \
init.qcom.post_boot.sh \
init.qcom.rc \
init.qcom.sensors.sh \
init.qcom.sh \
init.qti.chg_policy.sh \
init.qti.dcvs.sh \
init.qti.qcv.sh \
init.recovery.qcom.rc \
init.target.rc \
fstab.qcom \
ueventd.qcom.rc
# Input
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/keylayout/gf_input.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/gf_input.kl \
$(LOCAL_PATH)/configs/keylayout/gpio-keys.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/gpio-keys.kl
# Keymaster
PRODUCT_VENDOR_PROPERTIES += \
ro.crypto.allow_encrypt_override=true \
ro.crypto.volume.filenames_mode="aes-256-cts" \
ro.hardware.keystore_desede=true
# Lineage Health
PRODUCT_PACKAGES += \
vendor.lineage.health-service.default
# NFC
PRODUCT_PACKAGES += \
android.hardware.nfc@1.0-impl:64 \
NfcNci \
Tag
PRODUCT_VENDOR_PROPERTIES += \
ro.camera.notify_nfc=1
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.nfc.hce.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hce.xml \
frameworks/native/data/etc/android.hardware.nfc.hcef.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hcef.xml \
frameworks/native/data/etc/android.hardware.nfc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.xml \
frameworks/native/data/etc/com.nxp.mifare.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/com.nxp.mifare.xml
# Overlays
PRODUCT_PACKAGES += \
AOSPAOnePlusSM8150Frameworks \
AOSPAOnePlusSM8150SystemUI \
OnePlusSM8150Frameworks \
OnePlusSM8150Settings \
OnePlusSM8150SystemUI
# Platform
TARGET_BOARD_PLATFORM := msmnile
# QTI Components
TARGET_COMMON_QTI_COMPONENTS := \
adreno \
alarm \
audio \
av \
bt \
display \
media \
overlay \
perf \
telephony \
usb \
wfd
# Radio
PRODUCT_VENDOR_PROPERTIES += \
persist.vendor.mdm_helper.fail_action=retry,cold_reset,s3_reset,panic \
persist.vendor.ssr.restart_level=ALL_ENABLE
# Sensors
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.accelerometer.xml \
frameworks/native/data/etc/android.hardware.sensor.compass.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.compass.xml \
frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.gyroscope.xml \
frameworks/native/data/etc/android.hardware.sensor.light.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.light.xml \
frameworks/native/data/etc/android.hardware.sensor.proximity.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.proximity.xml \
frameworks/native/data/etc/android.hardware.sensor.stepcounter.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepcounter.xml \
frameworks/native/data/etc/android.hardware.sensor.stepdetector.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepdetector.xml \
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/hals.conf:$(TARGET_COPY_OUT_VENDOR)/etc/sensors/hals.conf
PRODUCT_PACKAGES += \
als_correction_service.oneplus_msmnile \
android.hardware.sensors@2.0-service.oneplus_msmnile \
sensors.oneplus \
libsensorndkbridge
PRODUCT_SYSTEM_EXT_PROPERTIES += \
persist.vendor.naruto.light.support=true \
persist.vendor.sensors.enable.mag_filter=true
# Soong namespaces
PRODUCT_SOONG_NAMESPACES += \
$(LOCAL_PATH) \
device/oneplus/common
# Storage
PRODUCT_VENDOR_PROPERTIES += \
persist.sys.fuse.passthrough.enable=true \
ro.incremental.enable=yes
$(call inherit-product, $(SRC_TARGET_DIR)/product/emulated_storage.mk)
# tri-state key
PRODUCT_PACKAGES += \
tri-state-key_daemon \
TriStateHandler
# Update engine
PRODUCT_PACKAGES += \
update_engine \
update_engine_sideload \
update_verifier
# USB
PRODUCT_PROPERTY_OVERRIDES += \
vendor.usb.diag.func.name=diag \
vendor.usb.use_ffs_mtp=0
# Verified Boot
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.software.verified_boot.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.verified_boot.xml
# Vibrator
PRODUCT_PACKAGES += \
vendor.qti.hardware.vibrator.service.oneplus
PRODUCT_COPY_FILES += \
vendor/qcom/opensource/vibrator/excluded-input-devices.xml:$(TARGET_COPY_OUT_VENDOR)/etc/excluded-input-devices.xml
# VNDK
PRODUCT_PACKAGES += \
android.hardware.audio@4.0.vendor:64 \
android.hardware.bluetooth@1.1.vendor \
android.hardware.drm@1.4.vendor \
android.hardware.gatekeeper@1.0.vendor \
android.hardware.gnss@2.1.vendor \
android.hardware.keymaster@4.1.vendor \
android.hardware.neuralnetworks@1.3.vendor \
android.hardware.nfc@1.2.vendor \
android.hardware.radio.config@1.2.vendor \
android.hardware.radio.deprecated@1.0.vendor \
android.hardware.radio@1.5.vendor \
android.hardware.secure_element@1.2.vendor \
android.system.net.netd@1.1.vendor
# Wifi
PRODUCT_PACKAGES += \
android.hardware.wifi@1.0-service \
hostapd \
libwifi-hal-ctrl \
libwifi-hal-qcom \
vendor.qti.hardware.wifi.hostapd@1.2.vendor \
vendor.qti.hardware.wifi.supplicant@2.2.vendor \
wifi-mac-generator \
wpa_supplicant \
wpa_supplicant.conf
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/wifi/p2p_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/p2p_supplicant_overlay.conf \
$(LOCAL_PATH)/configs/wifi/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf \
$(LOCAL_PATH)/configs/wifi/WCNSS_qcom_cfg.ini:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/WCNSS_qcom_cfg.ini \
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.wifi.aware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.aware.xml \
frameworks/native/data/etc/android.hardware.wifi.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \
frameworks/native/data/etc/android.hardware.wifi.passpoint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.passpoint.xml \
frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \
frameworks/native/data/etc/android.software.ipsec_tunnels.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.ipsec_tunnels.xml
PRODUCT_SYSTEM_EXT_PROPERTIES += \
config.disable_rtt=true
# WiFi Display
PRODUCT_PACKAGES += \
libwfdaac_vendor