Borjan Tchakaloff | 3f6974a | 2016-12-30 13:23:04 +0100 | [diff] [blame] | 1 | # Inherit from variables defined elsewhere first (they could tune this file) |
| 2 | $(call inherit-product-if-exists, vendor/fairphone-extra/fairphone-extra.mk) |
| 3 | |
wangxl | 2497caf | 2015-02-04 13:48:38 +0800 | [diff] [blame] | 4 | TARGET_USES_QCOM_BSP := true |
| 5 | TARGET_USES_QCA_NFC := other |
| 6 | |
| 7 | ifeq ($(TARGET_USES_QCOM_BSP), true) |
| 8 | # Add QC Video Enhancements flag |
| 9 | TARGET_ENABLE_QC_AV_ENHANCEMENTS := true |
| 10 | endif #TARGET_USES_QCOM_BSP |
| 11 | |
| 12 | #TARGET_DISABLE_DASH := true |
| 13 | #TARGET_DISABLE_OMX_SECURE_TEST_APP := true |
| 14 | |
| 15 | # media_profiles and media_codecs xmls for 8974 |
| 16 | ifeq ($(TARGET_ENABLE_QC_AV_ENHANCEMENTS), true) |
wangxl | 0a11732 | 2015-09-23 16:34:37 +0800 | [diff] [blame] | 17 | PRODUCT_COPY_FILES += device/fairphone_devices/FP2/media/media_profiles_8974.xml:system/etc/media_profiles.xml \ |
Maarten Derks | 54dfa34 | 2017-02-21 12:01:16 +0100 | [diff] [blame] | 18 | device/fairphone_devices/FP2/media/media_codecs_8974.xml:system/etc/media_codecs.xml \ |
Pekka Pesu | 2ae0332 | 2016-11-09 12:57:35 +0200 | [diff] [blame] | 19 | device/fairphone_devices/FP2/media/media_codecs_performance_8974.xml:system/etc/media_codecs_performance.xml |
wangxl | 2497caf | 2015-02-04 13:48:38 +0800 | [diff] [blame] | 20 | endif #TARGET_ENABLE_QC_AV_ENHANCEMENTS |
| 21 | |
Kees Jongenburger | f098865 | 2015-06-23 15:14:14 +0200 | [diff] [blame] | 22 | PRODUCT_COPY_FILES += \ |
Pekka Pesu | 114e546 | 2017-01-31 10:13:49 +0200 | [diff] [blame] | 23 | device/fairphone_devices/FP2/old-apns-conf.xml:system/etc/old-apns-conf.xml |
| 24 | |
| 25 | PRODUCT_COPY_FILES += \ |
Dirk Vogt | 809bc7c | 2015-10-02 12:08:28 +0200 | [diff] [blame] | 26 | device/fairphone_devices/FP2/apns-conf.xml:system/etc/apns-conf.xml |
Kees Jongenburger | f098865 | 2015-06-23 15:14:14 +0200 | [diff] [blame] | 27 | |
Dirk Vogt | ad9bace | 2017-01-06 17:06:09 +0100 | [diff] [blame] | 28 | PRODUCT_PROPERTY_OVERRIDES += ro.frp.pst=/dev/block/bootdevice/by-name/pad |
| 29 | |
Borjan Tchakaloff | 63a4f52 | 2017-02-09 18:41:16 +0100 | [diff] [blame] | 30 | # Do not enable data roaming by default |
| 31 | PRODUCT_PROPERTY_OVERRIDES := $(filter-out ro.com.android.dataroaming=%,\ |
| 32 | $(PRODUCT_PROPERTY_OVERRIDES)) \ |
| 33 | ro.com.android.dataroaming=false |
| 34 | |
Maarten Derks | 20d6680 | 2017-03-03 12:02:08 +0100 | [diff] [blame] | 35 | # Set default ringtone to Fairphone's |
| 36 | PRODUCT_COPY_FILES += device/fairphone_devices/FP2/Sunbeam.mp3:system/media/audio/ringtones/Fairphone.mp3 |
| 37 | PRODUCT_COPY_FILES += device/fairphone_devices/FP2/Fiesta.mp3:system/media/audio/ringtones/Fiesta.mp3 |
| 38 | PRODUCT_PROPERTY_OVERRIDES += \ |
| 39 | ro.config.ringtone=Fairphone.mp3 |
| 40 | |
Maarten Derks | 2e6a6d6 | 2017-04-06 13:35:43 +0200 | [diff] [blame] | 41 | # Set default alarm sound |
| 42 | PRODUCT_PROPERTY_OVERRIDES += \ |
| 43 | ro.config.alarm_alert=Cesium.ogg |
| 44 | |
wangxl | 2497caf | 2015-02-04 13:48:38 +0800 | [diff] [blame] | 45 | $(call inherit-product, device/qcom/common/common.mk) |
| 46 | |
wangxl | 0a11732 | 2015-09-23 16:34:37 +0800 | [diff] [blame] | 47 | PRODUCT_NAME := FP2 |
| 48 | PRODUCT_DEVICE := FP2 |
| 49 | PRODUCT_BRAND := Fairphone |
worker | f7610a3 | 2015-10-19 15:27:37 +0200 | [diff] [blame] | 50 | PRODUCT_MANUFACTURER := Fairphone |
xusai | d08e034 | 2015-08-04 10:06:01 +0800 | [diff] [blame] | 51 | PRODUCT_PROPERTY_OVERRIDES += \ |
| 52 | ro.com.google.clientidbase=android-fairphone |
wangxl | 2497caf | 2015-02-04 13:48:38 +0800 | [diff] [blame] | 53 | |
| 54 | # Audio configuration file |
| 55 | PRODUCT_COPY_FILES += \ |
wangxl | 0a11732 | 2015-09-23 16:34:37 +0800 | [diff] [blame] | 56 | device/fairphone_devices/FP2/audio_policy.conf:system/etc/audio_policy.conf \ |
| 57 | device/fairphone_devices/FP2/audio_effects.conf:system/vendor/etc/audio_effects.conf \ |
| 58 | device/fairphone_devices/FP2/mixer_paths.xml:system/etc/mixer_paths.xml \ |
| 59 | device/fairphone_devices/FP2/mixer_paths_auxpcm.xml:system/etc/mixer_paths_auxpcm.xml |
wangxl | 2497caf | 2015-02-04 13:48:38 +0800 | [diff] [blame] | 60 | |
wangxl | 1cc0c43 | 2015-10-10 19:42:05 +0800 | [diff] [blame] | 61 | # Display logo image file |
wangxl | 1cc0c43 | 2015-10-10 19:42:05 +0800 | [diff] [blame] | 62 | |
wangxl | 2497caf | 2015-02-04 13:48:38 +0800 | [diff] [blame] | 63 | PRODUCT_PACKAGES += \ |
| 64 | libqcomvisualizer \ |
| 65 | libqcomvoiceprocessing \ |
| 66 | libqcompostprocbundle |
| 67 | |
| 68 | # Feature definition files for 8974 |
| 69 | PRODUCT_COPY_FILES += \ |
| 70 | frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:system/etc/permissions/android.hardware.sensor.accelerometer.xml \ |
| 71 | frameworks/native/data/etc/android.hardware.sensor.compass.xml:system/etc/permissions/android.hardware.sensor.compass.xml \ |
| 72 | frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:system/etc/permissions/android.hardware.sensor.gyroscope.xml \ |
| 73 | frameworks/native/data/etc/android.hardware.sensor.light.xml:system/etc/permissions/android.hardware.sensor.light.xml \ |
| 74 | frameworks/native/data/etc/android.hardware.sensor.proximity.xml:system/etc/permissions/android.hardware.sensor.proximity.xml \ |
wangxl | 2497caf | 2015-02-04 13:48:38 +0800 | [diff] [blame] | 75 | frameworks/native/data/etc/android.hardware.sensor.stepcounter.xml:system/etc/permissions/android.hardware.sensor.stepcounter.xml \ |
| 76 | frameworks/native/data/etc/android.hardware.sensor.stepdetector.xml:system/etc/permissions/android.hardware.sensor.stepdetector.xml |
| 77 | |
| 78 | #battery_monitor |
| 79 | PRODUCT_PACKAGES += \ |
| 80 | battery_monitor \ |
| 81 | battery_shutdown |
| 82 | |
| 83 | #fstab.qcom |
| 84 | PRODUCT_PACKAGES += fstab.qcom |
| 85 | |
| 86 | #wlan driver |
| 87 | PRODUCT_COPY_FILES += \ |
wangxl | 0a11732 | 2015-09-23 16:34:37 +0800 | [diff] [blame] | 88 | device/fairphone_devices/FP2/WCNSS_qcom_cfg.ini:system/etc/wifi/WCNSS_qcom_cfg.ini \ |
| 89 | device/fairphone_devices/FP2/WCNSS_qcom_wlan_nv.bin:persist/WCNSS_qcom_wlan_nv.bin |
wangxl | 2497caf | 2015-02-04 13:48:38 +0800 | [diff] [blame] | 90 | |
| 91 | PRODUCT_PACKAGES += \ |
| 92 | wpa_supplicant_overlay.conf \ |
| 93 | p2p_supplicant_overlay.conf |
| 94 | |
| 95 | PRODUCT_PACKAGES += wcnss_service |
| 96 | |
Pekka Pesu | 2ae0332 | 2016-11-09 12:57:35 +0200 | [diff] [blame] | 97 | # MIDI feature |
| 98 | PRODUCT_COPY_FILES += \ |
| 99 | frameworks/native/data/etc/android.software.midi.xml:system/etc/permissions/android.software.midi.xml |
wangxl | 2497caf | 2015-02-04 13:48:38 +0800 | [diff] [blame] | 100 | #ANT stack |
| 101 | PRODUCT_PACKAGES += \ |
| 102 | AntHalService \ |
| 103 | libantradio \ |
| 104 | ANTRadioService \ |
| 105 | antradio_app |
jjwong | 15b3f45 | 2016-05-16 15:09:24 +0800 | [diff] [blame] | 106 | TARGET_RELEASETOOLS_EXTENSIONS := device/fairphone_devices/FP2 |
| 107 | ADD_RADIO_FILES := true |
wangxl | 2497caf | 2015-02-04 13:48:38 +0800 | [diff] [blame] | 108 | |
| 109 | # Enable strict operation |
| 110 | PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ |
Borjan Tchakaloff | fb0e302 | 2017-05-15 17:39:32 +0200 | [diff] [blame] | 111 | persist.sys.strict_op_enable=false |
wangxl | 2497caf | 2015-02-04 13:48:38 +0800 | [diff] [blame] | 112 | |
| 113 | PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ |
| 114 | persist.sys.whitelist=/system/etc/whitelist_appops.xml |
| 115 | |
| 116 | PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ |
| 117 | camera2.portability.force_api=1 |
| 118 | |
| 119 | PRODUCT_COPY_FILES += \ |
wangxl | 0a11732 | 2015-09-23 16:34:37 +0800 | [diff] [blame] | 120 | device/fairphone_devices/FP2/whitelist_appops.xml:system/etc/whitelist_appops.xml |
wangxl | 2497caf | 2015-02-04 13:48:38 +0800 | [diff] [blame] | 121 | |
| 122 | |
| 123 | # NFC packages |
| 124 | ifeq ($(TARGET_USES_QCA_NFC),true) |
| 125 | NFC_D := true |
| 126 | |
| 127 | ifeq ($(NFC_D), true) |
| 128 | PRODUCT_PACKAGES += \ |
| 129 | libnfcD-nci \ |
| 130 | libnfcD_nci_jni \ |
| 131 | nfc_nci.msm8974 \ |
| 132 | NfcDNci \ |
| 133 | Tag \ |
| 134 | com.android.nfc_extras \ |
| 135 | com.android.nfc.helper |
| 136 | else |
| 137 | PRODUCT_PACKAGES += \ |
| 138 | libnfc-nci \ |
| 139 | libnfc_nci_jni \ |
| 140 | nfc_nci.msm8974 \ |
| 141 | NfcNci \ |
| 142 | Tag \ |
| 143 | com.android.nfc_extras |
| 144 | endif |
| 145 | |
| 146 | # file that declares the MIFARE NFC constant |
| 147 | # Commands to migrate prefs from com.android.nfc3 to com.android.nfc |
| 148 | # NFC access control + feature files + configuration |
| 149 | PRODUCT_COPY_FILES += \ |
| 150 | frameworks/native/data/etc/com.nxp.mifare.xml:system/etc/permissions/com.nxp.mifare.xml \ |
| 151 | frameworks/native/data/etc/com.android.nfc_extras.xml:system/etc/permissions/com.android.nfc_extras.xml \ |
| 152 | frameworks/native/data/etc/android.hardware.nfc.xml:system/etc/permissions/android.hardware.nfc.xml |
| 153 | # Enable NFC Forum testing by temporarily changing the PRODUCT_BOOT_JARS |
| 154 | # line has to be in sync with build/target/product/core_base.mk |
| 155 | endif |
| 156 | |
| 157 | PRODUCT_BOOT_JARS += qcmediaplayer \ |
wangxl | 2497caf | 2015-02-04 13:48:38 +0800 | [diff] [blame] | 158 | org.codeaurora.Performance \ |
wangxl | 2497caf | 2015-02-04 13:48:38 +0800 | [diff] [blame] | 159 | vcard \ |
| 160 | tcmiface |
wangxl | d80cd6f | 2015-05-05 10:46:15 +0800 | [diff] [blame] | 161 | ifneq ($(strip $(QCPATH)),) |
| 162 | PRODUCT_BOOT_JARS += WfdCommon |
| 163 | PRODUCT_BOOT_JARS += qcom.fmradio |
| 164 | PRODUCT_BOOT_JARS += security-bridge |
| 165 | PRODUCT_BOOT_JARS += qsb-port |
| 166 | PRODUCT_BOOT_JARS += oem-services |
Pekka Pesu | 2ae0332 | 2016-11-09 12:57:35 +0200 | [diff] [blame] | 167 | PRODUCT_BOOT_JARS += com.qti.dpmframework |
| 168 | PRODUCT_BOOT_JARS += dpmapi |
| 169 | PRODUCT_BOOT_JARS += com.qti.location.sdk |
wangxl | d80cd6f | 2015-05-05 10:46:15 +0800 | [diff] [blame] | 170 | endif |
| 171 | |
wangxl | 89f473f | 2015-02-12 09:40:08 +0800 | [diff] [blame] | 172 | PRODUCT_PACKAGES += \ |
Filipe | d3724f7 | 2015-02-13 12:40:35 +0000 | [diff] [blame] | 173 | FairphoneUpdater \ |
kees@fairphone.com | 824eafe | 2015-07-07 16:25:32 +0200 | [diff] [blame] | 174 | AppOps \ |
Filipe | 8281565 | 2015-08-25 19:41:16 +0000 | [diff] [blame] | 175 | ClockWidget \ |
Dirk Vogt | 19883a4 | 2016-05-27 20:21:36 +0200 | [diff] [blame] | 176 | FairphoneSetupWizard \ |
Maarten Derks | 63a4e7b | 2016-08-03 16:18:03 +0200 | [diff] [blame] | 177 | ProgrammableButton \ |
Borjan Tchakaloff | 08f1ea7 | 2017-03-29 17:33:08 +0200 | [diff] [blame] | 178 | FairphoneCheckup \ |
Maarten Derks | 54f78e6 | 2017-02-14 15:25:00 +0100 | [diff] [blame] | 179 | FairphoneLauncher3 |
Filipe | ba75f85 | 2015-02-13 12:44:36 +0000 | [diff] [blame] | 180 | |
Dirk Vogt | 7849482 | 2015-10-11 19:27:59 +0200 | [diff] [blame] | 181 | PRODUCT_PACKAGES += iFixit |
| 182 | |
Filipe | d5a7a66 | 2015-04-07 16:46:27 +0100 | [diff] [blame] | 183 | # Add boot animation |
wangxl | 0a11732 | 2015-09-23 16:34:37 +0800 | [diff] [blame] | 184 | PRODUCT_COPY_FILES += device/fairphone_devices/FP2/bootanimation.zip:system/media/bootanimation.zip |
Filipe | 80bf185 | 2015-03-26 17:18:14 +0000 | [diff] [blame] | 185 | |
Dirk Vogt | 532bb4b | 2016-03-04 16:13:07 +0100 | [diff] [blame] | 186 | PRODUCT_COPY_FILES += device/fairphone_devices/FP2/twrp.fstab:recovery/root/etc/twrp.fstab |
| 187 | |
Filipe | ba75f85 | 2015-02-13 12:44:36 +0000 | [diff] [blame] | 188 | PRODUCT_MODEL := FP2 |
Zhuqiankun | 01393b4 | 2015-03-13 16:25:04 +0800 | [diff] [blame] | 189 | |
| 190 | # include an expanded selection of fonts for the SDK. |
| 191 | EXTENDED_FONT_FOOTPRINT := true |
Filipe Gonçalves | 6045d2f | 2015-04-14 14:22:49 +0100 | [diff] [blame] | 192 | |
| 193 | # Preferred Applications for Fairphone |
| 194 | PRODUCT_COPY_FILES += \ |
wangxl | 0a11732 | 2015-09-23 16:34:37 +0800 | [diff] [blame] | 195 | device/fairphone_devices/FP2/preferred.xml:system/etc/preferred-apps/fp.xml |
gaoyl1997 | 35a2240 | 2015-04-23 14:22:01 +0800 | [diff] [blame] | 196 | |
| 197 | # remove /dev/diag in user version for CTS |
| 198 | ifeq ($(TARGET_BUILD_VARIANT),user) |
| 199 | PRODUCT_COPY_FILES += device/qcom/common/rootdir/etc/init.qcom.diag.rc.user:root/init.qcom.diag.rc |
| 200 | endif |
kees@fairphone.com | 722017b | 2015-07-07 15:33:12 +0200 | [diff] [blame] | 201 | |
Borjan Tchakaloff | fb0e302 | 2017-05-15 17:39:32 +0200 | [diff] [blame] | 202 | # Enable the diagnostics interface by default in userdebug and eng builds |
| 203 | ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) |
| 204 | PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ |
| 205 | persist.sys.usb.config=diag |
| 206 | endif |
| 207 | |
Dirk Vogt | 14c873d | 2015-10-27 14:05:26 +0100 | [diff] [blame] | 208 | ifeq ($(strip $(FP2_SKIP_BOOT_JARS_CHECK)),) |
| 209 | SKIP_BOOT_JARS_CHECK := true |
| 210 | endif |
| 211 | |
Borjan Tchakaloff | 837fbe3 | 2017-06-27 18:44:30 +0200 | [diff] [blame] | 212 | PRODUCT_PACKAGE_OVERLAYS += device/fairphone_devices/FP2/overlay |
Dirk Vogt | 22d656c | 2016-01-21 14:00:44 +0100 | [diff] [blame] | 213 | |
| 214 | # SuperUser |
| 215 | FP2_USE_APPOPS_SU := true |
| 216 | PRODUCT_PROPERTY_OVERRIDES += \ |
| 217 | persist.sys.root_access=0 |
| 218 | |
Dirk Vogt | adf3128 | 2016-04-19 17:11:10 +0200 | [diff] [blame] | 219 | # we don't have the calibration data so don't generate persist.img |
| 220 | FP2_SKIP_PERSIST_IMG := true |
Pekka Pesu | d700b9a | 2016-12-20 10:17:44 +0200 | [diff] [blame] | 221 | |
| 222 | # display density |
| 223 | PRODUCT_PROPERTY_OVERRIDES += \ |
Maarten Derks | 9fbc38c | 2017-01-31 13:56:33 +0100 | [diff] [blame] | 224 | ro.sf.lcd_density=480 |
Dirk Vogt | d6e153e | 2016-12-29 17:50:54 +0100 | [diff] [blame] | 225 | |
| 226 | $(call inherit-product, build/target/product/product_launched_with_l_mr1.mk) |
Dirk Vogt | 1f506a7 | 2017-01-27 17:35:19 +0100 | [diff] [blame] | 227 | |
| 228 | PRODUCT_PACKAGES += \ |
| 229 | libhealthd.FP2 |
Dirk Vogt | bdf9e72 | 2017-02-15 14:59:00 +0100 | [diff] [blame] | 230 | |
| 231 | PRODUCT_PACKAGES += xdivert |
Dirk Vogt | 20a5533 | 2017-02-16 11:37:29 +0100 | [diff] [blame] | 232 | |
| 233 | # We need to ship Mms for backward compatibility |
| 234 | PRODUCT_PACKAGES += Mms |
Borjan Tchakaloff | 63e1538 | 2017-03-20 14:16:27 +0100 | [diff] [blame] | 235 | |
Borjan Tchakaloff | e1cad5e | 2017-04-12 09:43:42 +0200 | [diff] [blame] | 236 | # Ship the sound recorder app for backward compatibility with previous releases |
| 237 | PRODUCT_PACKAGES += SoundRecorder |
| 238 | |
Borjan Tchakaloff | 63e1538 | 2017-03-20 14:16:27 +0100 | [diff] [blame] | 239 | # ProximitySensor app |
| 240 | PRODUCT_PACKAGES += ProximitySensorTools |
| 241 | # Don't forget that prebuilt that we need to make available |
| 242 | PRODUCT_COPY_FILES += vendor/fairphone/packages/apps/ProximitySensor/prebuilts/bin/senread:$(PRODUCT_OUT)/system/bin/senread |
Borjan Tchakaloff | e84992f | 2017-03-24 17:52:37 +0100 | [diff] [blame] | 243 | |
| 244 | # Also include the test shared library required by `senread`, not built in regular builds |
| 245 | ifeq ($(TARGET_BUILD_VARIANT),user) |
| 246 | PRODUCT_COPY_FILES += vendor/fairphone/packages/apps/ProximitySensor/prebuilts/lib/libsensor_test.so:$(PRODUCT_OUT)/system/vendor/lib/libsensor_test.so |
| 247 | endif |