device_xiaomi_sm6150-common/sm6150.mk
basamaryan b2af7728f1
sm6150-common: Move to Xiaomi fingerprint AIDL
Change-Id: I68dba7184034fd37454c7d32a065f041cb611625
2024-12-19 12:14:01 -05:00

392 lines
16 KiB
Makefile

#
# Copyright (C) 2020-2024 The LineageOS Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
$(call inherit-product, $(SRC_TARGET_DIR)/product/non_ab_device.mk)
# Setup dalvik vm configs
$(call inherit-product, frameworks/native/build/phone-xhdpi-6144-dalvik-heap.mk)
# Call the proprietary setup
$(call inherit-product, vendor/xiaomi/sm6150-common/sm6150-common-vendor.mk)
# Enable project quotas and casefolding for emulated storage without sdcardfs
$(call inherit-product, $(SRC_TARGET_DIR)/product/emulated_storage.mk)
# Add common definitions for Qualcomm
$(call inherit-product, hardware/qcom-caf/common/common.mk)
# Additional native libraries
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/public.libraries.txt:$(TARGET_COPY_OUT_VENDOR)/etc/public.libraries.txt
# AID/fs configs
PRODUCT_PACKAGES += \
fs_config_files
# ANT+
PRODUCT_PACKAGES += \
AntHalService-Soong
# Audio
PRODUCT_PACKAGES += \
android.hardware.audio@6.0-impl \
android.hardware.audio.effect@6.0-impl \
android.hardware.audio.service \
android.hardware.bluetooth.audio-impl \
android.hardware.soundtrigger@2.2-impl
PRODUCT_PACKAGES += \
audio.bluetooth.default \
audio.usb.default \
audio.r_submix.default \
sound_trigger.primary.sm6150
PRODUCT_PACKAGES += \
libqcompostprocbundle \
libqcomvisualizer \
libqcomvoiceprocessing \
libvolumelistener
PRODUCT_PACKAGES += \
libaudio-resampler
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_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
$(LOCAL_PATH)/configs/audio/audio_tuning_mixer_tavil.txt:$(TARGET_COPY_OUT_VENDOR)/etc/audio_tuning_mixer_tavil.txt
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/audio/sound_trigger_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_platform_info.xml
PRODUCT_COPY_FILES += \
frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \
frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.audio.low_latency.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.low_latency.xml \
frameworks/native/data/etc/android.hardware.audio.pro.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.pro.xml \
frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml
# Bluetooth
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml \
frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml
# Camera
PRODUCT_PACKAGES += \
android.hardware.camera.provider@2.4-impl \
android.hardware.camera.provider@2.4-service_64
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
# Device-specific settings
PRODUCT_PACKAGES += \
XiaomiParts
# Display
PRODUCT_PACKAGES += \
android.hardware.graphics.composer@2.4-service \
android.hardware.graphics.mapper@3.0-impl-qti-display \
android.hardware.graphics.mapper@4.0-impl-qti-display \
vendor.qti.hardware.display.allocator-service \
vendor.qti.hardware.memtrack-service
PRODUCT_PACKAGES += \
gralloc.sm6150 \
hwcomposer.sm6150
PRODUCT_PACKAGES += \
disable_configstore
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.opengles.aep.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.opengles.aep.xml
# DRM
PRODUCT_PACKAGES += \
android.hardware.drm-service.clearkey
# Fastbootd
PRODUCT_PACKAGES += \
fastbootd
# Fingerprint
PRODUCT_PACKAGES += \
android.hardware.biometrics.fingerprint-service.xiaomi
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml
# FM
PRODUCT_PACKAGES += \
FM2 \
qcom.fmradio
# Fstab
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/rootdir/etc/fstab.default:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.default \
$(LOCAL_PATH)/rootdir/etc/fstab.default:$(TARGET_COPY_OUT_RAMDISK)/fstab.default \
$(LOCAL_PATH)/rootdir/etc/fstab.emmc:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.emmc \
$(LOCAL_PATH)/rootdir/etc/fstab.emmc:$(TARGET_COPY_OUT_RAMDISK)/fstab.emmc \
$(LOCAL_PATH)/rootdir/etc/fstab.zram:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.zram
# GPS
PRODUCT_PACKAGES += \
android.hardware.gnss@2.1-impl-qti \
android.hardware.gnss@2.1-service-qti
PRODUCT_PACKAGES += \
gnss@2.0-base.policy \
gnss@2.0-xtra-daemon.policy \
gnss@2.0-xtwifi-client.policy \
gnss@2.0-xtwifi-inet-agent.policy
PRODUCT_PACKAGES += \
libbatching \
libgeofencing \
libgnss
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/gnss_antenna_info.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss_antenna_info.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
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-service.qti \
android.hardware.health-service.qti_recovery
# Init scripts
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/rootdir/etc/init.qcom.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.qcom.rc \
$(LOCAL_PATH)/rootdir/etc/init.qcom.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.qcom.usb.rc \
$(LOCAL_PATH)/rootdir/etc/init.target.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.target.rc
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/rootdir/bin/init.qcom.post_boot.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.qcom.post_boot.sh \
$(LOCAL_PATH)/rootdir/bin/init.qcom.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.qcom.sh \
$(LOCAL_PATH)/rootdir/bin/init.qti.early_init.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.qti.early_init.sh
# IRSC
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/security/sec_config:$(TARGET_COPY_OUT_VENDOR)/etc/sec_config
# IRQ balance
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/msm_irqbalance.conf:$(TARGET_COPY_OUT_VENDOR)/etc/msm_irqbalance.conf
# Kernel
PRODUCT_SET_DEBUGFS_RESTRICTIONS := true
# Lineage Health
PRODUCT_PACKAGES += \
vendor.lineage.health-service.default
# LiveDisplay
PRODUCT_PACKAGES += \
vendor.lineage.livedisplay@2.1-service.xiaomi_sm6150
# Media
PRODUCT_PACKAGES += \
libOmxAacEnc \
libOmxAmrEnc \
libOmxCore \
libOmxEvrcEnc \
libOmxQcelp13Enc \
libOmxVdec \
libOmxVenc \
libstagefrighthw
PRODUCT_COPY_FILES += \
hardware/qcom-caf/sm8150/media/conf_files/sm6150/mediacodec-seccomp.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediacodec.policy \
hardware/qcom-caf/sm8150/media/conf_files/sm6150/system_properties.xml:$(TARGET_COPY_OUT_VENDOR)/etc/system_properties.xml
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/media/media_codecs_performance_sdmmagpie_v1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance.xml \
$(LOCAL_PATH)/configs/media/media_codecs_vendor_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor_audio.xml \
$(LOCAL_PATH)/configs/media/media_codecs_vendor_sdmmagpie_v1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \
$(LOCAL_PATH)/configs/media/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml
# Network
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.software.ipsec_tunnels.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.ipsec_tunnels.xml
# Overlay
DEVICE_PACKAGE_OVERLAYS += \
$(LOCAL_PATH)/overlay \
$(LOCAL_PATH)/overlay-lineage
PRODUCT_ENFORCE_RRO_TARGETS += *
# Partitions
PRODUCT_USE_DYNAMIC_PARTITIONS := true
# Power
PRODUCT_PACKAGES += \
android.hardware.power-service.lineage-libperfmgr \
libqti-perfd-client
# QTI
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/permissions/qti_whitelist.xml:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/sysconfig/qti_whitelist.xml \
$(LOCAL_PATH)/configs/permissions/system_ext-privapp-permissions-qti.xml:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/permissions/privapp-permissions-qti.xml
# QTI fwk-detect
PRODUCT_PACKAGES += \
libvndfwk_detect_jni.qti.vendor # Needed by CNE app
# RIL
PRODUCT_PACKAGES += \
CarrierConfigOverlay
# Recovery
PRODUCT_PACKAGES += \
librecovery_updater_xiaomi
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/rootdir/etc/init.recovery.qcom.rc:recovery/root/init.recovery.qcom.rc
# 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
# Soong namespaces
PRODUCT_SOONG_NAMESPACES += \
$(LOCAL_PATH) \
bootable/deprecated-ota \
hardware/google/interfaces \
hardware/google/pixel \
hardware/lineage/interfaces/power-libperfmgr \
hardware/qcom-caf/common/libqti-perfd-client \
hardware/xiaomi
# Telephony
PRODUCT_PACKAGES += \
extphonelib \
extphonelib-product \
extphonelib.xml \
extphonelib_product.xml \
ims-ext-common \
ims_ext_common.xml \
qti-telephony-hidl-wrapper \
qti-telephony-hidl-wrapper-prd \
qti_telephony_hidl_wrapper.xml \
qti_telephony_hidl_wrapper_prd.xml \
qti-telephony-utils \
qti-telephony-utils-prd \
qti_telephony_utils.xml \
qti_telephony_utils_prd.xml \
telephony-ext \
xiaomi-telephony-stub
PRODUCT_BOOT_JARS += \
telephony-ext \
xiaomi-telephony-stub
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.telephony.ims.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.ims.xml \
frameworks/native/data/etc/android.hardware.telephony.gsm.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.gsm.xml \
frameworks/native/data/etc/android.hardware.telephony.cdma.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.cdma.xml \
frameworks/native/data/etc/android.software.sip.voip.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.sip.voip.xml
# Touchscreen
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml
# Uevent
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/rootdir/etc/ueventd.rc:$(TARGET_COPY_OUT_VENDOR)/etc/ueventd.rc
# Updater
AB_OTA_UPDATER := false
# USB
PRODUCT_PACKAGES += \
android.hardware.usb@1.3-service.dual_role_usb
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml \
frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml
# Vibrator
PRODUCT_PACKAGES += \
vendor.qti.hardware.vibrator.service
PRODUCT_COPY_FILES += \
vendor/qcom/opensource/vibrator/excluded-input-devices.xml:$(TARGET_COPY_OUT_VENDOR)/etc/excluded-input-devices.xml
# Vulkan
PRODUCT_PACKAGES += \
libvulkan
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.vulkan.compute-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.compute.xml \
frameworks/native/data/etc/android.software.vulkan.deqp.level-2020-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.vulkan.deqp.level.xml \
frameworks/native/data/etc/android.hardware.vulkan.level-1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level.xml \
frameworks/native/data/etc/android.hardware.vulkan.version-1_1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version.xml
# WiFi
PRODUCT_PACKAGES += \
android.hardware.wifi-service \
hostapd \
ipacm \
IPACM_cfg.xml \
libwpa_client \
WifiOverlay \
wpa_supplicant \
wpa_supplicant.conf
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/wifi/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf \
$(LOCAL_PATH)/configs/wifi/p2p_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/p2p_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.rtt.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.rtt.xml \
frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml
# WiFi firmware symlinks
PRODUCT_PACKAGES += \
firmware_wlan_mac.bin_symlink \
firmware_WCNSS_qcom_cfg.ini_symlink
# ZRAM writeback
PRODUCT_PROPERTY_OVERRIDES += \
ro.zram.mark_idle_delay_mins=60 \
ro.zram.first_wb_delay_mins=1440 \
ro.zram.periodic_wb_delay_hours=24