-
Notifications
You must be signed in to change notification settings - Fork 8
/
common.mk
376 lines (313 loc) · 14.1 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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
#
# Copyright (C) 2018-2019 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
# Get non-open-source specific aspects
$(call inherit-product, vendor/oneplus/sm8150-common/sm8150-common-vendor.mk)
# A/B
AB_OTA_POSTINSTALL_CONFIG += \
RUN_POSTINSTALL_vendor=true \
POSTINSTALL_PATH_vendor=bin/checkpoint_gc \
FILESYSTEM_TYPE_vendor=erofs \
POSTINSTALL_OPTIONAL_vendor=true
AB_OTA_POSTINSTALL_CONFIG += \
RUN_POSTINSTALL_system=true \
POSTINSTALL_PATH_system=system/bin/otapreopt_script \
FILESYSTEM_TYPE_system=erofs \
POSTINSTALL_OPTIONAL_system=true
PRODUCT_PACKAGES += \
checkpoint_gc \
otapreopt_script
# Audio
PRODUCT_VENDOR_PROPERTIES += \
af.fast_track_multiplier=2 \
audio.deep_buffer.media=true \
persist.vendor.audio_hal.dsp_bit_width_enforce_mode=24 \
ro.audio.monitorRotation=true \
ro.config.vc_call_vol_steps=6 \
vendor.audio.cts.media=false \
vendor.audio.noisy.broadcast.delay=600 \
vendor.audio.offload.pstimeout.secs=3
PRODUCT_ODM_PROPERTIES += \
persist.vendor.audio.fluence.voicerec=true \
persist.vendor.audio.hac.enable=false \
ro.vendor.audio.sdk.fluencetype=fluence \
vendor.audio.hal.output.suspend.supported=false
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/audio/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \
$(LOCAL_PATH)/configs/audio/audio_io_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_io_policy.conf \
$(LOCAL_PATH)/configs/audio/audio_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info.xml \
$(LOCAL_PATH)/configs/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
$(LOCAL_PATH)/configs/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio/audio_policy_configuration.xml \
$(LOCAL_PATH)/configs/audio/bluetooth_hearing_aid_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_hearing_aid_audio_policy_configuration.xml \
$(LOCAL_PATH)/configs/audio/sound_trigger_mixer_paths_wcd9340.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths_wcd9340.xml \
$(LOCAL_PATH)/configs/audio/sound_trigger_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_platform_info.xml \
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/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml
# Bluetooth
PRODUCT_PACKAGES += \
[email protected]:32 \
audio.bluetooth.default:32 \
[email protected]:64 \
[email protected]:32 \
[email protected]:64 \
PRODUCT_VENDOR_PROPERTIES += \
persist.vendor.oneplus.bt.asd.chain=0 \
persist.vendor.oneplus.bt.asd.firmware=false \
persist.vendor.qcom.bluetooth.a2dp_offload_cap=sbc-aptx-aptxtws-aptxhd-aac-ldac-aptxadaptive \
persist.vendor.qcom.bluetooth.aac_frm_ctl.enabled=true \
persist.vendor.qcom.bluetooth.aac_vbr_ctl.enabled=false \
persist.vendor.qcom.bluetooth.enable.splita2dp=true \
persist.vendor.qcom.bluetooth.scram.enabled=true \
persist.vendor.qcom.bluetooth.soc=cherokee \
persist.vendor.qcom.bluetooth.twsp_state.enabled=false \
vendor.bluetooth.soc=cherokee \
vendor.hw.fm.init=0
PRODUCT_SYSTEM_EXT_PROPERTIES += \
persist.vendor.bt.a2dp.hal.implementation=true
# Boot control
PRODUCT_PACKAGES += \
[email protected]:64 \
# Camera
PRODUCT_PACKAGES += \
[email protected]:64 \
[email protected]_64 \
libxml2 \
[email protected]:64 \
PRODUCT_VENDOR_PROPERTIES += \
ro.vendor.camera.res.fmq.size=1048576
PRODUCT_SYSTEM_EXT_PROPERTIES += \
persist.vendor.camera.privapp.list=com.oneplus.camera \
vendor.camera.aux.packagelist=org.codeaurora.snapcam,com.oneplus.camera
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
# Dalvik
$(call inherit-product, frameworks/native/build/phone-xhdpi-6144-dalvik-heap.mk)
# Device ID attestation
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.software.device_id_attestation.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.device_id_attestation.xml
# Display
PRODUCT_PACKAGES += \
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
ro.surface_flinger.set_idle_timer_ms=2500 \
ro.surface_flinger.set_touch_timer_ms=2500 \
ro.surface_flinger.set_display_power_timer_ms=500 \
ro.surface_flinger.use_content_detection_for_refresh_rate=true
PRODUCT_VENDOR_PROPERTIES += \
ro.vendor.display.ad.hdr_calib_data=/vendor/etc/hdr_config.cfg \
ro.vendor.display.ad.sdr_calib_data=/vendor/etc/sdr_config.cfg \
ro.vendor.display.ad=1 \
ro.vendor.display.sensortype=2 \
persist.vendor.color.matrix=2 \
vendor.display.disable_mask_layer_hint=1
# Display Mode
PRODUCT_PACKAGES += \
DisplayMode
# DPM
PRODUCT_VENDOR_PROPERTIES += \
persist.vendor.dpmhalservice.enable=1
# DRM
PRODUCT_PACKAGES += \
PRODUCT_VENDOR_PROPERTIES += \
drm.service.enabled=true
PRODUCT_SYSTEM_EXT_PROPERTIES += \
ro.netflix.bsp_rev=Q855-16947-1
# fastbootd
PRODUCT_PACKAGES += \
fastbootd
# Fingerprint
PRODUCT_PACKAGES += \
PRODUCT_VENDOR_PROPERTIES += \
persist.vendor.qfp=true \
vendor.boot.fingerprintbstate=orange
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml
# FRP
PRODUCT_VENDOR_PROPERTIES += \
ro.frp.pst=/dev/block/bootdevice/by-name/config
# Gatekeeper
PRODUCT_VENDOR_PROPERTIES += \
vendor.gatekeeper.disable_spu=true
# GPS
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/gps/apdr.conf:$(TARGET_COPY_OUT_VENDOR)/etc/apdr.conf \
$(LOCAL_PATH)/configs/gps/flp.conf:$(TARGET_COPY_OUT_VENDOR)/etc/flp.conf \
$(LOCAL_PATH)/configs/gps/gps.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gps.conf \
$(LOCAL_PATH)/configs/gps/izat.conf:$(TARGET_COPY_OUT_VENDOR)/etc/izat.conf \
$(LOCAL_PATH)/configs/gps/lowi.conf:$(TARGET_COPY_OUT_VENDOR)/etc/lowi.conf \
$(LOCAL_PATH)/configs/gps/sap.conf:$(TARGET_COPY_OUT_VENDOR)/etc/sap.conf \
$(LOCAL_PATH)/configs/gps/xtwifi.conf:$(TARGET_COPY_OUT_VENDOR)/etc/xtwifi.conf
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.location.gps.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.location.gps.xml
# Health
PRODUCT_PACKAGES += \
[email protected]:64 \
# Init
PRODUCT_PACKAGES += \
init.class_main.sh \
init.oem.rc \
init.oneplus.usb.rc \
init.qcom.class_core.sh \
init.qcom.early_boot.sh \
init.qcom.post_boot.sh \
init.qcom.rc \
init.qcom.sensors.sh \
init.qcom.sh \
init.qti.chg_policy.sh \
init.qti.dcvs.sh \
init.qti.qcv.sh \
init.recovery.qcom.rc \
init.target.rc \
fstab.qcom \
ueventd.qcom.rc
# Input
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/keylayout/gf_input.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/gf_input.kl \
$(LOCAL_PATH)/configs/keylayout/gpio-keys.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/gpio-keys.kl
# Keymaster
PRODUCT_VENDOR_PROPERTIES += \
ro.crypto.allow_encrypt_override=true \
ro.crypto.volume.filenames_mode="aes-256-cts" \
ro.hardware.keystore_desede=true
# NFC
PRODUCT_PACKAGES += \
[email protected]:64 \
NfcNci \
Tag
PRODUCT_VENDOR_PROPERTIES += \
ro.camera.notify_nfc=1
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.nfc.hce.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hce.xml \
frameworks/native/data/etc/android.hardware.nfc.hcef.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hcef.xml \
frameworks/native/data/etc/android.hardware.nfc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.xml \
frameworks/native/data/etc/com.nxp.mifare.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/com.nxp.mifare.xml
# Overlays
PRODUCT_PACKAGES += \
AOSPAOnePlusSM8150Frameworks \
AOSPAOnePlusSM8150SystemUI \
OnePlusSM8150Frameworks \
OnePlusSM8150Settings \
OnePlusSM8150SystemUI
# Platform
TARGET_BOARD_PLATFORM := msmnile
# QTI Components
TARGET_COMMON_QTI_COMPONENTS := \
adreno \
alarm \
audio \
av \
bt \
display \
media \
overlay \
perf \
telephony \
usb \
wfd
# Sensors
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.accelerometer.xml \
frameworks/native/data/etc/android.hardware.sensor.compass.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.compass.xml \
frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.gyroscope.xml \
frameworks/native/data/etc/android.hardware.sensor.light.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.light.xml \
frameworks/native/data/etc/android.hardware.sensor.proximity.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.proximity.xml \
frameworks/native/data/etc/android.hardware.sensor.stepcounter.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepcounter.xml \
frameworks/native/data/etc/android.hardware.sensor.stepdetector.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepdetector.xml \
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/hals.conf:$(TARGET_COPY_OUT_VENDOR)/etc/sensors/hals.conf
PRODUCT_PACKAGES += \
als_correction_service.oneplus_msmnile \
[email protected]_msmnile \
sensors.oneplus \
libsensorndkbridge
PRODUCT_SYSTEM_EXT_PROPERTIES += \
persist.vendor.naruto.light.support=true \
persist.vendor.sensors.enable.mag_filter=true
# Soong namespaces
PRODUCT_SOONG_NAMESPACES += \
$(LOCAL_PATH) \
device/oneplus/common
# Storage
PRODUCT_VENDOR_PROPERTIES += \
persist.sys.fuse.passthrough.enable=true \
ro.incremental.enable=yes
$(call inherit-product, $(SRC_TARGET_DIR)/product/emulated_storage.mk)
# Subsystem silent restart
PRODUCT_VENDOR_PROPERTIES += \
persist.vendor.ssr.restart_level=ALL_ENABLE
# tri-state key
PRODUCT_PACKAGES += \
tri-state-key_daemon \
TriStateHandler
# Update engine
PRODUCT_PACKAGES += \
update_engine \
update_engine_sideload \
update_verifier
# USB
PRODUCT_PROPERTY_OVERRIDES += \
vendor.usb.diag.func.name=diag \
vendor.usb.use_ffs_mtp=0
# Verified Boot
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.software.verified_boot.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.verified_boot.xml
# Vibrator
PRODUCT_PACKAGES += \
vendor.qti.hardware.vibrator.service.oneplus
PRODUCT_COPY_FILES += \
vendor/qcom/opensource/vibrator/excluded-input-devices.xml:$(TARGET_COPY_OUT_VENDOR)/etc/excluded-input-devices.xml
# VNDK
PRODUCT_PACKAGES += \
[email protected]:64 \
# Wifi
PRODUCT_PACKAGES += \
hostapd \
libwifi-hal-ctrl \
libwifi-hal-qcom \
wifi-mac-generator \
wpa_supplicant \
wpa_supplicant.conf
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/wifi/p2p_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/p2p_supplicant_overlay.conf \
$(LOCAL_PATH)/configs/wifi/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf \
$(LOCAL_PATH)/configs/wifi/WCNSS_qcom_cfg.ini:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/WCNSS_qcom_cfg.ini \
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.wifi.aware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.aware.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.hardware.wifi.passpoint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.passpoint.xml \
frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \
frameworks/native/data/etc/android.software.ipsec_tunnels.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.ipsec_tunnels.xml
PRODUCT_SYSTEM_EXT_PROPERTIES += \
config.disable_rtt=true
# WiFi Display
PRODUCT_PACKAGES += \
libwfdaac_vendor