Unify device makefiles

Converge all split makefiles into one.

Issue: FP3-A11#310
Test: make -j32 and make sure no files are removed because of this change.
Change-Id: I61a3f637a3246fb882c9888ed90e69c0ef8c7cab
diff --git a/common/base.mk b/common/base.mk
deleted file mode 100644
index b30cb74..0000000
--- a/common/base.mk
+++ /dev/null
@@ -1,290 +0,0 @@
-# define flag to determine the kernel
-TARGET_KERNEL_VERSION ?= 4.9
-
-# Set TARGET_USES_NEW_ION for 4.14 and higher kernels
-TARGET_USES_NEW_ION := false
-
-# Board platforms lists to be used for
-# TARGET_BOARD_PLATFORM specific featurization
-QCOM_BOARD_PLATFORMS += msm8953
-
-TARGET_USE_VENDOR_CAMERA_EXT := true
-
-#skip boot jars check
-SKIP_BOOT_JARS_CHECK := true
-
-
-#Enable suspend during charger mode
-BOARD_CHARGER_ENABLE_SUSPEND := true
-
-MSM_VIDC_TARGET_LIST := msm8953
-
-
-# Below projects/packages with LOCAL_MODULEs will be used by
-# PRODUCT_PACKAGES to build LOCAL_MODULEs that are tagged with
-# optional tag, which will not be available on target unless
-# explicitly list here. Where project corresponds to the vars here
-# in CAPs.
-
-
-CHROMIUM := libwebviewchromium_loader
-CHROMIUM += libwebviewchromium_plat_support
-
-
-#CURL
-CURL := curl
-CURL += libcurl
-
-
-#DATA_OS
-DATA_OS := librmnetctl
-
-
-#E2FSPROGS
-E2FSPROGS := e2fsck
-
-
-HIDL_WRAPPER := qti-telephony-hidl-wrapper
-HIDL_WRAPPER += qti_telephony_hidl_wrapper.xml
-
-QTI_TELEPHONY_UTILS := qti-telephony-utils
-QTI_TELEPHONY_UTILS += qti_telephony_utils.xml
-
-
-#INIT
-INIT := fstab.qcom
-INIT += init.class_main.sh
-INIT += init.mdm.sh
-INIT += init.qcom.class_core.sh
-INIT += init.qcom.coex.sh
-INIT += init.qcom.early_boot.sh
-INIT += init.qcom.efs.sync.sh
-INIT += init.qcom.factory.rc
-INIT += init.qcom.post_boot.sh
-INIT += init.qcom.rc
-INIT += init.qcom.sdio.sh
-INIT += init.qcom.sensors.sh
-INIT += init.qcom.sh
-INIT += init.qcom.usb.rc
-INIT += init.qcom.usb.sh
-INIT += init.recovery.qcom.rc
-INIT += init.target.rc
-INIT += init.veth_ipa_config.sh
-INIT += qca6234-service.sh
-INIT += ueventd.qcom.rc
-INIT += vold.fstab
-
-
-#IPROUTE2
-IPROUTE2 := ip
-IPROUTE2 += libiprouteutil
-
-
-#IPTABLES
-IPTABLES := iptables
-IPTABLES += libext
-
-
-#KEYPAD
-KEYPAD := ft5x06_ts.kl
-KEYPAD += gpio-keys.kl
-KEYPAD += synaptics_dsx.kl
-KEYPAD += synaptics_dsxv26.kl
-KEYPAD += synaptics_rmi4_i2c.kl
-KEYPAD += synaptics_rmi4_i2c.kl
-
-
-#LIB_XML2
-LIB_XML2 := libxml2
-
-
-#LIBAUDIORESAMPLER -- High-quality audio resampler
-LIBAUDIORESAMPLER := libaudio-resampler
-
-
-#PPP
-PPP := ip-up-vpn
-
-
-#STK
-STK := Stk
-
-
-#ZLIB
-ZLIB_HOST := minigzip
-
-
-#Charger
-CHARGER := charger
-CHARGER += charger_res_images
-
-
-#CRDA
-CRDA := init.crda.sh
-
-
-#WLAN
-WLAN := pronto_wlan.ko
-
-
-ifneq ($(TARGET_HAS_LOW_RAM),true)
-ifneq ($(TARGET_SUPPORTS_ANDROID_WEAR),true)
-TELEPHONY_DBG := NrNetworkSettingApp
-endif
-endif
-
-
-PRODUCT_PACKAGES += \
-	DeskClock \
-	Calendar \
-	Camera2 \
-	CertInstaller \
-	Gallery2 \
-	LatinIME \
-	LiveWallpapersPicker \
-	Music \
-	netutils-wrapper-1.0 \
-	Provision \
-	Protips \
-	QuickSearchBox \
-	Settings \
-	SystemUI \
-	CalendarProvider
-
-DELAUN := Launcher3
-
-PRODUCT_HOST_PACKAGES += $(ZLIB_HOST)
-PRODUCT_PACKAGES += $(CHARGER)
-PRODUCT_PACKAGES += $(CHROMIUM)
-PRODUCT_PACKAGES += $(CRDA)
-PRODUCT_PACKAGES += $(CURL)
-PRODUCT_PACKAGES += $(DATA_OS)
-PRODUCT_PACKAGES += $(DELAUN)
-PRODUCT_PACKAGES += $(E2FSPROGS)
-PRODUCT_PACKAGES += $(HIDL_WRAPPER)
-PRODUCT_PACKAGES += $(INIT)
-PRODUCT_PACKAGES += $(IPROUTE2)
-PRODUCT_PACKAGES += $(IPTABLES)
-PRODUCT_PACKAGES += $(KEYPAD)
-PRODUCT_PACKAGES += $(LIBAUDIORESAMPLER)
-PRODUCT_PACKAGES += $(LIB_XML2)
-PRODUCT_PACKAGES += $(PPP)
-PRODUCT_PACKAGES += $(QTI_TELEPHONY_UTILS)
-PRODUCT_PACKAGES += $(STK)
-PRODUCT_PACKAGES += $(TINY_ALSA_TEST_APPS)
-PRODUCT_PACKAGES += $(WLAN)
-
-PRODUCT_PACKAGES += librs_jni
-PRODUCT_PACKAGES += libion
-
-# MSM updater library
-PRODUCT_PACKAGES += librecovery_updater_msm
-
-#intialise PRODUCT_PACKAGES_DEBUG list for debug modules
-PRODUCT_PACKAGES_DEBUG := init.qcom.testscripts.sh
-
-#Add init.qcom.test.rc to PRODUCT_PACKAGES_DEBUG list
-PRODUCT_PACKAGES_DEBUG += init.qcom.test.rc
-PRODUCT_PACKAGES_DEBUG += init.qcom.debug.sh
-
-PRODUCT_PACKAGES_DEBUG += $(TELEPHONY_DBG)
-
-
-# gps/location secuity configuration file
-PRODUCT_COPY_FILES += \
-	device/qcom/common/sec_config:$(TARGET_COPY_OUT_VENDOR)/etc/sec_config
-
-#copy codecs_xxx.xml to (TARGET_COPY_OUT_VENDOR)/etc/
-PRODUCT_COPY_FILES += \
-	frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml \
-	frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_telephony.xml \
-	frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_video.xml \
-	frameworks/av/media/libstagefright/data/media_codecs_google_video_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_video_le.xml \
-	frameworks/av/media/libstagefright/data/media_codecs_google_c2.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_c2.xml \
-	frameworks/av/media/libstagefright/data/media_codecs_google_c2_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_c2_audio.xml \
-	frameworks/av/media/libstagefright/data/media_codecs_google_c2_video.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_c2_video.xml \
-	device/qcom/common/media/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles.xml
-
-
-# include additional build utilities
--include device/qcom/common/utils.mk
-
-
-ifneq ($(strip $(TARGET_BUILD_VARIANT)),user)
-PRODUCT_COPY_FILES += \
-	device/qcom/common/rootdir/etc/init.qcom.testscripts.sh:$(TARGET_COPY_OUT_PRODUCT)/etc/init.qcom.testscripts.sh
-endif
-
-# Set up flags to determine the kernel version
-ifeq ($(wildcard kernel/msm-$(TARGET_KERNEL_VERSION)),)
-     KERNEL_TO_BUILD_ROOT_OFFSET := ../
-     TARGET_KERNEL_SOURCE := kernel
-else
-     KERNEL_TO_BUILD_ROOT_OFFSET := ../../
-     TARGET_KERNEL_SOURCE := kernel/msm-$(TARGET_KERNEL_VERSION)
-endif
-
-#Enabling video for live effects
--include frameworks/base/data/videos/VideoPackage1.mk
-
-# dm-verity definitions
-ifneq ($(BOARD_AVB_ENABLE), true)
-   PRODUCT_SYSTEM_VERITY_PARTITION=/dev/block/bootdevice/by-name/system
-   ifeq ($(ENABLE_VENDOR_IMAGE), true)
-      PRODUCT_VENDOR_VERITY_PARTITION=/dev/block/bootdevice/by-name/vendor
-   endif
-   $(call inherit-product, build/target/product/verity.mk)
-endif
-
-ifeq ($(TARGET_BUILD_VARIANT),user)
-PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
-	ro.adb.secure=1
-endif
-
-# OEM Unlock reporting
-PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
-	ro.oem_unlock_supported=1
-
-ifeq ($(TARGET_USES_QCOM_BSP_ATEL),true)
-    PRODUCT_PROPERTY_OVERRIDES += persist.radio.multisim.config=dsds
-endif
-
-ifeq ( ,$(filter 12 S ,$(PLATFORM_VERSION)))
-PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
-	vendor.usb.diag.func.name=diag
-endif
-
-TARGET_FS_CONFIG_GEN := device/qcom/common/config.fs
-
-PRODUCT_PROPERTY_OVERRIDES += \
-	persist.vendor.qcomsysd.enabled=1
-
-PRODUCT_PACKAGES_DEBUG += \
-	init.qcom.debug.sh \
-	init.qcom.debug-sdm660.sh \
-	init.qcom.debug-sdm710.sh \
-	init.qti.debug-msmnile-apps.sh \
-	init.qti.debug-msmnile-modem.sh \
-	init.qti.debug-msmnile-slpi.sh \
-	init.qti.debug-talos.sh \
-	init.qti.debug-msmnile.sh \
-	init.qti.debug-kona.sh \
-	init.qti.debug-lito.sh \
-	init.qti.debug-trinket.sh \
-	init.qti.debug-atoll.sh \
-	init.qti.debug-lagoon.sh \
-    init.qti.debug-bengal.sh
-
-
-#soong namespace for qssi vs vendor differentiation
-SOONG_CONFIG_NAMESPACES += qssi_vs_vendor
-SOONG_CONFIG_qssi_vs_vendor += qssi_or_vendor
-SOONG_CONFIG_qssi_vs_vendor_qssi_or_vendor := vendor
-
-SOONG_CONFIG_NAMESPACES += aosp_vs_qva
-SOONG_CONFIG_aosp_vs_qva += aosp_or_qva
-ifeq ($(TARGET_FWK_SUPPORTS_FULL_VALUEADDS),true)
-SOONG_CONFIG_aosp_vs_qva_aosp_or_qva := qva
-else
-SOONG_CONFIG_aosp_vs_qva_aosp_or_qva := aosp
-endif
diff --git a/common/common64.mk b/common/common64.mk
deleted file mode 100644
index 326b264..0000000
--- a/common/common64.mk
+++ /dev/null
@@ -1,34 +0,0 @@
-$(call inherit-product, device/fairphone/fp3-common/common/base.mk)
-
-$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
-$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk)
-
-
-PRODUCT_PROPERTY_OVERRIDES += \
-	ro.vendor.extension_library=libqti-perfd-client.so \
-	persist.backup.ntpServer=0.pool.ntp.org \
-	sys.vendor.shutdown.waittime=500
-
-
-ifneq ($(TARGET_BOARD_AUTO), true)
-PRODUCT_PROPERTY_OVERRIDES += \
-	persist.vendor.radio.apm_sim_not_pwdn=1 \
-	persist.vendor.radio.sib16_support=1 \
-	persist.vendor.radio.custom_ecc=1 \
-	persist.vendor.radio.rat_on=combine \
-	persist.vendor.radio.procedure_bytes=SKIP
-endif
-
-PRODUCT_PROPERTY_OVERRIDES += ro.frp.pst=/dev/block/bootdevice/by-name/config
-
-# whitelisted app
-PRODUCT_COPY_FILES += \
-	device/qcom/common/qti_whitelist.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysconfig/qti_whitelist.xml
-
-PRODUCT_COPY_FILES += \
-	device/qcom/common/privapp-permissions-qti.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/privapp-permissions-qti.xml
-
-
-# Permission for Wi-Fi passpoint support
-PRODUCT_COPY_FILES += frameworks/native/data/etc/android.hardware.wifi.passpoint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.passpoint.xml
-
diff --git a/device.mk b/device.mk
index 29b3881..d518cef 100644
--- a/device.mk
+++ b/device.mk
@@ -22,7 +22,9 @@
 
 $(call inherit-product, frameworks/native/build/phone-xhdpi-4096-dalvik-heap.mk)
 
