blob: 498b69aaa88d5399a011ff941551aeaae5a626bf [file] [log] [blame]
Vivekbalachandar M7af3d832020-02-12 15:56:09 +05301# Copyright 2018-2020 Fairphone B.V.
Vivekbalachandar Marisamy659e6a62019-10-08 08:44:33 +00002#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14#
15
Vivekbalachandar M7af3d832020-02-12 15:56:09 +053016# camera_detect
17$(call inherit-product-if-exists, device/fairphone/fp2-common/camera_detect/camera_detect.mk)
Vivekbalachandar Marisamy659e6a62019-10-08 08:44:33 +000018
Vivekbalachandar M7af3d832020-02-12 15:56:09 +053019# setup dalvik vm configs.
20$(call inherit-product, frameworks/native/build/phone-xhdpi-2048-dalvik-heap.mk)
Vivekbalachandar Marisamy659e6a62019-10-08 08:44:33 +000021
Prityaac36e0712020-03-05 15:35:16 +053022# we don't have the calibration data so don't generate persist.img
23FP2_SKIP_PERSIST_IMG := true
24
Vivekbalachandar Marisamy659e6a62019-10-08 08:44:33 +000025# This is needed for the 2016 June official Nexus 5 driver's glsub
26TARGET_USE_COMPAT_GRALLOC_PERFORM := true
27
Vivekbalachandar M7af3d832020-02-12 15:56:09 +053028# Common definitions to set undefined properties
29$(call inherit-product, device/qcom/common/common.mk)
30
31
32BLOBS_PATH = device/fairphone/fp2-proprietary
33
34# Call the proprietary setup
35$(call inherit-product, $(BLOBS_PATH)/device-vendor.mk)
36
37TARGET_USES_QCOM_BSP := true
38TARGET_USES_QCA_NFC := other
39
40ifeq ($(TARGET_USES_QCOM_BSP), true)
41# Add QC Video Enhancements flag
42TARGET_ENABLE_QC_AV_ENHANCEMENTS := true
43endif #TARGET_USES_QCOM_BSP
44
Vivekbalachandar M7af3d832020-02-12 15:56:09 +053045PRODUCT_DEVICE := FP2
46PRODUCT_BRAND := Fairphone
47PRODUCT_MANUFACTURER := Fairphone
48
Borjan Tchakaloff832cec42018-05-24 16:07:24 +020049# The product flavors will set PRODUCT_NAME and PRODUCT_MODEL to something else
50# but really, we are not allowed to change it because it was certified like this.
51# To not break the build system and still have some properties set with the fancy
52# flavour name, we only override the variables in the generated build.prop file.
53PRODUCT_BUILD_PROP_OVERRIDES += PRODUCT_MODEL=FP2 PRODUCT_NAME=FP2
54
Borjan Tchakaloff1b9d2602018-05-11 11:35:06 +020055# Define the build number based on the product flavour and on the build manifest
56# revision
57ifneq (,$(strip $(PRODUCT_FLAVOR)))
58 _BUILD_MANIFEST_REV := $(shell (git -C $(TOPDIR).repo/manifests rev-parse --short=8 HEAD))
59 BUILD_NUMBER := $(PRODUCT_FLAVOR)-$(_BUILD_MANIFEST_REV)
60 HAS_BUILD_NUMBER := true
61else
62 $(error PRODUCT_FLAVOR must be defined)
63endif
64$(warning Build defined as $(BUILD_ID) ($(BUILD_NUMBER)))
65
66
Vivekbalachandar M7af3d832020-02-12 15:56:09 +053067PRODUCT_PROPERTY_OVERRIDES += ro.frp.pst=/dev/block/bootdevice/by-name/pad
68
69DEVICE_PACKAGE_OVERLAYS += device/fairphone/fp2-common/overlay
70
71# Do not enable data roaming by default
72PRODUCT_PROPERTY_OVERRIDES := $(filter-out ro.com.android.dataroaming=%,\
73 $(PRODUCT_PROPERTY_OVERRIDES)) \
74 ro.com.android.dataroaming=false
75
76# Set default alarm sound
77PRODUCT_PROPERTY_OVERRIDES += \
78 ro.config.alarm_alert=Cesium.ogg
79
80# Allow mediaserver to allocate up to 75% of total RAM
81PRODUCT_PROPERTY_OVERRIDES += \
82 ro.media.maxmem=1451891712
83
84# Enable strict operation
85PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
86 persist.sys.strict_op_enable=false
87
88PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
89 persist.sys.whitelist=/system/etc/whitelist_appops.xml
90
91PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
92 camera2.portability.force_api=1
93
94
95PRODUCT_COPY_FILES += \
96 device/fairphone/fp2-common/rootdir/system/etc/old-apns-conf.xml:system/etc/old-apns-conf.xml \
97 device/fairphone/fp2-common/rootdir/system/etc/apns-conf.xml:system/etc/apns-conf.xml
98
99# MIDI feature
100PRODUCT_COPY_FILES += \
101 frameworks/native/data/etc/android.software.midi.xml:system/etc/permissions/android.software.midi.xml
102
103PRODUCT_COPY_FILES += \
104 device/fairphone/FP2/whitelist_appops.xml:system/etc/whitelist_appops.xml
105
Arvind Singh13c02672020-02-19 11:03:27 +0530106# WiFi driver
107PRODUCT_COPY_FILES += \
Prityaac36e0712020-03-05 15:35:16 +0530108 device/fairphone/FP2/wifi/WCNSS_qcom_cfg.ini:system/etc/wifi/WCNSS_qcom_cfg.ini
109
110ifneq ($(strip $(FP2_SKIP_PERSIST_IMG)),true)
111PRODUCT_COPY_FILES += \
Arvind Singh13c02672020-02-19 11:03:27 +0530112 device/fairphone/FP2/wifi/WCNSS_qcom_wlan_nv.bin:persist/WCNSS_qcom_wlan_nv.bin
Prityaac36e0712020-03-05 15:35:16 +0530113endif
Arvind Singh13c02672020-02-19 11:03:27 +0530114
115# WiFi
116PRODUCT_COPY_FILES += \
117 device/fairphone/FP2/wifi/WCNSS_cfg.dat:$(TARGET_COPY_OUT_VENDOR)/firmware/wlan/prima/WCNSS_cfg.dat \
118 device/fairphone/FP2/wifi/WCNSS_qcom_cfg.ini:$(TARGET_COPY_OUT_VENDOR)/firmware/wlan/prima/WCNSS_qcom_cfg.ini \
119 device/fairphone/FP2/wifi/WCNSS_qcom_wlan_nv.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin
120
Vivekbalachandar M7af3d832020-02-12 15:56:09 +0530121# Features
122PRODUCT_COPY_FILES += \
123 external/ant-wireless/antradio-library/com.dsi.ant.antradio_library.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/com.dsi.ant.antradio_library.xml \
124 frameworks/native/data/etc/android.hardware.audio.low_latency.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.low_latency.xml \
125 frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.flash-autofocus.xml \
126 frameworks/native/data/etc/android.hardware.camera.front.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.front.xml \
127 frameworks/native/data/etc/android.hardware.ethernet.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.ethernet.xml \
128 frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.accelerometer.xml \
129 frameworks/native/data/etc/android.hardware.sensor.compass.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.compass.xml \
130 frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.gyroscope.xml \
131 frameworks/native/data/etc/android.hardware.sensor.light.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.light.xml \
132 frameworks/native/data/etc/android.hardware.sensor.proximity.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.proximity.xml \
133 frameworks/native/data/etc/android.hardware.sensor.stepcounter.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepcounter.xml \
134 frameworks/native/data/etc/android.hardware.sensor.stepdetector.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepdetector.xml \
135 frameworks/native/data/etc/android.hardware.telephony.gsm.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.gsm.xml \
136 frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \
137 frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml \
138 frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml \
139 frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \
140 frameworks/native/data/etc/android.hardware.wifi.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \
141 frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml \
142 frameworks/native/data/etc/android.software.sip.voip.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.sip.voip.xml \
143 frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml \
144
145# Boot animation
146PRODUCT_COPY_FILES += \
147 vendor/fairphone/media/bootanimation/fp2.zip:system/media/bootanimation.zip
148
149# Display logo image file
150PRODUCT_PACKAGES += \
151 libqcomvisualizer \
152 libqcomvoiceprocessing \
153 libqcompostprocbundle
154
155# battery_monitor
156PRODUCT_PACKAGES += \
157 battery_monitor \
158 battery_shutdown
159
160# fstab.qcom
161PRODUCT_PACKAGES += fstab.qcom
162
Arvind Singh13c02672020-02-19 11:03:27 +0530163# WiFi
164PRODUCT_PACKAGES += \
165 hostapd \
166 wcnss_service \
167 wpa_supplicant
168
169PRODUCT_PACKAGES += \
170 p2p_supplicant_overlay.conf \
171 wpa_supplicant.conf \
172 wpa_supplicant_overlay.conf
173
Vivekbalachandar M7af3d832020-02-12 15:56:09 +0530174# ANT stack
175PRODUCT_PACKAGES += \
176 AntHalService \
177 libantradio \
178 ANTRadioService \
179 antradio_app
180
181# include an expanded selection of fonts for the SDK.
182EXTENDED_FONT_FOOTPRINT := true
183
184# remove /dev/diag in user version for CTS
185ifeq ($(TARGET_BUILD_VARIANT),user)
186PRODUCT_COPY_FILES += device/qcom/common/rootdir/etc/init.qcom.diag.rc.user:root/init.qcom.diag.rc
Vivekbalachandar Marisamy659e6a62019-10-08 08:44:33 +0000187endif
Vivekbalachandar Marisamy659e6a62019-10-08 08:44:33 +0000188
Vivekbalachandar M7af3d832020-02-12 15:56:09 +0530189# Enable the diagnostics interface by default in userdebug and eng builds
190ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
191PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
192 persist.sys.usb.config=diag
193endif
Vivekbalachandar Marisamy659e6a62019-10-08 08:44:33 +0000194
Vivekbalachandar M7af3d832020-02-12 15:56:09 +0530195ifeq ($(strip $(FP2_SKIP_BOOT_JARS_CHECK)),)
196SKIP_BOOT_JARS_CHECK := true
197endif
198
Vivekbalachandar M7af3d832020-02-12 15:56:09 +0530199# display density
200PRODUCT_PROPERTY_OVERRIDES += \
201 ro.sf.lcd_density=480
202
203$(call inherit-product, build/target/product/product_launched_with_l_mr1.mk)
204
205# Media
206PRODUCT_PACKAGES += \
207 audio.a2dp.default \
208 audio.primary.msm8974 \
209 audio.r_submix.default \
210 audio.usb.default \
211 audio_policy.msm8974 \
212 libqcompostprocbundle \
213 libqcomvisualizer \
214 libqcomvoiceprocessing \
215 libqcomvoiceprocessingdescriptors \
216 tinymix
217
218# RenderScript
219PRODUCT_PACKAGES += \
220 android.hardware.renderscript@1.0-impl
Vivekbalachandar Marisamy659e6a62019-10-08 08:44:33 +0000221
222# Boot animation
223TARGET_SCREEN_HEIGHT := 1920
224TARGET_SCREEN_WIDTH := 1080
225
Arvind Singhab01cec2020-02-20 16:22:51 +0530226# Bluetooth
227PRODUCT_PACKAGES += \
228 android.hardware.bluetooth@1.0-impl \
229 android.hardware.bluetooth@1.0-service \
230 libbt-vendor
231
Vivekbalachandar M7af3d832020-02-12 15:56:09 +0530232# Camera
233PRODUCT_PACKAGES += \
234 android.hardware.camera.provider@2.4-impl \
235 camera.device@1.0-impl \
236 camera.msm8974
237
Prityaa86940a22020-03-05 17:21:35 +0530238# Sensors
239PRODUCT_PACKAGES += \
240 android.hardware.sensors@1.0-impl
241
Vivekbalachandar M7af3d832020-02-12 15:56:09 +0530242# Media
243PRODUCT_PACKAGES += \
244 libOmxAacEnc \
245 libOmxAmrEnc \
246 libOmxCore \
247 libOmxEvrcEnc \
248 libOmxQcelp13Enc \
249 libOmxVdec \
250 libOmxVenc \
251 libc2dcolorconvert \
252 libstagefrighthw
253
Vivekbalachandar Marisamy659e6a62019-10-08 08:44:33 +0000254
255# Display
256PRODUCT_AAPT_CONFIG := normal
257PRODUCT_AAPT_PREF_CONFIG := xxhdpi
258
Vivekbalachandar M7af3d832020-02-12 15:56:09 +0530259# Graphics
Vivekbalachandar Marisamy659e6a62019-10-08 08:44:33 +0000260PRODUCT_PACKAGES += \
Vivekbalachandar M7af3d832020-02-12 15:56:09 +0530261 copybit.msm8974 \
262 gralloc.msm8974 \
263 hwcomposer.msm8974 \
264 liboverlay \
265 memtrack.msm8974
Vivekbalachandar Marisamy659e6a62019-10-08 08:44:33 +0000266
Vivekbalachandar M7af3d832020-02-12 15:56:09 +0530267# HAL Modules
Vivekbalachandar Marisamy659e6a62019-10-08 08:44:33 +0000268
Arvind Singh13c02672020-02-19 11:03:27 +0530269# WiFi
270PRODUCT_PACKAGES += \
271 android.hardware.wifi@1.0-service
272
Vivekbalachandar Marisamy659e6a62019-10-08 08:44:33 +0000273PRODUCT_PACKAGES += \
Vivekbalachandar M7af3d832020-02-12 15:56:09 +0530274 android.hardware.graphics.allocator@2.0-impl \
275 android.hardware.graphics.allocator@2.0-service \
276 android.hardware.graphics.composer@2.1-impl \
277 android.hardware.graphics.mapper@2.0-impl \
278 android.hardware.memtrack@1.0-impl \
279 android.hardware.memtrack@1.0-service
Vivekbalachandar Marisamy659e6a62019-10-08 08:44:33 +0000280
281PRODUCT_PACKAGES += \
Vivekbalachandar M7af3d832020-02-12 15:56:09 +0530282 android.hardware.audio@2.0-impl \
283 android.hardware.audio@2.0-service \
284 android.hardware.audio.effect@2.0-impl
Vivekbalachandar Marisamy659e6a62019-10-08 08:44:33 +0000285
Vivekbalachandar Marisamy659e6a62019-10-08 08:44:33 +0000286PRODUCT_PACKAGES += \
Vivekbalachandar M7af3d832020-02-12 15:56:09 +0530287 android.hardware.drm@1.0-impl \
288 android.hardware.drm@1.0-service
Vivekbalachandar Marisamy659e6a62019-10-08 08:44:33 +0000289
Vivekbalachandar Marisamy659e6a62019-10-08 08:44:33 +0000290PRODUCT_PACKAGES += \
Vivekbalachandar M7af3d832020-02-12 15:56:09 +0530291 android.hardware.graphics.allocator@2.1-impl \
292 android.hardware.graphics.allocator@2.1-service \
293 android.hardware.graphics.composer@2.0-impl \
294 android.hardware.graphics.mapper@2.0-impl \
295 android.hardware.memtrack@1.0-impl \
296 android.hardware.memtrack@1.0-service \
297 android.hardware.graphics.allocator@2.0-service \
298 android.hardware.graphics.composer@2.1-service
Vivekbalachandar Marisamy659e6a62019-10-08 08:44:33 +0000299
300# Keystore
301PRODUCT_PACKAGES += \
Vivekbalachandar M7af3d832020-02-12 15:56:09 +0530302 android.hardware.keymaster@3.0-impl \
303 android.hardware.keymaster@3.0-service \
304 keystore.msm8974
Vivekbalachandar Marisamy659e6a62019-10-08 08:44:33 +0000305
Vivekbalachandar M7af3d832020-02-12 15:56:09 +0530306# Lights
307PRODUCT_PACKAGES += \
308 android.hardware.light@2.0-service.FP2
Vivekbalachandar Marisamy659e6a62019-10-08 08:44:33 +0000309
Vivekbalachandar M7af3d832020-02-12 15:56:09 +0530310# Power
311PRODUCT_PACKAGES += \
312 android.hardware.power@1.1-service-qti
Vivekbalachandar Marisamy659e6a62019-10-08 08:44:33 +0000313
Vivekbalachandar M7af3d832020-02-12 15:56:09 +0530314# USB
315PRODUCT_PACKAGES += \
316 android.hardware.usb@1.0-service.basic
317
318# Vibrator
319PRODUCT_PACKAGES += \
320 android.hardware.vibrator@1.0-impl \
321 android.hardware.vibrator@1.0-service
322
323PRODUCT_PACKAGES += libwvdrmengine
324
325PRODUCT_PACKAGES += \
326 libhealthd.FP2
327
328PRODUCT_PACKAGES += xdivert
329
330# Ship the ModuleDetect app to inform users of a successful camera swap
331PRODUCT_PACKAGES += \
332 ModuleDetect \
333 CameraSwapInfo
334
335# Ship the sound recorder app for backward compatibility with previous releases
336PRODUCT_PACKAGES += SoundRecorder
337
338# Ramdisk
339PRODUCT_PACKAGES += \
340 init.qcom.power.rc \
341 init.qcom.rc \
342 init.qcom.usb.rc \
343 ueventd.qcom.rc
344
345# GPS
346PRODUCT_PACKAGES += \
347 android.hardware.gnss@1.0-impl \
348 android.hardware.gnss@1.0-service \
349 gps.msm8974
350
351PRODUCT_PACKAGES += senread