/
common.mk
executable file
·241 lines (198 loc) · 8.41 KB
/
common.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
# This file includes all definitions that apply to ALL oppo msm8974 devices,
#
# Everything in this directory will become public
DEVICE_PACKAGE_OVERLAYS := device/oppo/msm8974-common/overlay
COMMON_PATH := device/oppo/msm8974-common
# This device is xhdpi. However the platform doesn't
# currently contain all of the bitmaps at xhdpi density so
# we do this little trick to fall back to the hdpi version
# if the xhdpi doesn't exist.
PRODUCT_AAPT_CONFIG := normal hdpi xhdpi xxhdpi
PRODUCT_AAPT_PREF_CONFIG := xxhdpi
PRODUCT_PACKAGES += \
charger_res_images \
charger
PRODUCT_PACKAGES += \
com.android.future.usb.accessory
#Default USB mount
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
persist.sys.usb.config=mtp
# Live Wallpapers
PRODUCT_PACKAGES += \
LiveWallpapersPicker \
librs_jni
# Omni Packages
PRODUCT_PACKAGES += \
OmniTorch
# Ramdisk
PRODUCT_COPY_FILES += \
$(COMMON_PATH)/configs/init.oppo.usb.rc:root/init.oppo.usb.rc \
$(COMMON_PATH)/configs/ueventd.qcom.rc:root/ueventd.qcom.rc \
$(COMMON_PATH)/configs/qhdcp.sh:recovery/root/sbin/qhdcp.sh
# Config files for touch and input
PRODUCT_COPY_FILES += \
$(COMMON_PATH)/configs/keylayout/gpio-keys.kl:system/usr/keylayout/gpio-keys.kl \
$(COMMON_PATH)/configs/keylayout/atmel_mxt_ts.kl:system/usr/keylayout/atmel_mxt_ts.kl \
$(COMMON_PATH)/configs/keylayout/Vendor_046d_Product_c216.kl:system/usr/keylayout/Vendor_046d_Product_c216.kl \
$(COMMON_PATH)/configs/keylayout/Vendor_05ac_Product_0239.kl:system/usr/keylayout/Vendor_05ac_Product_0239.kl
# Media config files
PRODUCT_COPY_FILES += \
$(COMMON_PATH)/media_codecs.xml:system/etc/media_codecs.xml \
$(COMMON_PATH)/media_profiles.xml:system/etc/media_profiles.xml
# Audio config files
PRODUCT_COPY_FILES += \
$(COMMON_PATH)/configs/audio_policy.conf:system/etc/audio_policy.conf \
$(COMMON_PATH)/configs/audio_effects.conf:system/vendor/etc/audio_effects.conf \
$(COMMON_PATH)/mixer_paths.xml:/system/etc/mixer_paths.xml \
$(COMMON_PATH)/configs/audio_platform_info.xml:/system/etc/audio_platform_info.xml
# MSM IPC Router security configuration
PRODUCT_COPY_FILES += \
$(COMMON_PATH)/configs/sec_config:system/etc/sec_config
#thermal-engine
PRODUCT_COPY_FILES += \
$(COMMON_PATH)/configs/thermal-engine-8974.conf:system/etc/thermal-engine-8974.conf
# Wifi config
PRODUCT_COPY_FILES += \
$(COMMON_PATH)/configs/p2p_supplicant_overlay.conf:system/etc/wifi/p2p_supplicant_overlay.conf \
$(COMMON_PATH)/configs/wpa_supplicant_overlay.conf:system/etc/wifi/wpa_supplicant_overlay.conf
# These are the hardware-specific features
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/handheld_core_hardware.xml:system/etc/permissions/handheld_core_hardware.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.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \
frameworks/native/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \
frameworks/native/data/etc/android.hardware.wifi.direct.xml:system/etc/permissions/android.hardware.wifi.direct.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.light.xml:system/etc/permissions/android.hardware.sensor.light.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.barometer.xml:system/etc/permissions/android.hardware.sensor.barometer.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.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml \
frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml \
frameworks/native/data/etc/android.hardware.telephony.gsm.xml:system/etc/permissions/android.hardware.telephony.gsm.xml \
frameworks/native/data/etc/android.hardware.audio.low_latency.xml:system/etc/permissions/android.hardware.audio.low_latency.xml \
frameworks/native/data/etc/android.hardware.bluetooth.xml:system/etc/permissions/android.hardware.bluetooth.xml \
frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml \
frameworks/native/data/etc/android.hardware.usb.host.xml:system/etc/permissions/android.hardware.usb.host.xml
# Hardware modules to build
PRODUCT_PACKAGES += \
hwcomposer.msm8974 \
gralloc.msm8974 \
copybit.msm8974 \
memtrack.msm8974 \
audio.primary.msm8974 \
audio_policy.msm8974 \
lights.qcom \
audio.a2dp.default \
audio.usb.default \
audio.r_submix.default \
camera-wrapper.msm8974 \
libaudio-resampler \
audiod \
libqcompostprocbundle \
libqcomvisualizer \
libqcomvoiceprocessing \
libdashplayer
PRODUCT_PACKAGES += \
libmm-omxcore \
libdivxdrmdecrypt \
libOmxVdec \
libOmxVenc \
libOmxCore \
libOmxAacEnc \
libOmxAmrEnc \
libOmxEvrcEnc \
libOmxQcelp13Enc \
libstagefrighthw \
libc2dcolorconvert
# wifi
PRODUCT_PACKAGES += \
mac-update \
wcnss_service
PRODUCT_COPY_FILES += \
$(COMMON_PATH)/configs/init.qcom.bt.sh:system/etc/init.qcom.bt.sh
# Device settings
PRODUCT_PACKAGES += \
Find7Parts
# NFC feature files
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.nfc.xml:system/etc/permissions/android.hardware.nfc.xml
# GPS configuration
PRODUCT_COPY_FILES += \
$(COMMON_PATH)/gps/gps.conf:system/etc/gps.conf \
$(COMMON_PATH)/gps/izat.conf:system/etc/izat.conf
# Properties
# bluetooth
PRODUCT_PROPERTY_OVERRIDES += \
ro.qualcomm.bt.hci_transport=smd
# Graphics
PRODUCT_PROPERTY_OVERRIDES += \
ro.opengles.version=131072 \
persist.hwc.mdpcomp.enable=true
# Do not power down SIM card when modem is sent to Low Power Mode.
PRODUCT_PROPERTY_OVERRIDES += \
persist.radio.apm_sim_not_pwdn=1 \
persist.radio.eons.enabled=false
# Ril sends only one RIL_UNSOL_CALL_RING, so set call_ring.multiple to false
PRODUCT_PROPERTY_OVERRIDES += \
ro.telephony.call_ring.multiple=0
# Ril
PRODUCT_PROPERTY_OVERRIDES += \
rild.libpath=/system/vendor/lib/libril-qc-qmi-1.so \
ril.subscription.types=NV,RUIM \
ro.telephony.ril_class=OppoRIL
# Cell Broadcasts
PRODUCT_PROPERTY_OVERRIDES += \
ro.cellbroadcast.emergencyids=0-65534
PRODUCT_PROPERTY_OVERRIDES += \
telephony.lteOnGSMDevice=1 \
ro.telephony.default_network=9 \
ro.telephony.call_ring.multiple=0
PRODUCT_PROPERTY_OVERRIDES += \
drm.service.enabled=true
PRODUCT_PROPERTY_OVERRIDES += \
wifi.interface=wlan0 \
wifi.supplicant_scan_interval=15
# Enable AAC 5.1 output
PRODUCT_PROPERTY_OVERRIDES += \
media.aac_51_output_enabled=true
PRODUCT_PROPERTY_OVERRIDES += \
debug.egl.recordable.rgba8888=1
# Oppo-specific
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
ro.oppo.version=US \
ro.xxversion=V1.0 \
ro.bootversion=V1.1
# qcom
PRODUCT_PROPERTY_OVERRIDES += \
ro.qc.sdk.audio.ssr=false \
ro.qc.sdk.sensors.gestures=true \
ro.qc.sdk.camera.facialproc=false \
ro.qc.sdk.gestures.camera=false
# Audio Configuration
PRODUCT_PROPERTY_OVERRIDES += \
ro.qc.sdk.audio.fluencetype=fluence \
persist.audio.fluence.voicecall=true \
af.resampler.quality=4 \
audio.offload.buffer.size.kb=32 \
audio.offload.gapless.enabled=true \
use.voice.path.for.pcm.voip=true \
av.offload.enable=true \
av.streaming.offload.enable=true \
audio.offload.pcm.enable=true
# QCOM
PRODUCT_PROPERTY_OVERRIDES += \
com.qc.hardware=true
# QC Perf
PRODUCT_PROPERTY_OVERRIDES += \
ro.vendor.extension_library=/vendor/lib/libqc-opt.so
# gps
#system prop for switching gps driver to qmi
PRODUCT_PROPERTY_OVERRIDES += \
persist.gps.qmienabled=true
# sensors
# Sensor configuration from Oppo
PRODUCT_COPY_FILES += \
$(COMMON_PATH)/sensor/sap.conf:system/etc/sap.conf
$(call inherit-product, frameworks/native/build/phone-xhdpi-2048-dalvik-heap.mk)