-$(call inherit-product, device/fairphone/fp3-common/common/common64.mk)
+# Inherit generic AOSP content for telephony based 64-bit devices
+$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk)
 
 PRODUCT_NAME := FP3
 PRODUCT_DEVICE := FP3
@@ -92,6 +94,11 @@
 	$(FP_PATH)/configs/public.libraries.txt:$(TARGET_COPY_OUT_VENDOR)/etc/public.libraries.txt
 
 
+# OEM Unlock reporting
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
+	ro.oem_unlock_supported=1
+
+
 # Atrace HAL
 PRODUCT_PACKAGES += \
 	android.hardware.atrace@1.0-service
@@ -235,6 +242,11 @@
 	frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml
 
 
+# Board platforms lists to be used for
+# TARGET_BOARD_PLATFORM specific featurization
+QCOM_BOARD_PLATFORMS += msm8953
+
+
 # Boot
 PRODUCT_PACKAGES += \
 	android.hardware.boot@1.0-impl \
@@ -247,6 +259,13 @@
 	update_engine_sideload \
 	update_verifier
 
+# MSM updater library
+PRODUCT_PACKAGES += librecovery_updater_msm
+
+
+# Skip boot jars check
+SKIP_BOOT_JARS_CHECK := true
+
 
 # Boot animation
 TARGET_SCREEN_HEIGHT := 2160
