Initial changes for Board Bringup [2/2]

Contains the following features:
* Compile
* Boot
* Audio

* Most of the configurations are from msm8953_64 project
but cleaned up, sorted and aligned.
* Vendor audio properties are from Audio HAL.
* Enable compressed VoIP feature.
* Use minimal config from qcom common project.

Issue: FP3-A11#202
Change-Id: I368e379cd4097b499e51f9c6e84a5c7167971def
diff --git a/audio_properties.mk b/audio_properties.mk
new file mode 100644
index 0000000..03087a7
--- /dev/null
+++ b/audio_properties.mk
@@ -0,0 +1,181 @@
+# audio_properties.mk
+#
+# Product-specific audio property definitions.
+# Taken as it is from vendor/qcom/opensource/audio-hal/primary-hal/configs/msm8953/msm8953.mk
+#
+
+# Reduce client buffer size for fast audio output tracks
+PRODUCT_PROPERTY_OVERRIDES += \
+	af.fast_track_multiplier=1
+
+#Low latency audio buffer size in frames
+PRODUCT_PROPERTY_OVERRIDES += \
+	vendor.audio_hal.period_size=192
+
+##fluencetype can be "fluence" or "fluencepro" or "none"
+PRODUCT_PROPERTY_OVERRIDES += \
+	ro.vendor.audio.sdk.fluencetype=none\
+	persist.vendor.audio.fluence.voicecall=true\
+	persist.vendor.audio.fluence.voicerec=false\
+	persist.vendor.audio.fluence.speaker=true
+
+#disable tunnel encoding
+PRODUCT_PROPERTY_OVERRIDES += \
+	vendor.audio.tunnel.encode=false
+
+#Buffer size in kbytes for compress offload playback
+PRODUCT_PROPERTY_OVERRIDES += \
+	vendor.audio.offload.buffer.size.kb=64
+
+#Minimum duration for offload playback in secs
+PRODUCT_PROPERTY_OVERRIDES += \
+	audio.offload.min.duration.secs=30
+
+#Enable offload audio video playback by default
+PRODUCT_PROPERTY_OVERRIDES += \
+	audio.offload.video=true
+
+#Enable audio track offload by default
+PRODUCT_PROPERTY_OVERRIDES += \
+	vendor.audio.offload.track.enable=true
+
+#Enable music through deep buffer
+PRODUCT_PROPERTY_OVERRIDES += \
+	audio.deep_buffer.media=true
+
+#enable voice path for PCM VoIP by default
+PRODUCT_PROPERTY_OVERRIDES += \
+	vendor.voice.path.for.pcm.voip=true
+
+#Enable multi channel aac through offload
+PRODUCT_PROPERTY_OVERRIDES += \
+	vendor.audio.offload.multiaac.enable=true
+
+#Enable DS2, Hardbypass feature for Dolby
+PRODUCT_PROPERTY_OVERRIDES += \
+	vendor.audio.dolby.ds2.enabled=false\
+	vendor.audio.dolby.ds2.hardbypass=false
+
+#Disable Multiple offload sesison
+PRODUCT_PROPERTY_OVERRIDES += \
+	vendor.audio.offload.multiple.enabled=false
+
+#Disable Compress passthrough playback
+PRODUCT_PROPERTY_OVERRIDES += \
+	vendor.audio.offload.passthrough=false
+
+#Disable surround sound recording
+PRODUCT_PROPERTY_OVERRIDES += \
+	ro.vendor.audio.sdk.ssr=false
+
+#enable dsp gapless mode by default
+PRODUCT_PROPERTY_OVERRIDES += \
+	vendor.audio.offload.gapless.enabled=true
+
+#enable pbe effects
+PRODUCT_PROPERTY_OVERRIDES += \
+	vendor.audio.safx.pbe.enabled=true
+
+#parser input buffer size(256kb) in byte stream mode
+PRODUCT_PROPERTY_OVERRIDES += \
+	vendor.audio.parser.ip.buffer.size=262144
+
+#enable downsampling for multi-channel content > 48Khz
+PRODUCT_PROPERTY_OVERRIDES += \
+	vendor.audio.playback.mch.downsample=true
+
+#enable software decoders for ALAC and APE.
+PRODUCT_PROPERTY_OVERRIDES += \
+	vendor.audio.use.sw.alac.decoder=true\
+	vendor.audio.use.sw.ape.decoder=true
+
+#property for AudioSphere Post processing
+PRODUCT_PROPERTY_OVERRIDES += \
+	vendor.audio.pp.asphere.enabled=false
+
+#Audio voice concurrency related flags
+PRODUCT_PROPERTY_OVERRIDES += \
+	vendor.voice.playback.conc.disabled=true\
+	vendor.voice.record.conc.disabled=false\
+	vendor.voice.voip.conc.disabled=true
+
+#Decides the audio fallback path during voice call,
+#deep-buffer and fast are the two allowed fallback paths now.
+PRODUCT_PROPERTY_OVERRIDES += \
+	vendor.voice.conc.fallbackpath=deep-buffer
+
+#Disable speaker protection by default
+PRODUCT_PROPERTY_OVERRIDES += \
+	persist.vendor.audio.speaker.prot.enable=false
+
+#Enable HW AAC Encoder by default
+PRODUCT_PROPERTY_OVERRIDES += \
+	vendor.audio.hw.aac.encoder=true
+
+#flac sw decoder 24 bit decode capability
+PRODUCT_PROPERTY_OVERRIDES += \
+	vendor.audio.flac.sw.decoder.24bit=true
+
+#timeout crash duration set to 20sec before system is ready.
+#timeout duration updates to default timeout of 5sec once the system is ready.
+PRODUCT_PROPERTY_OVERRIDES += \
+	vendor.audio.hal.boot.timeout.ms=20000
+
+#read wsatz name from thermal zone type
+PRODUCT_PROPERTY_OVERRIDES += \
+	vendor.audio.read.wsatz.type=true
+
+#Set AudioFlinger client heap size
+PRODUCT_PROPERTY_OVERRIDES += \
+	ro.af.client_heap_size_kbyte=7168
+
+PRODUCT_PROPERTY_OVERRIDES += \
+	persist.vendor.audio.hw.binder.size_kbyte=1024
+
+#Set speaker protection cal tx path sampling rate to 48k
+PRODUCT_PROPERTY_OVERRIDES += \
+	vendor.audio.spkr_prot.tx.sampling_rate=48000
+
+# add dynamic feature flags here
+PRODUCT_PROPERTY_OVERRIDES += \
+	vendor.audio.feature.snd_mon.enable=true \
+	vendor.audio.feature.compr_cap.enable=false \
+	vendor.audio.feature.hifi_audio.enable=true \
+	vendor.audio.feature.hdmi_edid.enable=true  \
+	vendor.audio.feature.dsm_feedback.enable=false \
+	vendor.audio.feature.ssrec.enable=true  \
+	vendor.audio.feature.compr_voip.enable=true \
+	vendor.audio.feature.kpi_optimize.enable=true \
+	vendor.audio.feature.usb_offload.enable=false  \
+	vendor.audio.feature.usb_offload_burst_mode.enable=false \
+	vendor.audio.feature.usb_offload_sidetone_volume.enable=false \
+	vendor.audio.feature.src_trkn.enable=true \
+	vendor.audio.feature.ras.enable=false \
+	vendor.audio.feature.a2dp_offload.enable=false \
+	vendor.audio.feature.wsa.enable=true \
+	vendor.audio.feature.compress_meta_data.enable=true \
+	vendor.audio.feature.vbat.enable=true \
+	vendor.audio.feature.display_port.enable=false \
+	vendor.audio.feature.fluence.enable=true \
+	vendor.audio.feature.custom_stereo.enable=true \
+	vendor.audio.feature.anc_headset.enable=true \
+	vendor.audio.feature.spkr_prot.enable=false \
+	vendor.audio.feature.fm.enable=true \
+	vendor.audio.feature.external_dsp.enable=false \
+	vendor.audio.feature.external_speaker.enable=false \
+	vendor.audio.feature.external_speaker_tfa.enable=false \
+	vendor.audio.feature.hwdep_cal.enable=false \
+	vendor.audio.feature.hfp.enable=true \
+	vendor.audio.feature.ext_hw_plugin.enable=false \
+	vendor.audio.feature.record_play_concurency.enable=false \
+	vendor.audio.feature.hdmi_passthrough.enable=false \
+	vendor.audio.feature.concurrent_capture.enable=false \
+	vendor.audio.feature.compress_in.enable=false \
+	vendor.audio.feature.battery_listener.enable=false \
+	vendor.audio.feature.maxx_audio.enable=false \
+	vendor.audio.feature.audiozoom.enable=false \
+	vendor.audio.feature.auto_hal.enable=false \
+	vendor.audio.read.wsatz.type=true \
+	vendor.audio.feature.multi_voice_session.enable=true \
+	vendor.audio.feature.incall_music.enable=true
+
diff --git a/common/base.mk b/common/base.mk
new file mode 100644
index 0000000..1784772
--- /dev/null
+++ b/common/base.mk
@@ -0,0 +1,332 @@
+# 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
+
+
+#HOSTAPD
+HOSTAPD := hostapd
+HOSTAPD += hostapd.accept
+HOSTAPD += hostapd.deny
+HOSTAPD += hostapd_cli
+HOSTAPD += hostapd_default.conf
+
+
+#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
+
+
+#WPA
+WPA := wpa_supplicant.conf
+WPA += wpa_cli
+WPA += wpa_supplicant
+
+
+#ZLIB
+ZLIB_HOST := minigzip
+
+
+#Charger
+CHARGER := charger
+CHARGER += charger_res_images
+
+
+#CRDA
+CRDA := init.crda.sh
+
+
+#WLAN
+WLAN := prima_wlan.ko
+WLAN += pronto_wlan.ko
+WLAN += qca_cld_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 += $(HOSTAPD)
+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 += $(WPA)
+
+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)
+
+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\
+	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.hardware.location.gps.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.location.gps.xml \
+	frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \
+	frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.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.software.sip.voip.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.sip.voip.xml \
+	frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml \
+	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 \
+	frameworks/native/data/etc/android.software.device_id_attestation.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.device_id_attestation.xml \
+	frameworks/native/data/etc/android.software.verified_boot.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.verified_boot.xml
+
+# 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
+
+PRODUCT_COPY_FILES += \
+	frameworks/native/data/etc/android.hardware.vulkan.compute-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.compute-0.xml
+
+# include additional build utilities
+-include device/qcom/common/utils.mk
+
+# Copy the vulkan feature level file.
+# Targets listed in VULKAN_FEATURE_LEVEL_0_TARGETS_LIST supports only vulkan feature level 0.
+PRODUCT_COPY_FILES += \
+	frameworks/native/data/etc/android.hardware.vulkan.level-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level-0.xml \
+	frameworks/native/data/etc/android.hardware.vulkan.version-1_0_3.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version-1_0_3.xml
+
+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
new file mode 100644
index 0000000..295fcd8
--- /dev/null
+++ b/common/common64.mk
@@ -0,0 +1,36 @@
+$(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
+
+PRODUCT_PRIVATE_KEY := device/qcom/common/qcom.key
+
diff --git a/device.mk b/device.mk
new file mode 100644
index 0000000..4e83d3b
--- /dev/null
+++ b/device.mk
@@ -0,0 +1,497 @@
+# Copyright 2021-2022 Fairphone B.V.
+#
+# 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.
+#
+
+FP_PATH := device/fairphone/FP3
+
+# Call the vendor setup
+$(call inherit-product-if-exists, vendor/fairphone/fp3-common/device-vendor.mk)
+
+$(call inherit-product, build/make/target/product/product_launched_with_p.mk)
+
+$(call inherit-product, frameworks/native/build/phone-xhdpi-4096-dalvik-heap.mk)
+
+$(call inherit-product, device/fairphone/fp3-common/common/common64.mk)
+
+PRODUCT_NAME := FP3
+PRODUCT_DEVICE := FP3
+PRODUCT_MODEL := FP3
+PRODUCT_MANUFACTURER := Fairphone
+PRODUCT_BRAND := Fairphone
+
+
+# Allow using custom and expressive names for our Android flavors while in fact
+# targeting the same model with all of them.
+PRODUCT_BUILD_PROP_OVERRIDES += PRODUCT_MODEL=FP3 PRODUCT_NAME=FP3
+
+# vendor/qcom/proprietary/common/config/device-vendor.mk --> PRODUCT_LIST
+TARGET_BASE_PRODUCT := FP3
+TARGET_VENDOR := fairphone
+
+TARGET_SYSTEM_PROP := device/$(TARGET_VENDOR)/$(PRODUCT_NAME)/system.prop
+
+
+# We don't have the calibration data as this sort of
+# data can only be generated at the factory so don't generate persist.img
+FP3_SKIP_PERSIST_IMG := true
+
+# Overlays
+DEVICE_PACKAGE_OVERLAYS += \
+	$(LOCAL_PATH)/overlay
+
+
+# A/B related defines
+AB_OTA_UPDATER := true
+AB_OTA_PARTITIONS += \
+	boot \
+	dtbo \
+	system \
+	vbmeta \
+	vendor
+
+
+AB_OTA_POSTINSTALL_CONFIG += \
+	RUN_POSTINSTALL_vendor=true \
+	POSTINSTALL_PATH_vendor=bin/checkpoint_gc \
+	FILESYSTEM_TYPE_vendor=ext4 \
+	POSTINSTALL_OPTIONAL_vendor=true
+
+PRODUCT_PACKAGES += \
+	checkpoint_gc \
+	update_engine_sideload
+
+
+# AVB
+BOARD_AVB_ENABLE := true
+
+
+# Additional native libraries
+PRODUCT_COPY_FILES += \
+	$(FP_PATH)/configs/public.libraries.txt:$(TARGET_COPY_OUT_VENDOR)/etc/public.libraries.txt
+
+
+# Atrace HAL
+PRODUCT_PACKAGES += \
+	android.hardware.atrace@1.0-service
+
+
+# Audio
+# AV Enhancement
+TARGET_ENABLE_QC_AV_ENHANCEMENTS := true
+
+
+PRODUCT_PACKAGES += \
+	android.hardware.audio@6.0 \
+	android.hardware.audio.common@6.0 \
+	android.hardware.audio.common@6.0-util \
+	android.hardware.audio@6.0-impl:32 \
+	android.hardware.audio.effect@6.0 \
+	android.hardware.audio.effect@6.0-impl:32 \
+	android.hardware.audio.service \
+	android.hardware.soundtrigger@2.1-impl \
+	audio.a2dp.default \
+	audio.primary.msm8953 \
+	audio.r_submix.default \
+	audio.usb.default \
+	libaacwrapper \
+	libaudio-resampler \
+	libautohal \
+	libqcompostprocbundle \
+	libqcomvisualizer \
+	libqcomvoiceprocessing \
+	libvolumelistener \
+	tinymix
+
+
+AUDIO_HAL_PATH := vendor/qcom/opensource/audio-hal/primary-hal
+
+# Audio files
+PRODUCT_COPY_FILES += \
+	frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml \
+	$(AUDIO_HAL_PATH)/configs/msm8953/audio_effects.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.conf \
+	$(AUDIO_HAL_PATH)/configs/msm8953/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \
+	$(AUDIO_HAL_PATH)/configs/msm8953/audio_output_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_output_policy.conf \
+	$(AUDIO_HAL_PATH)/configs/msm8953/audio_platform_info_intcodec.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info_intcodec.xml \
+	$(AUDIO_HAL_PATH)/configs/msm8953/audio_platform_info_sku3_tasha.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info_sku3_tasha.xml \
+	$(AUDIO_HAL_PATH)/configs/msm8953/audio_platform_info_sku4.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info_sku4.xml \
+	$(AUDIO_HAL_PATH)/configs/msm8953/audio_platform_info_tasha.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info_tasha.xml \
+	$(AUDIO_HAL_PATH)/configs/msm8953/audio_platform_info_tashalite.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info_tashalite.xml \
+	$(AUDIO_HAL_PATH)/configs/msm8953/audio_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy.conf \
+	$(AUDIO_HAL_PATH)/configs/msm8953/audio_tuning_mixer.txt:$(TARGET_COPY_OUT_VENDOR)/etc/audio_tuning_mixer.txt \
+	$(AUDIO_HAL_PATH)/configs/msm8953/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml \
+	$(AUDIO_HAL_PATH)/configs/msm8953/mixer_paths_mtp.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_mtp.xml \
+	$(AUDIO_HAL_PATH)/configs/msm8953/mixer_paths_sku3_tasha.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_sku3_tasha.xml \
+	$(AUDIO_HAL_PATH)/configs/msm8953/mixer_paths_sku4.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_sku4.xml \
+	$(AUDIO_HAL_PATH)/configs/msm8953/mixer_paths_tasha.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_tasha.xml \
+	$(AUDIO_HAL_PATH)/configs/msm8953/mixer_paths_tashalite.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_tashalite.xml \
+	$(AUDIO_HAL_PATH)/configs/msm8953/sound_trigger_mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths.xml \
+	$(AUDIO_HAL_PATH)/configs/msm8953/sound_trigger_mixer_paths_wcd9306.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths_wcd9306.xml \
+	$(AUDIO_HAL_PATH)/configs/msm8953/sound_trigger_mixer_paths_wcd9330.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths_wcd9330.xml \
+	$(AUDIO_HAL_PATH)/configs/msm8953/sound_trigger_mixer_paths_wcd9335.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths_wcd9335.xml \
+	$(AUDIO_HAL_PATH)/configs/msm8953/sound_trigger_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_platform_info.xml
+
+
+# Audio config files
+PRODUCT_COPY_FILES += \
+	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/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \
+	frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration.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 \
+	frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml
+
+# Custom config files
+PRODUCT_COPY_FILES += \
+	$(FP_PATH)/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml
+
+
+# Audio firmware files
+PRODUCT_COPY_FILES += \
+	$(FP_PATH)/aw/aw8898_cfg.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/aw8898_cfg.bin \
+	$(FP_PATH)/tas2557_fw/OBO_0617_music.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/tas2557_uCDSP.bin \
+	$(FP_PATH)/tas2557_fw/tas2557evm_OBO_0617.ftcfg:$(TARGET_COPY_OUT_VENDOR)/firmware/tas2557evm_aacspk_a.ftcfg
+
+
+# Audio Specific device overlays
+DEVICE_PACKAGE_OVERLAYS += $(AUDIO_HAL_PATH)/configs/common/overlay
+
+
+# Audio Specific properties
+# Properties
+-include $(LOCAL_PATH)/audio_properties.mk
+
+
+# Audio Kernel modules
+AUDIO_DLKM := audio_apr.ko
+AUDIO_DLKM += audio_q6_notifier.ko
+AUDIO_DLKM += audio_adsp_loader.ko
+AUDIO_DLKM += audio_q6.ko
+AUDIO_DLKM += audio_usf.ko
+AUDIO_DLKM += audio_pinctrl_wcd.ko
+AUDIO_DLKM += audio_swr.ko
+AUDIO_DLKM += audio_wcd_core.ko
+AUDIO_DLKM += audio_swr_ctrl.ko
+AUDIO_DLKM += audio_wsa881x.ko
+AUDIO_DLKM += audio_wsa881x_analog.ko
+AUDIO_DLKM += audio_platform.ko
+AUDIO_DLKM += audio_cpe_lsm.ko
+AUDIO_DLKM += audio_hdmi.ko
+AUDIO_DLKM += audio_stub.ko
+AUDIO_DLKM += audio_wcd9xxx.ko
+AUDIO_DLKM += audio_mbhc.ko
+AUDIO_DLKM += audio_wcd9335.ko
+AUDIO_DLKM += audio_wcd_cpe.ko
+AUDIO_DLKM += audio_digital_cdc.ko
+AUDIO_DLKM += audio_analog_cdc.ko
+AUDIO_DLKM += audio_native.ko
+AUDIO_DLKM += audio_machine_sdm450.ko
+AUDIO_DLKM += audio_machine_ext_sdm450.ko
+PRODUCT_PACKAGES += $(AUDIO_DLKM)
+
+
+# Bluetooth
+
+
+# Boot
+PRODUCT_PACKAGES += \
+	android.hardware.boot@1.0-impl \
+	android.hardware.boot@1.0-impl.recovery \
+	android.hardware.boot@1.0-service \
+	bootctrl.msm8953 \
+	update_engine \
+	update_engine_client \
+	update_engine_sideload \
+	update_verifier
+
+
+# Boot animation
+TARGET_SCREEN_HEIGHT := 2160
+TARGET_SCREEN_WIDTH := 1080
+
+
+PRODUCT_COPY_FILES += \
+	vendor/fairphone/media/bootanimation/bootanimation.zip:$(TARGET_COPY_OUT_PRODUCT)/media/bootanimation.zip
+
+
+# Camera
+
+
+# Component overrides
+# TODO: Check if this is required.
+#PRODUCT_COPY_FILES += \
+	$(FP_PATH)/configs/component-overrides.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sysconfig/component-overrides.xml
+
+
+# Display
+PRODUCT_PACKAGES += \
+	android.hardware.graphics.allocator@2.0-impl \
+	android.hardware.graphics.allocator@2.0-service \
+	android.hardware.graphics.composer@2.1-service \
+	android.hardware.graphics.mapper@2.0-impl-2.1 \
+	android.hardware.memtrack@1.0-impl \
+	android.hardware.memtrack@1.0-service \
+	gralloc.default \
+	gralloc.msm8953 \
+	hwcomposer.msm8953 \
+	memtrack.msm8953 \
+	libdisplayconfig \
+	libqdutils \
+	libqdMetaData \
+	libvulkan \
+	vendor.qti.hardware.display.composer@3.0
+
+
+# Vendor Display
+# Disable skip validate
+PRODUCT_PROPERTY_OVERRIDES += \
+	vendor.display.disable_skip_validate=1
+
+
+# Display Properties
+PRODUCT_AAPT_CONFIG := normal
+PRODUCT_AAPT_PREF_CONFIG := xxhdpi
+
+
+# DRM
+PRODUCT_PACKAGES += \
+	android.hardware.drm@1.3-service.clearkey
+
+
+# Enable vndk-sp Libraries
+PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE := true
+TARGET_USES_MKE2FS := true
+
+PRODUCT_PACKAGES += \
+	vndk_package
+
+
+# Encryption
+PRODUCT_PROPERTY_OVERRIDES += ro.crypto.allow_encrypt_override=true
+PRODUCT_PROPERTY_OVERRIDES += ro.crypto.volume.filenames_mode=aes-256-cts
+
+
+# FBE support
+PRODUCT_COPY_FILES += \
+	$(FP_PATH)/init.qti.qseecomd.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.qti.qseecomd.sh
+
+
+# Framework Detect
+PRODUCT_PACKAGES += \
+	libqti_vndfwk_detect \
+	libqti_vndfwk_detect.vendor \
+	libvndfwk_detect_jni.qti \
+	libvndfwk_detect_jni.qti.vendor \
+	vndservicemanager
+
+
+# HIDL
+PRODUCT_PACKAGES += \
+	android.hidl.base@1.0 \
+	libhidltransport \
+	libhidltransport.vendor \
+	libhwbinder \
+	libhwbinder.vendor
+
+
+# Health
+PRODUCT_PACKAGES += \
+	android.hardware.health@2.1-impl \
+	android.hardware.health@2.1-impl.recovery \
+	android.hardware.health@2.1-service
+
+# IMS
+PRODUCT_PACKAGES += \
+	ims-ext-common \
+	ims_ext_common.xml \
+	ConfURIDialer
+
+# IPACM
+PRODUCT_PACKAGES += \
+	ipacm \
+	IPACM_cfg.xml \
+	libipanat \
+	liboffloadhal \
+	libqsap_sdk
+
+# IRQ
+PRODUCT_COPY_FILES += \
+	$(FP_PATH)/configs/msm_irqbalance.conf:$(TARGET_COPY_OUT_VENDOR)/etc/msm_irqbalance.conf \
+	$(FP_PATH)/configs/msm_irqbalance_little_big.conf:$(TARGET_COPY_OUT_VENDOR)/etc/msm_irqbalance_little_big.conf
+
+
+# Kernel modules
+# Kernel modules install path
+KERNEL_MODULES_INSTALL := dlkm
+KERNEL_MODULES_OUT := out/target/product/$(PRODUCT_NAME)/$(KERNEL_MODULES_INSTALL)/lib/modules
+
+
+# LED packages
+PRODUCT_PACKAGES += \
+	android.hardware.light@2.0-impl \
+	android.hardware.light@2.0-service \
+	lights.msm8953
+
+
+# Media / StagefrightCodec 2.0
+PRODUCT_PROPERTY_OVERRIDES += debug.stagefright.omx_default_rank=0
+
+
+# NFC
+
+
+# OMX
+PRODUCT_PACKAGES += \
+	libavservices_minijail.vendor \
+	libc2dcolorconvert \
+	libOmxAacEnc \
+	libOmxAmrEnc \
+	libOmxCore \
+	libOmxEvrcEnc \
+	libOmxQcelp13Enc \
+	libOmxVdec \
+	libOmxVenc \
+	libqomx_core \
+	libaacwrapper \
+	libmm-omxcore \
+	libstagefrighthw \
+	libstagefright_softomx.vendor
+
+
+#
+# system prop for opengles version
+#
+# 196608 is decimal for 0x30000 to report major/minor versions as 3/0
+# 196609 is decimal for 0x30001 to report major/minor versions as 3/1
+# 196610 is decimal for 0x30002 to report major/minor versions as 3/2
+PRODUCT_PROPERTY_OVERRIDES += \
+	ro.opengles.version=196610
+
+
+# Perf
+PRODUCT_COPY_FILES += \
+	$(FP_PATH)/configs/powerhint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.xml
+
+
+# Power
+PRODUCT_PACKAGES += \
+	android.hardware.power@1.0-impl \
+	android.hardware.power@1.0-service \
+	power.qcom
+
+
+# Feature flags
+PRODUCT_COPY_FILES += \
+	frameworks/native/data/etc/android.hardware.opengles.aep.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.opengles.aep.xml \
+	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.touchscreen.multitouch.jazzhand.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \
+	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 \
+	frameworks/native/data/etc/android.hardware.vulkan.level-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level-0.xml \
+	frameworks/native/data/etc/android.hardware.vulkan.version-1_1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version-1_0_3.xml \
+	frameworks/native/data/etc/android.hardware.vulkan.compute-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.compute-0.xml \
+	frameworks/native/data/etc/android.software.verified_boot.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/android.software.verified_boot.xml \
+	frameworks/native/data/etc/android.software.vulkan.deqp.level-2019-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.vulkan.deqp.level-2019-03-01.xml \
+	frameworks/native/data/etc/android.software.ipsec_tunnels.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.ipsec_tunnels.xml \
+	frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml \
+	frameworks/native/data/etc/android.software.sip.voip.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.sip.voip.xml
+
+
+# privapp-permissions whitelisting
+PRODUCT_PROPERTY_OVERRIDES += ro.control_privapp_permissions=enforce
+
+
+# Protobuf
+PRODUCT_PACKAGES += \
+	libprotobuf-cpp-full \
+	libprotobuf-cpp-full-vendorcompat \
+	libprotobuf-cpp-lite-vendorcompat
+
+
+# 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
+#vendor prop to disable advanced network scanning
+PRODUCT_PROPERTY_OVERRIDES += \
+    persist.vendor.radio.enableadvancedscan=false
+
+
+# RenderScript
+PRODUCT_PACKAGES += \
+	android.hardware.renderscript@1.0-impl
+
+
+# SDCard
+# default is nosdcard, S/W button enabled in resource
+PRODUCT_CHARACTERISTICS := nosdcard
+
+
+# Seccomp
+PRODUCT_COPY_FILES += \
+	$(FP_PATH)/seccomp/mediacodec-seccomp.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediacodec.policy \
+	$(FP_PATH)/seccomp/mediaextractor-seccomp.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediaextractor.policy
+
+
+# System helper
+PRODUCT_PACKAGES += \
+	vendor.qti.hardware.systemhelper@1.0
+
+
+# Service tracker
+PRODUCT_PACKAGES += \
+	vendor.qti.hardware.servicetracker@1.2.vendor
+
+
+# Telephony Permissions
+
+
+# Thermal
+PRODUCT_PACKAGES += \
+	android.hardware.thermal@1.0-impl \
+	android.hardware.thermal@1.0-service
+
+
+# Tinyxml
+PRODUCT_PACKAGES += \
+	libtinyxml
+
+# USB
+PRODUCT_PACKAGES += \
+	android.hardware.usb@1.0-service
+
+-include vendor/qcom/opensource/usb/vendor_product.mk
+
+
+# Vendor move
+PRODUCT_VENDOR_MOVE_ENABLED := true
+
+
+# Vibrator
+PRODUCT_PACKAGES += \
+	android.hardware.vibrator@1.0-impl \
+	android.hardware.vibrator@1.0-service
+
+
+# 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,  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)
+###################################################################################
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
new file mode 100644
index 0000000..b1b97ca
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+    Copyright (c) 2014, The Linux Foundation. All rights reserved.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are
+    met:
+        * Redistributions of source code must retain the above copyright
+          notice, this list of conditions and the following disclaimer.
+        * Redistributions in binary form must reproduce the above
+          copyright notice, this list of conditions and the following
+          disclaimer in the documentation and/or other materials provided
+          with the distribution.
+        * Neither the name of The Linux Foundation nor the names of its
+          contributors may be used to endorse or promote products derived
+          from this software without specific prior written permission.
+
+    THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+    WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+    ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+    BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+    BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+    WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+    OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+    IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+-->
+
+<resources>
+
+    <!-- Camera Shutter -->
+    <!-- Whether camera shutter sound is forced or not  (country specific). -->
+    <bool name="config_camera_sound_forced">false</bool>
+
+
+    <!-- Dialer -->
+    <!-- The name of the package that will hold the dialer role by default. -->
+    <string name="config_defaultDialer" translatable="false">com.android.dialer</string>
+
+
+    <!-- Doze -->
+    <!-- Enable doze mode -->
+    <string name="config_dozeComponent">com.android.systemui/com.android.systemui.doze.DozeService</string>
+    <bool name="config_dozeAfterScreenOff">true</bool>
+    <!-- Screen brightness when dozing. -->
+    <integer name="config_screenBrightnessDoze">17</integer>
+    <bool name="config_powerDecoupleInteractiveModeFromDisplay">false</bool>
+    <bool name="config_setColorTransformAccelerated">true</bool>
+
+
+    <!-- NTP Server -->
+
+    <!-- Remote server that can provide NTP responses. -->
+    <string translatable="false" name="config_ntpServer">europe.pool.ntp.org</string>
+
+
+    <!-- Screen and Display -->
+
+    <!-- Flag indicating whether the we should enable the automatic brightness in Settings.
+         Software implementation will be used if config_hardware_auto_brightness_available is not set -->
+    <bool name="config_automatic_brightness_available">true</bool>
+
+    <!-- Indicate whether to allow the device to suspend when the screen is off
+    due to the proximity sensor.  This resource should only be set to true
+    if the sensor HAL correctly handles the proximity sensor as a wake-up source.
+    Otherwise, the device may fail to wake out of suspend reliably.
+    The default is false. -->
+    <bool name="config_suspendWhenScreenOffDueToProximity">true</bool>
+
+    <!-- If this is true, the screen will come on when you plug/unplug usb/power/whatever. -->
+    <bool name="config_unplugTurnsOnScreen">true</bool>
+
+
+    <!-- Navigation bar -->
+
+    <!-- Enable system navigation keys. -->
+    <bool name="config_supportSystemNavigationKeys">true</bool>
+
+    <!-- Whether a software navigation bar should be shown. NOTE: in the future this may be
+        autodetected from the Configuration. -->
+    <bool name="config_showNavigationBar">true</bool>
+
+
+    <!-- Round Icons -->
+
+    <!-- Set icon mask to circle -->
+    <string name="config_icon_mask" translatable="false">"M50 0A50 50,0,1,1,50 100A50 50,0,1,1,50 0"</string>
+
+    <!-- Flag indicating whether round icons should be parsed from the application manifest. -->
+    <bool name="config_useRoundIcon">true</bool>
+
+
+    <!-- Biometics -->
+
+    <!-- List of biometric sensors on the device, in decreasing strength. Consumed by AuthService
+         when registering authenticators with BiometricService. Format must be ID:Modality:Strength,
+         where: IDs are unique per device, Modality as defined in BiometricAuthenticator.java,
+         and Strength as defined in Authenticators.java -->
+    <string-array name="config_biometric_sensors" translatable="false" >
+        <item>0:2:15</item> <!-- ID0:Fingerprint:Strong -->
+    </string-array>
+
+
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/xml/power_profile.xml b/overlay/frameworks/base/core/res/res/xml/power_profile.xml
new file mode 100644
index 0000000..f3757a2
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/xml/power_profile.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+    Copyright (c) 2015, The Linux Foundation. All rights reserved.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are
+    met:
+        * Redistributions of source code must retain the above copyright
+          notice, this list of conditions and the following disclaimer.
+        * Redistributions in binary form must reproduce the above
+          copyright notice, this list of conditions and the following
+          disclaimer in the documentation and/or other materials provided
+          with the distribution.
+        * Neither the name of The Linux Foundation nor the names of its
+          contributors may be used to endorse or promote products derived
+          from this software without specific prior written permission.
+
+    THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+    WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+    ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+    BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+    BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+    WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+    OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+    IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+-->
+
+<device name="Android">
+  <item name="screen.on">63</item>
+  <item name="screen.full">261</item>
+ <!-- Different CPU speeds as reported in
+       /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state -->
+  <array name="cpu.speeds">
+      <value>200000</value> <!-- 200 MHz CPU speed -->
+      <value>499200</value> <!-- 499 MHz CPU speed -->
+      <value>533333</value> <!-- 533 MHz CPU speed -->
+      <value>800000</value> <!-- 800 MHz CPU speed -->
+      <value>998400</value> <!-- 998 MHz CPU speed -->
+      <value>1094400</value> <!-- 1094 MHz CPU speed -->
+      <value>1209600</value> <!-- 1209 MHz CPU speed -->
+  </array>
+  <!-- Current at each CPU speed, as per 'cpu.speeds' -->
+  <array name="cpu.active">
+      <value>151</value>
+      <value>169</value>
+      <value>177</value>
+      <value>195</value>
+      <value>259</value>
+      <value>307</value>
+      <value>353</value>
+  </array>
+  <!-- Current when CPU is awake -->
+  <item name="cpu.awake">1.6</item>
+  <!-- Current when CPU is idle -->
+  <item name="cpu.idle">1.6</item>
+  <!-- This is the battery capacity in mAh (measured at nominal voltage) -->
+  <item name="battery.capacity">2000</item>
+</device>
diff --git a/overlay/frameworks/opt/net/wifi/service/res/values/config.xml b/overlay/frameworks/opt/net/wifi/service/res/values/config.xml
new file mode 100644
index 0000000..24e3c8d
--- /dev/null
+++ b/overlay/frameworks/opt/net/wifi/service/res/values/config.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--Copyright (c) 2021, The Linux Foundation. All rights reserved.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are
+    met:
+        * Redistributions of source code must retain the above copyright
+          notice, this list of conditions and the following disclaimer.
+        * Redistributions in binary form must reproduce the above
+          copyright notice, this list of conditions and the following
+          disclaimer in the documentation and/or other materials provided
+          with the distribution.
+        * Neither the name of The Linux Foundation nor the names of its
+          contributors may be used to endorse or promote products derived
+          from this software without specific prior written permission.
+
+    THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+    WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+    ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+    BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+    BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+    WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+    OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+    IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<resources>
+
+   <!-- Enable ACS (auto channel selection) for Wifi hotspot (SAP) -->
+   <bool translatable="false" name="config_wifi_softap_acs_supported">false</bool>
+
+   <!-- Enable 802.11ac for Wifi hotspot (SAP) -->
+   <bool translatable="false" name="config_wifi_softap_ieee80211ac_supported">false</bool>
+
+</resources>