blob: b07f7238f080a9c5b16d0e6d59254a20219da868 [file] [log] [blame]
# Copyright 2018 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.
#
# For PRODUCT_COPY_FILES, the first instance takes precedence.
# Call the proprietary setup
$(call inherit-product-if-exists, vendor/fairphone/fp2-common/device-vendor.mk)
# TODO Clean everything up below this line
# Inherit from those products. Most specific first.
$(warning Pulling in full basic telephony)
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
## Use the latest approved GMS identifiers unless running a signed build
# ifneq ($(SIGN_BUILD),true)
# PRODUCT_BUILD_PROP_OVERRIDES += \
# BUILD_FINGERPRINT=Fairphone/FP2/FP2:7.1.2/N2G47H/FP2-gms-17.09.3:user/release-keys
# PRIVATE_BUILD_DESC="FP2-user no clue what to put here"
# endif
# enable TWRP
WITH_TWRP := true
#
# PRODUCT_NAME := aosp_FP2
# From FP2.mk
DEVICE_PACKAGE_OVERLAYS += device/fairphone/fp2-common/overlay
# PRODUCT_PACKAGE_OVERLAYS += device/fairphone/fp2-common/overlay
# TODO move to device?
LOCAL_TEMP := device/fairphone/FP2
# Media
PRODUCT_COPY_FILES += \
frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:system/etc/media_codecs_google_audio.xml \
frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:system/etc/media_codecs_google_telephony.xml \
frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:system/etc/media_codecs_google_video.xml
PRODUCT_COPY_FILES += \
$(LOCAL_TEMP)/media/media_codecs_8974.xml:system/etc/media_codecs.xml \
$(LOCAL_TEMP)/media/media_codecs_performance.xml:system/etc/media_codecs_performance.xml \
$(LOCAL_TEMP)/media/media_profiles_8974.xml:system/etc/media_profiles.xml
# IPC router
PRODUCT_COPY_FILES += \
$(LOCAL_TEMP)/configs/sec_config:system/etc/sec_config
# Audio
PRODUCT_COPY_FILES += \
$(LOCAL_TEMP)/audio/acdbdata/MTP/MTP_Bluetooth_cal.acdb:system/etc/acdbdata/MTP/MTP_Bluetooth_cal.acdb \
$(LOCAL_TEMP)/audio/acdbdata/MTP/MTP_General_cal.acdb:system/etc/acdbdata/MTP/MTP_General_cal.acdb \
$(LOCAL_TEMP)/audio/acdbdata/MTP/MTP_Global_cal.acdb:system/etc/acdbdata/MTP/MTP_Global_cal.acdb \
$(LOCAL_TEMP)/audio/acdbdata/MTP/MTP_Handset_cal.acdb:system/etc/acdbdata/MTP/MTP_Handset_cal.acdb \
$(LOCAL_TEMP)/audio/acdbdata/MTP/MTP_Hdmi_cal.acdb:system/etc/acdbdata/MTP/MTP_Hdmi_cal.acdb \
$(LOCAL_TEMP)/audio/acdbdata/MTP/MTP_Headset_cal.acdb:system/etc/acdbdata/MTP/MTP_Headset_cal.acdb \
$(LOCAL_TEMP)/audio/acdbdata/MTP/MTP_Speaker_cal.acdb:system/etc/acdbdata/MTP/MTP_Speaker_cal.acdb
PRODUCT_COPY_FILES += \
$(LOCAL_TEMP)/audio/audio_effects.conf:system/vendor/etc/audio_effects.conf \
$(LOCAL_TEMP)/audio/audio_policy.conf:system/etc/audio_policy.conf \
$(LOCAL_TEMP)/audio/mixer_paths.xml:system/etc/mixer_paths.xml \
$(LOCAL_TEMP)/audio/mixer_paths_auxpcm.xml:system/etc/mixer_paths_auxpcm.xml
PRODUCT_PACKAGES += \
audio.a2dp.default \
audio.primary.msm8974 \
audio.r_submix.default \
audio.usb.default \
audio_policy.msm8974 \
audiod \
libqcompostprocbundle \
libqcomvisualizer \
libqcomvoiceprocessing \
libqcomvoiceprocessingdescriptors \
tinymix
# Boot animation
TARGET_SCREEN_HEIGHT := 1920
TARGET_SCREEN_WIDTH := 1080
# Media
PRODUCT_PACKAGES += \
libOmxAacEnc \
libOmxAmrEnc \
libOmxCore \
libOmxEvrcEnc \
libOmxQcelp13Enc \
libOmxVdec \
libOmxVenc \
libc2dcolorconvert \
libdivxdrmdecrypt \
libstagefrighthw
PRODUCT_PACKAGES += \
ebtables \
ethertypes \
libbson \
libcnefeatureconfig \
libnl_2 \
libtinyxml \
libxml2
# Data
PRODUCT_PACKAGES += \
librmnetctl
# Dalvik/HWUI
$(call inherit-product-if-exists, frameworks/native/build/phone-xxhdpi-2048-dalvik-heap.mk)
$(call inherit-product-if-exists, frameworks/native/build/phone-xxhdpi-2048-hwui-memory.mk)
# Display
PRODUCT_AAPT_CONFIG := normal
PRODUCT_AAPT_PREF_CONFIG := xxhdpi
# Graphics
PRODUCT_PACKAGES += \
copybit.msm8974 \
gralloc.msm8974 \
hwcomposer.msm8974 \
liboverlay \
memtrack.msm8974
# Features
PRODUCT_COPY_FILES += \
external/ant-wireless/antradio-library/com.dsi.ant.antradio_library.xml:system/etc/permissions/com.dsi.ant.antradio_library.xml \
frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml \
frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:system/etc/permissions/android.hardware.camera.flash-autofocus.xml \
frameworks/native/data/etc/android.hardware.camera.front.xml:system/etc/permissions/android.hardware.camera.front.xml \
frameworks/native/data/etc/android.hardware.ethernet.xml:system/etc/permissions/android.hardware.ethernet.xml \
frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \
frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:system/etc/permissions/android.hardware.sensor.accelerometer.xml \
frameworks/native/data/etc/android.hardware.sensor.compass.xml:system/etc/permissions/android.hardware.sensor.compass.xml \
frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:system/etc/permissions/android.hardware.sensor.gyroscope.xml \
frameworks/native/data/etc/android.hardware.sensor.light.xml:system/etc/permissions/android.hardware.sensor.light.xml \
frameworks/native/data/etc/android.hardware.sensor.proximity.xml:system/etc/permissions/android.hardware.sensor.proximity.xml \
frameworks/native/data/etc/android.hardware.sensor.stepcounter.xml:system/etc/permissions/android.hardware.sensor.stepcounter.xml \
frameworks/native/data/etc/android.hardware.sensor.stepdetector.xml:system/etc/permissions/android.hardware.sensor.stepdetector.xml \
frameworks/native/data/etc/android.hardware.telephony.gsm.xml:system/etc/permissions/android.hardware.telephony.gsm.xml \
frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \
frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml \
frameworks/native/data/etc/android.hardware.usb.host.xml:system/etc/permissions/android.hardware.usb.host.xml \
frameworks/native/data/etc/android.hardware.wifi.direct.xml:system/etc/permissions/android.hardware.wifi.direct.xml \
frameworks/native/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \
frameworks/native/data/etc/android.software.midi.xml:system/etc/permissions/android.software.midi.xml \
frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml \
frameworks/native/data/etc/handheld_core_hardware.xml:system/etc/permissions/handheld_core_hardware.xml
# Ramdisk
PRODUCT_PACKAGES += \
fstab.qcom \
init.qcom.power.rc \
init.qcom.rc \
init.qcom.usb.rc \
ueventd.qcom.rc
# TWRP
PRODUCT_PACKAGES += \
twrp.fstab
PRODUCT_PACKAGES += \
init.qcom.bt.sh
# Power
PRODUCT_PACKAGES += \
power.msm8974
# Thermal
PRODUCT_COPY_FILES += \
$(LOCAL_TEMP)/configs/thermal-engine-8974.conf:system/etc/thermal-engine-8974.conf
# Input device files
PRODUCT_COPY_FILES += \
$(LOCAL_TEMP)/configs/gpio-keys.kl:system/usr/keylayout/gpio-keys.kl
# Wifi
PRODUCT_COPY_FILES += \
$(LOCAL_TEMP)/wifi/WCNSS_cfg.dat:system/etc/firmware/wlan/prima/WCNSS_cfg.dat \
$(LOCAL_TEMP)/wifi/WCNSS_qcom_cfg.ini:system/etc/wifi/WCNSS_qcom_cfg.ini \
$(LOCAL_TEMP)/wifi/WCNSS_qcom_wlan_nv.bin:system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin
PRODUCT_PACKAGES += \
hostapd \
wcnss_service \
wpa_supplicant
PRODUCT_PACKAGES += \
hostapd.accept \
hostapd.deny \
hostapd_default.conf \
p2p_supplicant_overlay.conf \
wpa_supplicant.conf \
wpa_supplicant_overlay.conf
# ANT stack
PRODUCT_PACKAGES += \
AntHalService \
com.dsi.ant.antradio_library \
libantradio
# GPS
PRODUCT_PACKAGES += \
gps.msm8974
PRODUCT_COPY_FILES += \
$(LOCAL_TEMP)/gps/flp.conf:system/etc/flp.conf \
$(LOCAL_TEMP)/gps/gps.conf:system/etc/gps.conf \
$(LOCAL_TEMP)/gps/izat.conf:system/etc/izat.conf \
$(LOCAL_TEMP)/gps/quipc.conf:system/etc/quipc.conf \
$(LOCAL_TEMP)/gps/sap.conf:system/etc/sap.conf
# Lights
PRODUCT_PACKAGES += \
lights.msm8974
# Keystore
PRODUCT_PACKAGES += \
keystore.msm8974
# FM radio
PRODUCT_PACKAGES += \
FM2 \
FMRecord \
qcom.fmradio \
init.qcom.fm.sh
# Camera
PRODUCT_PACKAGES += \
camera.msm8974 \
libqomx_core \
libmmcamera_interface \
libmmjpeg_interface \
mm-jpeg-interface-test \
mm-qcamera-app \
Camera2
# Snap
# Proximity Calibration
PRODUCT_PACKAGES += \
ProximitySensorTools
# To increase security you can lock the device down using adb_keys
# in order to generate this key use: cd common && adb keygen adb_keys
# this key must be protected, since without ro.adb.secure=1, it is
# the only way to adb to user build
ifeq ($(TARGET_BUILD_VARIANT), user)
PRODUCT_COPY_FILES += \
$(LOCAL_TEMP)/common/adb_keys.pub:root/adb_keys
endif
# this option allows user builds to have the popup on RSA key with adb
# if the adb_keys is in use this can be disabled for more security
# this is in the core build makefile, not needed explicitly
# when building user after userdebug wipe the out folder first
ifeq ($(TARGET_BUILD_VARIANT), user)
PRODUCT_PROPERTY_OVERRIDES += ro.adb.secure=1
PRODUCT_PROPERTY_OVERRIDES += ro.secure=1
else
PRODUCT_PROPERTY_OVERRIDES += ro.adb.secure=0
PRODUCT_PROPERTY_OVERRIDES += ro.secure=0
PRODUCT_PROPERTY_OVERRIDES += ro.debuggable=1
PRODUCT_PROPERTY_OVERRIDES += persist.service.adb.enable=1
endif
# Stagefright FFMPEG plugin
#PRODUCT_PACKAGES += \
# libffmpeg_extractor \
# libffmpeg_omx \
# media_codecs_ffmpeg.xml
#PRODUCT_PROPERTY_OVERRIDES += \
# media.sf.omx-plugin=libffmpeg_omx.so \
# media.sf.extractor-plugin=libffmpeg_extractor.so
# The product flavours will set PRODUCT_NAME to something else but really, we
# are not allowed to change it because it was certified like this. To not break
# the build system and still have some properties set with the fancy flavour
# name, we only override the PRODUCT_NAME variable in the build.prop file.
PRODUCT_BUILD_PROP_OVERRIDES += PRODUCT_NAME=FP2
PRODUCT_MANUFACTURER := Fairphone
PRODUCT_BRAND := Fairphone
PRODUCT_DEVICE := FP2