@@ -323,6 +342,29 @@
 	$(FP_PATH)/configs/component-overrides.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sysconfig/component-overrides.xml
 
 
+# Charger
+PRODUCT_PACKAGES += \
+	charger \
+	charger_res_images
+
+
+# Chromium
+PRODUCT_PACKAGES += \
+	libwebviewchromium_loader \
+	libwebviewchromium_plat_support
+
+
+# Curl
+PRODUCT_PACKAGES += \
+	curl \
+	libcurl
+
+
+# Data/rmnetctrl
+PRODUCT_PACKAGES += \
+	librmnetctl
+
+
 # Display
 PRODUCT_PACKAGES += \
 	android.hardware.graphics.allocator@2.0-impl \
@@ -334,12 +376,19 @@
 	gralloc.default \
 	gralloc.msm8953 \
 	hwcomposer.msm8953 \
-	memtrack.msm8953 \
+	libcomposerextn.qti \
 	libdisplayconfig \
-	libqdutils \
+	libdisplayconfig.qti \
+	libdrm \
+	libgralloc.qti \
+	liblayerext.qti \
 	libqdMetaData \
-	libqdMetaData.system_ext \
+	libqdMetaData.system \
+	libqdutils \
+	libsmomo.qti \
+	libsmomoconfig.qti \
 	libvulkan \
