-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevice.mk
348 lines (284 loc) · 12.1 KB
/
device.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
# Copyright (C) 2021 Paranoid Android
#
# 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.
# A/B
ifneq ($(filter pa_oneplus8 pa_oneplus8pro,$(TARGET_PRODUCT)),)
$(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota_retrofit.mk)
endif
AB_OTA_POSTINSTALL_CONFIG += \
RUN_POSTINSTALL_system=true \
POSTINSTALL_PATH_system=system/bin/otapreopt_script \
FILESYSTEM_TYPE_system=erofs \
POSTINSTALL_OPTIONAL_system=true
AB_OTA_POSTINSTALL_CONFIG += \
RUN_POSTINSTALL_vendor=true \
POSTINSTALL_PATH_vendor=bin/checkpoint_gc \
FILESYSTEM_TYPE_vendor=erofs \
POSTINSTALL_OPTIONAL_vendor=true
PRODUCT_PACKAGES += \
checkpoint_gc \
otapreopt_script
# APEX
$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
# Alert Slider
PRODUCT_PACKAGES += \
OnePlusFrameworksOverlay \
TriStateHandler \
tri-state-key_daemon.vendor
# 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
# Audio
PRODUCT_PACKAGES += \
audio_amplifier.kona
PRODUCT_PROPERTY_OVERRIDES += \
ro.config.vc_call_vol_steps=7
# Biometrics
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml
PRODUCT_PACKAGES += \
PRODUCT_PROPERTY_OVERRIDES += \
vendor.boot.fingerprintbstate=orange
PRODUCT_SYSTEM_EXT_PROPERTIES += \
persist.sys.fod.pos.x=453 \
persist.sys.fod.pos.y=1823 \
persist.sys.fod.size=174
# Bluetooth
PRODUCT_PACKAGES += \
audio.bluetooth.default \
bt-mac-generator \
libbluetooth_audio_session \
PRODUCT_PROPERTY_OVERRIDES += \
persist.sys.fflag.override.settings_bluetooth_hearing_aid=true \
persist.vendor.qcom.bluetooth.a2dp_mcast_test.enabled=false \
persist.vendor.qcom.bluetooth.a2dp_offload_cap=sbc-aptx-aptxtws-aptxhd-aac-ldac-aptxadaptiver2 \
persist.vendor.qcom.bluetooth.aac_frm_ctl.enabled=true \
persist.vendor.qcom.bluetooth.aac_vbr_ctl.enabled=true \
persist.vendor.qcom.bluetooth.enable.splita2dp=true \
persist.vendor.qcom.bluetooth.scram.enabled=false \
persist.vendor.qcom.bluetooth.soc=hastings \
persist.vendor.qcom.bluetooth.twsp_state.enabled=false \
ro.vendor.bluetooth.wipower=false \
ro.vendor.bt.bdaddr_path=/data/vendor/bluetooth/bdaddr \
vendor.qcom.bluetooth.soc=hastings
# Boot
PRODUCT_PACKAGES += \
# 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
PRODUCT_PACKAGES += \
[email protected]_64 \
libcamera2ndk_vendor \
# Charging
PRODUCT_SYSTEM_EXT_PROPERTIES += \
ro.charger.enable_suspend=1
# Config Store
PRODUCT_PACKAGES += \
disable_configstore
# DPM
PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.dpmhalservice.enable=1
# DRM
PRODUCT_PACKAGES += \
# Dalvik
$(call inherit-product, frameworks/native/build/phone-xhdpi-6144-dalvik-heap.mk)
# Display
PRODUCT_PACKAGES += \
PRODUCT_PROPERTY_OVERRIDES += \
persist.sys.sf.native_mode=2 \
ro.vendor.display.sensortype=2 \
vendor.display.disable_mask_layer_hint=1 \
vendor.display.enable_async_powermode=0 \
vendor.display.use_layer_ext=1 \
ro.surface_flinger.refresh_rate_switching=true \
ro.surface_flinger.use_content_detection_for_refresh_rate=true
# Factory Reset Protection
PRODUCT_PROPERTY_OVERRIDES += \
ro.frp.pst=/dev/block/bootdevice/by-name/config
# Fastboot
PRODUCT_PACKAGES += \
fastbootd
# GPS
LOC_HIDL_VERSION = 4.0
# GSI
$(call inherit-product, $(SRC_TARGET_DIR)/product/developer_gsi_keys.mk)
# Gatekeeper
PRODUCT_PROPERTY_OVERRIDES += \
vendor.gatekeeper.disable_spu=true
# Health
PRODUCT_PACKAGES += \
# HIDL
PRODUCT_PACKAGES += \
# Incremental FS
PRODUCT_PROPERTY_OVERRIDES += \
ro.incremental.enable=1
# Init
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/init/fstab.qcom:$(TARGET_COPY_OUT_RAMDISK)/fstab.qcom
PRODUCT_PACKAGES += \
fstab.qcom \
init.oneplus.rc \
init.oneplus.display.rc \
init.oneplus.fingerprint.rc \
init.oneplus.haptics.rc \
init.oneplus.power.rc \
init.oneplus.telephony.rc \
init.oneplus.usb.rc \
init.qti.chg_policy.sh \
init.qti.dcvs.sh \
init.qti.ufs.rc \
init.target.rc \
ueventd.oneplus.rc
# Keymaster
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.strongbox_keystore.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.strongbox_keystore.xml
PRODUCT_PROPERTY_OVERRIDES += \
ro.crypto.volume.filenames_mode="aes-256-cts" \
ro.crypto.allow_encrypt_override=true
PRODUCT_PROPERTY_OVERRIDES += \
ro.crypto.dm_default_key.options_format.version=2 \
ro.crypto.volume.metadata.method=dm-default-key
PRODUCT_PROPERTY_OVERRIDES += \
ro.hardware.keystore_desede=true
PRODUCT_PACKAGES += \
# Namespaces
PRODUCT_SOONG_NAMESPACES += \
device/oneplus/common \
device/oneplus/oneplus8
# Netflix
PRODUCT_PROPERTY_OVERRIDES += \
ro.netflix.bsp_rev=Q8250-19134-1
# Neural Networks
PRODUCT_PACKAGES += \
# Overlays
PRODUCT_PACKAGES += \
AOSPAOnePlus8SeriesFrameworks \
AOSPAOnePlus8SeriesSettings \
AOSPAOnePlus8SeriesSystemUI \
AOSPAOnePlus8SystemUI \
FrameworksResTarget \
OnePlus8Frameworks \
OnePlus8SeriesFrameworks \
OnePlus8SeriesSettings \
OnePlus8SeriesSystemUI \
OnePlus8SystemUI \
WifiResTarget
# Partitions
PRODUCT_USE_DYNAMIC_PARTITIONS := true
# Platform
TARGET_BOARD_PLATFORM := kona
# Project ID Quota
$(call inherit-product, $(SRC_TARGET_DIR)/product/emulated_storage.mk)
# QSPM
PRODUCT_PROPERTY_OVERRIDES += \
ro.vendor.qspm.enable=true
# QTI
TARGET_COMMON_QTI_COMPONENTS := all
# RIL
PRODUCT_PACKAGES += \
# Sensors
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/sensors/row/kona_bmi26x_0.json:$(TARGET_COPY_OUT_VENDOR)/etc/sensors/config/kona_bmi26x_row.json \
$(LOCAL_PATH)/configs/sensors/row/kona_mmc5603x_0.json:$(TARGET_COPY_OUT_VENDOR)/etc/sensors/config/kona_mmc5603x_0_row.json \
$(LOCAL_PATH)/configs/sensors/vzw/kona_T0_bmi26x_0.json:$(TARGET_COPY_OUT_VENDOR)/etc/sensors/config/kona_T0_bmi26x_0_vzw.json \
$(LOCAL_PATH)/configs/sensors/vzw/kona_bmi26x_0.json:$(TARGET_COPY_OUT_VENDOR)/etc/sensors/config/kona_bmi26x_0_vzw.json \
$(LOCAL_PATH)/configs/sensors/vzw/kona_mmc5603x_0.json:$(TARGET_COPY_OUT_VENDOR)/etc/sensors/config/kona_mmc5603x_0_vzw.json \
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.barometer.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_9/android.hardware.sensor.barometer.xml \
frameworks/native/data/etc/android.hardware.sensor.barometer.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_11/android.hardware.sensor.barometer.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 \
frameworks/native/data/etc/android.hardware.sensor.ambient_temperature.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.ambient_temperature.xml \
frameworks/native/data/etc/android.hardware.sensor.relative_humidity.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.relative_humidity.xml \
frameworks/native/data/etc/android.hardware.sensor.hifi_sensors.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.hifi_sensors.xml
PRODUCT_PACKAGES += \
libsensorndkbridge
PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.sensors.sync_request=true \
persist.vendor.sensors.allow_non_default_discovery=true
PRODUCT_SYSTEM_EXT_PROPERTIES += \
persist.vendor.sensors.enable.mag_filter=true
# Shipping API
PRODUCT_SHIPPING_API_LEVEL := 29
# SOC Properties
PRODUCT_PROPERTY_OVERRIDES += \
ro.soc.manufacturer=QTI \
ro.soc.model=SM8250
# System Helper
PRODUCT_PACKAGES += \
# Thermal
PRODUCT_PACKAGES += \
# Update Engine
PRODUCT_PACKAGES += \
update_engine \
update_engine_sideload \
update_verifier
# Vendor
$(call inherit-product, vendor/oneplus/oneplus8/oneplus8-vendor.mk)
# 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
# VNDK
PRODUCT_EXTRA_VNDK_VERSIONS := 30
# WLAN
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/wlan/WCNSS_qcom_cfg.ini:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/WCNSS_qcom_cfg.ini \
$(LOCAL_PATH)/configs/wlan/p2p_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/p2p_supplicant_overlay.conf