-
Notifications
You must be signed in to change notification settings - Fork 1
/
device.mk
334 lines (271 loc) · 11.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
# 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
$(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota.mk)
AB_OTA_POSTINSTALL_CONFIG += \
RUN_POSTINSTALL_system=true \
POSTINSTALL_PATH_system=system/bin/otapreopt_script \
FILESYSTEM_TYPE_system=ext4 \
POSTINSTALL_OPTIONAL_system=true
AB_OTA_POSTINSTALL_CONFIG += \
RUN_POSTINSTALL_vendor=true \
POSTINSTALL_PATH_vendor=bin/checkpoint_gc \
FILESYSTEM_TYPE_vendor=ext4 \
POSTINSTALL_OPTIONAL_vendor=true
PRODUCT_PACKAGES += \
checkpoint_gc \
otapreopt_script
# Alert Slider
PRODUCT_PACKAGES += \
KeyHandler \
tri-state-key-calibrate
# 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_COPY_FILES += \
$(LOCAL_PATH)/audio/audio_platform_info_intcodec.xml:$(TARGET_COPY_OUT_ODM)/etc/audio_platform_info.xml \
$(LOCAL_PATH)/audio/audio_platform_info_intcodec.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio/sku_lahaina/audio_platform_info_intcodec.xml \
$(LOCAL_PATH)/audio/mixer_paths.xml:$(TARGET_COPY_OUT_ODM)/etc/mixer_paths.xml \
$(LOCAL_PATH)/audio/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio/sku_lahaina/mixer_paths.xml \
$(LOCAL_PATH)/audio/sound_trigger_mixer_paths.xml:$(TARGET_COPY_OUT_ODM)/etc/sound_trigger_mixer_paths.xml \
$(LOCAL_PATH)/audio/sound_trigger_mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio/sku_lahaina/sound_trigger_mixer_paths.xml \
$(LOCAL_PATH)/audio/sound_trigger_platform_info.xml:$(TARGET_COPY_OUT_ODM)/etc/sound_trigger_platform_info.xml \
$(LOCAL_PATH)/audio/sound_trigger_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio/sku_lahaina/sound_trigger_platform_info.xml
PRODUCT_VENDOR_PROPERTIES += \
ro.config.vc_call_vol_steps=9 \
ro.vendor.audio.sdk.fluencetype=fluence \
persist.vendor.audio_hal.dsp_bit_width_enforce_mode=24 \
persist.vendor.audio.bcl.enabled=false \
persist.vendor.audio.fluence.voicerec=true
# Authsecret
PRODUCT_PACKAGES += \
# Biometrics
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml
PRODUCT_PACKAGES += \
# Bluetooth
PRODUCT_PACKAGES += \
audio.bluetooth.default \
libbluetooth_audio_session \
PRODUCT_VENDOR_PROPERTIES += \
persist.sys.fflag.override.settings_bluetooth_hearing_aid=true \
persist.vendor.bluetooth.modem_nv_support=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.aptxadaptiver2_1_support=true \
persist.vendor.qcom.bluetooth.scram.enabled=false \
persist.vendor.qcom.bluetooth.twsp_state.enabled=false \
vendor.hw.fm.init=0
# 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 \
# Charging
PRODUCT_SYSTEM_EXT_PROPERTIES += \
ro.charger.enable_suspend=1
# DPM
PRODUCT_VENDOR_PROPERTIES += \
persist.vendor.dpm.idletimer.mode=default \
persist.vendor.dpmhalservice.enable=1
# DRM
PRODUCT_PACKAGES += \
# Dalvik
$(call inherit-product, frameworks/native/build/phone-xhdpi-6144-dalvik-heap.mk)
# Display
PRODUCT_VENDOR_PROPERTIES += \
ro.surface_flinger.refresh_rate_switching=true \
ro.surface_flinger.set_idle_timer_ms=4000 \
ro.surface_flinger.set_touch_timer_ms=4000 \
ro.surface_flinger.set_display_power_timer_ms=1000 \
ro.surface_flinger.use_content_detection_for_refresh_rate=true \
vendor.display.primary_mixer_stages=9
# FRP
PRODUCT_VENDOR_PROPERTIES += \
ro.frp.pst=/dev/block/bootdevice/by-name/frp
# Fastboot
PRODUCT_PACKAGES += \
fastbootd
# GPS
LOC_HIDL_VERSION = 4.0
# GSI
$(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_keys.mk)
# Gatekeeper
PRODUCT_PACKAGES += \
PRODUCT_VENDOR_PROPERTIES += \
vendor.gatekeeper.disable_spu=true
# Health
PRODUCT_PACKAGES += \
# HIDL
PRODUCT_PACKAGES += \
# Init
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/init/fstab.default:$(TARGET_COPY_OUT_VENDOR_RAMDISK)/first_stage_ramdisk/fstab.default
PRODUCT_PACKAGES += \
fstab.default \
init.oplus.camera.rc \
init.oplus.display.rc \
init.oplus.perf.rc \
init.oplus.sensors.rc \
init.oplus.telephony.rc \
init.oplus.wlan.rc \
init.qti.ufs.rc \
init.target.rc \
ueventd.oplus.rc \
init.oplus.post_boot.sh
PRODUCT_VENDOR_PROPERTIES += \
vendor.post_boot.custom=true
# Kernel
KERNEL_MODULES_INSTALL := dlkm
KERNEL_MODULES_OUT := $(OUT_DIR)/target/product/oneplus9/$(KERNEL_MODULES_INSTALL)/lib/modules
# Keymaster
PRODUCT_VENDOR_PROPERTIES += \
ro.crypto.dm_default_key.options_format.version=2 \
ro.crypto.volume.metadata.method=dm-default-key
PRODUCT_PACKAGES += \
# NFC
PRODUCT_PACKAGES += \
# Namespaces
PRODUCT_SOONG_NAMESPACES += \
$(LOCAL_PATH) \
hardware/oplus
# Net
PRODUCT_PACKAGES += \
# Neural Networks
PRODUCT_PACKAGES += \
# Overlays
PRODUCT_PACKAGES += \
AOSPAOnePlus9ProSystemUI \
AOSPAOnePlus9SeriesFrameworks \
AOSPAOnePlus9SeriesSettings \
AOSPAOnePlus9SeriesSystemUI \
AOSPAOnePlus9SystemUI \
FrameworksResTarget \
OnePlus9Frameworks \
OnePlus9ProFrameworks \
OnePlus9ProSystemUI \
OnePlus9SeriesCarrierConfig \
OnePlus9SeriesFrameworks \
OnePlus9SeriesSettings \
OnePlus9SeriesSystemUI \
OnePlus9SystemUI \
WifiResTarget
# Partitions
PRODUCT_USE_DYNAMIC_PARTITIONS := true
# Platform
TARGET_BOARD_PLATFORM := lahaina
# QTEE
PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.qteeconnector.retrying_interval=30
persist.vendor.qteeconnector.retrying_timeout=2000
# QTI
TARGET_COMMON_QTI_COMPONENTS := all
# Radio
PRODUCT_PACKAGES += \
PRODUCT_VENDOR_PROPERTIES += \
persist.vendor.radio.force_on_dc=true \
persist.vendor.radio.poweron_opt=1 \
persist.vendor.radio.stack_id_1=1
# 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.barometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.barometer.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_PACKAGES += \
libsensorndkbridge \
sensors.oplus
PRODUCT_VENDOR_PROPERTIES += \
persist.vendor.sensors.allow_non_default_discovery=true \
persist.vendor.sensors.on_change_sample_period=true \
persist.vendor.sensors.sync_request=true
PRODUCT_SYSTEM_EXT_PROPERTIES += \
persist.vendor.sensors.enable.mag_filter=true
# Shipping API
PRODUCT_SHIPPING_API_LEVEL := 30
# SOC Properties
PRODUCT_VENDOR_PROPERTIES += \
ro.soc.manufacturer=QTI
# Storage
PRODUCT_PROPERTY_OVERRIDES += \
persist.sys.fuse.passthrough.enable=true \
ro.incremental.enable=yes
$(call inherit-product, $(SRC_TARGET_DIR)/product/emulated_storage.mk)
# System Helper
PRODUCT_PACKAGES += \
# Thermal
PRODUCT_PACKAGES += \
# Update Engine
PRODUCT_PACKAGES += \
update_engine \
update_engine_sideload \
update_verifier
# Vendor Service Manager
PRODUCT_PACKAGES += \
vndservicemanager
# Vendor
$(call inherit-product, vendor/oneplus/oneplus9/oneplus9-vendor.mk)
# Vibrator
PRODUCT_PACKAGES += \
vendor.qti.hardware.vibrator.service.oplus
# VNDK
PRODUCT_COPY_FILES += \
prebuilts/vndk/v30/arm/arch-arm-armv7-a-neon/shared/vndk-core/libui.so:$(TARGET_COPY_OUT_VENDOR)/lib/libui-v30.so
# WLAN
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/wlan/WCNSS_qcom_cfg.ini:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/WCNSS_qcom_cfg.ini