+	memtrack.msm8953 \
 	vendor.qti.hardware.display.composer@3.0
 
 
@@ -381,6 +430,10 @@
 PRODUCT_PROPERTY_OVERRIDES += ro.crypto.volume.filenames_mode=aes-256-cts
 
 
+# E2fsck
+PRODUCT_PACKAGES += \
+	e2fsck
+
 # ExFAT binaries
 PRODUCT_COPY_FILES += \
 	$(FP_PATH)/tuxera/exfatck:$(TARGET_COPY_OUT_SYSTEM)/bin/exfatck \
@@ -443,6 +496,9 @@
 	libvndfwk_detect_jni.qti.vendor \
 	vndservicemanager
 
+# FRP
+PRODUCT_PROPERTY_OVERRIDES += ro.frp.pst=/dev/block/bootdevice/by-name/config
+
 
 # HIDL
 PRODUCT_PACKAGES += \
@@ -479,6 +535,9 @@
 PRODUCT_COPY_FILES += \
 	frameworks/native/data/etc/android.hardware.location.gps.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.location.gps.xml
 
+PRODUCT_PROPERTY_OVERRIDES += \
+	persist.backup.ntpServer=0.pool.ntp.org
+
 
 # Health
 PRODUCT_PACKAGES += \
@@ -492,6 +551,70 @@
 	ims_ext_common.xml \
 	ConfURIDialer
 
+
+# Init
+PRODUCT_PACKAGES += \
+	fstab.qcom \
+	init.class_main.sh \
+	init.crda.sh \
+	init.mdm.sh \
+	init.qcom.class_core.sh \
+	init.qcom.coex.sh \
+	init.qcom.early_boot.sh \
+	init.qcom.efs.sync.sh \
+	init.qcom.factory.rc \
+	init.qcom.post_boot.sh \
+	init.qcom.rc \
+	init.qcom.sdio.sh \
+	init.qcom.sensors.sh \
+	init.qcom.sh \
+	init.qcom.usb.rc \
+	init.qcom.usb.sh \
+	init.recovery.qcom.rc \
+	init.target.rc \
+	init.veth_ipa_config.sh \
+	qca6234-service.sh \
+	ueventd.qcom.rc \
+	vold.fstab
+
+#intialise PRODUCT_PACKAGES_DEBUG list for debug modules
+PRODUCT_PACKAGES_DEBUG := init.qcom.testscripts.sh
+
+#Add init.qcom.test.rc to PRODUCT_PACKAGES_DEBUG list
+PRODUCT_PACKAGES_DEBUG += init.qcom.test.rc
+PRODUCT_PACKAGES_DEBUG += init.qcom.debug.sh
+
+ifneq ($(strip $(TARGET_BUILD_VARIANT)),user)
+PRODUCT_COPY_FILES += \
+	device/qcom/common/rootdir/etc/init.qcom.testscripts.sh:$(TARGET_COPY_OUT_PRODUCT)/etc/init.qcom.testscripts.sh
+endif
+
+PRODUCT_PACKAGES_DEBUG += \
+	init.qcom.debug.sh \
+	init.qcom.debug-sdm660.sh \
+	init.qcom.debug-sdm710.sh \
+	init.qti.debug-msmnile-apps.sh \
+	init.qti.debug-msmnile-modem.sh \
+	init.qti.debug-msmnile-slpi.sh \
+	init.qti.debug-talos.sh \
+	init.qti.debug-msmnile.sh \
+	init.qti.debug-kona.sh \
+	init.qti.debug-lito.sh \
+	init.qti.debug-trinket.sh \
+	init.qti.debug-atoll.sh \
+	init.qti.debug-lagoon.sh \
+	init.qti.debug-bengal.sh
+
+
+# IP and iptables
+PRODUCT_PACKAGES += \
+	ip \
+	libiprouteutil \
+	iptables \
+	ip-up-vpn \
+	libext
+
+
 # IPACM
 PRODUCT_PACKAGES += \
 	ipacm \
@@ -510,6 +633,16 @@
 # Kernel modules install path
 KERNEL_MODULES_INSTALL := dlkm
 KERNEL_MODULES_OUT := out/target/product/$(PRODUCT_NAME)/$(KERNEL_MODULES_INSTALL)/lib/modules
+KERNEL_TO_BUILD_ROOT_OFFSET := ../../
+
+
+# Key layouts
+PRODUCT_PACKAGES += \
+	ft5x06_ts.kl \
+	gpio-keys.kl \
+	synaptics_dsx.kl \
+	synaptics_dsxv26.kl \
+	synaptics_rmi4_i2c.kl
 
 
 # LED packages
@@ -523,6 +656,7 @@
 PRODUCT_PROPERTY_OVERRIDES += debug.stagefright.omx_default_rank=0
 
 # Enable features in video HAL that can compile only on this platform
+MSM_VIDC_TARGET_LIST := msm8953
 TARGET_USES_MEDIA_EXTENSIONS := true
 
 
@@ -540,7 +674,17 @@
 	$(FP_PATH)/media/media_codecs_8953_v1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor_v1.xml \
 	$(FP_PATH)/media/media_codecs_performance_8953_v1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance_v1.xml \
 	$(FP_PATH)/media/media_codecs_vendor_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor_audio.xml \
-	device/qcom/common/media/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml
+	device/qcom/common/media/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml \
+	device/qcom/common/media/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles.xml
+
+PRODUCT_COPY_FILES += \
+	frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml \
+	frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_telephony.xml \
+	frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_video.xml \
+	frameworks/av/media/libstagefright/data/media_codecs_google_video_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_video_le.xml \
+	frameworks/av/media/libstagefright/data/media_codecs_google_c2.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_c2.xml \
+	frameworks/av/media/libstagefright/data/media_codecs_google_c2_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_c2_audio.xml \
+	frameworks/av/media/libstagefright/data/media_codecs_google_c2_video.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_c2_video.xml
 
 
 # NFC
@@ -596,10 +740,36 @@
 	ro.opengles.version=196610
 
 
+# AOSP Packages
+PRODUCT_PACKAGES += \
+	DeskClock \
+	Calendar \
+	CalendarProvider \
+	Camera2 \
+	CertInstaller \
+	Gallery2 \
+	LatinIME \
+	Launcher3 \
+	LiveWallpapersPicker \
+	Music \
+	netutils-wrapper-1.0 \
+	Provision \
+	Protips \
+	QuickSearchBox \
+	Settings \
+	Stk \
+	SystemUI \
+
+
 # Perf
 PRODUCT_COPY_FILES += \
 	$(FP_PATH)/configs/powerhint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.xml
 
+PRODUCT_PROPERTY_OVERRIDES += \
+	persist.vendor.qcomsysd.enabled=1 \
+	ro.vendor.extension_library=libqti-perfd-client.so \
+	sys.vendor.shutdown.waittime=500
+
 
 # Power
 PRODUCT_PACKAGES += \
@@ -619,6 +789,9 @@
 	libprotobuf-cpp-lite-vendorcompat
 
 
+# include additional QCOM build utilities
+-include device/qcom/common/utils.mk
+
 # RIL properties
 PRODUCT_PROPERTY_OVERRIDES += rild.libpath=/vendor/lib64/libril-qc-qmi-1.so
 PRODUCT_PROPERTY_OVERRIDES += vendor.rild.libpath=/vendor/lib64/libril-qc-qmi-1.so
@@ -626,6 +799,16 @@
 PRODUCT_PROPERTY_OVERRIDES += \
     persist.vendor.radio.enableadvancedscan=false
 
+# Enable Dual SIM by default
+PRODUCT_PROPERTY_OVERRIDES += persist.radio.multisim.config=dsds
+
+PRODUCT_PROPERTY_OVERRIDES += \
+	persist.vendor.radio.apm_sim_not_pwdn=1 \
+	persist.vendor.radio.sib16_support=1 \
+	persist.vendor.radio.custom_ecc=1 \
+	persist.vendor.radio.rat_on=combine \
+	persist.vendor.radio.procedure_bytes=SKIP
+
 
 # RenderScript
 PRODUCT_PACKAGES += \
@@ -681,6 +864,19 @@
 
 
 # Telephony Permissions
+# whitelisted app
+PRODUCT_COPY_FILES += \
+	device/qcom/common/qti_whitelist.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysconfig/qti_whitelist.xml
+
+PRODUCT_COPY_FILES += \
+	device/qcom/common/privapp-permissions-qti.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/privapp-permissions-qti.xml
+
+# Telephony wrappers
+PRODUCT_PACKAGES += \
+	qti-telephony-hidl-wrapper \
+	qti_telephony_hidl_wrapper.xml \
+	qti-telephony-utils \
+	qti_telephony_utils.xml
 
 
 # Thermal
@@ -707,7 +903,11 @@
 # Vibrator
 PRODUCT_PACKAGES += \
 	android.hardware.vibrator@1.0-impl \
-	android.hardware.vibrator@1.0-service
+	android.hardware.vibrator@1.0-service \
+	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
 
 
 # WiFi
@@ -733,6 +933,10 @@
 PRODUCT_PACKAGES += \
 	android.hardware.wifi@1.0-service
 
+# WLAN DLKM
+PRODUCT_PACKAGES += \
+	pronto_wlan.ko
+
 # WiFi Components
 PRODUCT_PACKAGES += \
 	hostapd \
@@ -755,17 +959,34 @@
 	TetheringConfigOverlay
 
 
+# Zlib
+PRODUCT_HOST_PACKAGES += minigzip
+
+
+#soong namespace for qssi vs vendor differentiation
+SOONG_CONFIG_NAMESPACES += qssi_vs_vendor
+SOONG_CONFIG_qssi_vs_vendor += qssi_or_vendor
+SOONG_CONFIG_qssi_vs_vendor_qssi_or_vendor := vendor
+
+SOONG_CONFIG_NAMESPACES += aosp_vs_qva
+SOONG_CONFIG_aosp_vs_qva += aosp_or_qva
+ifeq ($(TARGET_FWK_SUPPORTS_FULL_VALUEADDS),true)
+SOONG_CONFIG_aosp_vs_qva_aosp_or_qva := qva
+else
+SOONG_CONFIG_aosp_vs_qva_aosp_or_qva := aosp
+endif
+
+SOONG_CONFIG_NAMESPACES += qtidisplaycommonsys
+# Soong Keys
+SOONG_CONFIG_qtidisplaycommonsys := displayconfig_enabled
+# Soong Values
+SOONG_CONFIG_qtidisplaycommonsys_displayconfig_enabled := true
+
+
 # Call the proprietary setup
 # Call this in the end so that flags if required can be utilized.
 $(call inherit-product, device/fairphone/fp3-proprietary/device-vendor.mk)
 
-###################################################################################
-# This is the End of target.mk file.
-# Now, Pickup other split product.mk files:
-###################################################################################
-$(call inherit-product-if-exists,  hardware/qcom/gps/gps_vendor_product.mk)
-$(call inherit-product-if-exists,  vendor/qcom/opensource/commonsys-intf/display/config/display-product-system.mk)
-$(call inherit-product-if-exists,  vendor/qcom/opensource/commonsys-intf/display/config/display-interfaces-product.mk)
-$(call inherit-product-if-exists,  vendor/qcom/opensource/usb/vendor_product.mk)
-$(call inherit-product-if-exists,  vendor/qcom/opensource/vibrator/vibrator-vendor-product.mk)
+# Build some more display components to vendor
+$(call inherit-product, vendor/qcom/opensource/commonsys-intf/display/config/display-interfaces-product.mk)
 ###################################################################################