-
Notifications
You must be signed in to change notification settings - Fork 4
/
device.mk
401 lines (331 loc) · 13.6 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
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
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
# 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/launch_with_vendor_ramdisk.mk)
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
# AAPT
PRODUCT_AAPT_CONFIG := normal
PRODUCT_AAPT_PREF_CONFIG := xxhdpi
# 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_VENDOR_PROPERTIES += \
persist.vendor.audio.delta.refresh=true \
persist.vendor.audio.misound.disable=true \
persist.vendor.audio.ring.filter.mask=0 \
ro.audio.monitorRotation=true \
ro.config.vc_call_vol_steps=11 \
ro.vendor.audio.dolby.dax.support=true \
ro.vendor.audio.dolby.surround.enable=true \
ro.vendor.audio.enhance.support=false \
ro.vendor.audio.gain.support=true \
ro.vendor.audio.karaok.support=true \
ro.vendor.audio.ns.support=false \
ro.vendor.audio.scenario.support=true \
ro.vendor.audio.soundfx.type=mi \
ro.vendor.audio.soundfx.usb=true \
ro.vendor.audio.support.sound.id=true \
ro.vendor.audio.us.proximity=true \
ro.vendor.audio.us.type=mius \
ro.vendor.audio.zoom.support=true \
ro.vendor.audio.zoom.type=1 \
vendor.audio.dolby.ds2.enabled=false \
vendor.audio.dolby.ds2.hardbypass=false \
vendor.audio.spkcal.copy.inhal=true \
vendor.audio.usb.disable.sidetone=true
PRODUCT_ODM_PROPERTIES += \
aaudio.mmap_policy=1 \
ro.vendor.audio.sdk.fluencetype=fluence \
vendor.audio.adm.buffering.ms=6 \
vendor.audio.feature.dynamic_ecns.enable=false \
vendor.audio.feature.spkr_prot.enable=false \
vendor.audio.hal.output.suspend.supported=false \
vendor.audio.offload.multiple.enabled=true \
vendor.audio.offload.track.enable=false
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/audio/mixer_paths_overlay_static.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_overlay_static.xml \
$(LOCAL_PATH)/configs/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio/audio_policy_configuration.xml
PRODUCT_PACKAGES += \
XiaomiDolby
# Bluetooth
PRODUCT_VENDOR_PROPERTIES += \
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.aptxadaptiver2_1_support=false \
persist.vendor.qcom.bluetooth.enable.splita2dp=true \
persist.vendor.qcom.bluetooth.enable.swb=false \
persist.vendor.qcom.bluetooth.enable.swbpm=false \
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 \
vendor.bluetooth.soc=hastings \
vendor.hw.fm.init=0 \
vendor.qcom.bluetooth.soc=hastings
PRODUCT_SYSTEM_EXT_PROPERTIES += \
persist.vendor.btstack.a2dp_offload_cap=sbc-aptx-aptxtws-aptxhd-aptxadaptiver2-aac-ldac \
persist.vendor.btstack.connect.peer_earbud=true \
persist.vendor.btstack.enable.lpa=true \
persist.vendor.btstack.enable.splita2dp=true \
persist.vendor.btstack.enable.swb=false \
persist.vendor.btstack.enable.swbpm=false \
persist.vendor.btstack.enable.twsplus=true \
persist.vendor.btstack.enable.twsplussho=true
# Boot
PRODUCT_PACKAGES += \
# Camera
PRODUCT_VENDOR_PROPERTIES += \
camera.disable_zsl_mode=true
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_COPY_FILES += \
$(LOCAL_PATH)/configs/camera/camxoverridesettings.txt:$(TARGET_COPY_OUT_VENDOR)/etc/camera/camxoverridesettings.txt \
$(LOCAL_PATH)/configs/camera/st_license.lic:$(TARGET_COPY_OUT_VENDOR)/etc/camera/st_license.lic
PRODUCT_PACKAGES += \
[email protected]_64 \
libcamera2ndk_vendor \
libstdc++.vendor \
PRODUCT_PACKAGES += \
libpiex_shim
# Charging
PRODUCT_VENDOR_PROPERTIES += \
persist.vendor.cp.fcc_main_ua=400000 \
persist.vendor.cp.taper_term_mv=7000 \
persist.vendor.cp.qc3p5_vfloat_offset_uv=110000 \
persist.vendor.pps.disallowed=1 \
persist.vendor.hvdcp_opti.disallowed=1
# Consumer IR
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.consumerir.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.consumerir.xml
PRODUCT_PACKAGES += \
# Dalvik
$(call inherit-product, frameworks/native/build/phone-xhdpi-6144-dalvik-heap.mk)
# Display
PRODUCT_VENDOR_PROPERTIES += \
ro.vendor.display.paneltype=2 \
ro.vendor.display.sensortype=2 \
vendor.display.qdcm.mode_combine=1 \
vendor.display.defer_fps_frame_count=2
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
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
PRODUCT_COPY_FILES += \
$(call find-copy-subdir-files,*,$(LOCAL_PATH)/configs/display/,$(TARGET_COPY_OUT_VENDOR)/etc)
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/displayconfig/display_id_4630946736638489729.xml:$(TARGET_COPY_OUT_VENDOR)/etc/displayconfig/display_id_4630946736638489729.xml
# DPM
PRODUCT_VENDOR_PROPERTIES += \
persist.vendor.dpmhalservice.enable=1
# DRM
PRODUCT_VENDOR_PROPERTIES += \
drm.service.enabled=true
PRODUCT_PACKAGES += \
# Fastboot
PRODUCT_PACKAGES += \
fastbootd
# Fingerprint
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/fingerprint/uinput-fpc.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/uinput-fpc.kl \
$(LOCAL_PATH)/configs/fingerprint/uinput-fpc.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/uinput-fpc.idc \
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/frp
# Gatekeeper
PRODUCT_VENDOR_PROPERTIES += \
vendor.gatekeeper.disable_spu=true
# Gboard paddings
# Keyboard height ratio and bottom padding in dp for portrait mode
PRODUCT_PRODUCT_PROPERTIES += \
ro.com.google.ime.height_ratio=1.075 \
ro.com.google.ime.kb_pad_port_b=8
# Init
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/init/fstab.qcom:$(TARGET_COPY_OUT_VENDOR_RAMDISK)/first_stage_ramdisk/fstab.qcom
PRODUCT_PACKAGES += \
fstab.qcom \
init.alioth.rc \
init.mi.btmac.sh \
init.mi.usb.sh \
init.qti.dcvs.sh \
init.target.rc \
ueventd.alioth.rc
# Keymaster
PRODUCT_VENDOR_PROPERTIES += \
ro.crypto.allow_encrypt_override=true \
ro.crypto.volume.filenames_mode="aes-256-cts" \
ro.hardware.keystore_desede=true
# Lineage Health
PRODUCT_PACKAGES += \
vendor.lineage.health-service.default
TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_BYPASS := false
# Media
PRODUCT_PACKAGES += \
libavservices_minijail_vendor \
libcodec2_soft_common.vendor \
libsfplugin_ccodec_utils.vendor
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/media/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml
# Namespaces
PRODUCT_SOONG_NAMESPACES += \
$(LOCAL_PATH) \
hardware/xiaomi
# NFC
PRODUCT_COPY_FILES += \
$(call find-copy-subdir-files,*,$(LOCAL_PATH)/configs/nfc/,$(TARGET_COPY_OUT_VENDOR)/etc)
# Overlays
PRODUCT_PACKAGES += \
AliothCarrierConfig \
AliothFrameworks \
AliothNfc \
AliothSettings \
AliothSystemUI \
AOSPAAliothFrameworks \
AOSPAAliothSystemUI \
SettingsOverlayM2012K11AG \
SettingsOverlayM2012K11AI \
SettingsProviderM2012K11AC \
SettingsProviderM2012K11AG \
SettingsProviderM2012K11AI \
WifiOverlayM2012K11AC \
WifiOverlayM2012K11AG \
WifiOverlayM2012K11AI
# Partitions
PRODUCT_USE_DYNAMIC_PARTITIONS := true
# Platform
TARGET_BOARD_PLATFORM := kona
# QCRIL
PRODUCT_VENDOR_PROPERTIES += \
persist.vendor.radio.cdma_cap=true \
persist.vendor.radio.data_con_rprt=1 \
persist.vendor.radio.data_ltd_sys_ind=1 \
persist.vendor.radio.force_ltd_sys_ind=1 \
persist.vendor.radio.manual_nw_rej_ct=1
# QTI
TARGET_COMMON_QTI_COMPONENTS := \
adreno \
alarm \
audio \
av \
bt \
charging \
display \
gps \
init \
media \
nfc \
overlay \
perf \
telephony \
usb \
wfd \
wlan
TARGET_NFC_SKU := pro
# Sensors
PRODUCT_VENDOR_PROPERTIES += \
persist.vendor.sensors.allow_non_default_discovery=true \
persist.vendor.sensors.sync_request=true
PRODUCT_SYSTEM_EXT_PROPERTIES += \
persist.vendor.sensors.enable.mag_filter=true
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/sensors/hals.conf:$(TARGET_COPY_OUT_VENDOR)/etc/sensors/hals.conf
PRODUCT_PACKAGES += \
libsensorndkbridge
# Shipping API
PRODUCT_SHIPPING_API_LEVEL := 30
# SoC Property
PRODUCT_VENDOR_PROPERTIES += \
ro.soc.model=SM8250
# Storage
PRODUCT_VENDOR_PROPERTIES += \
ro.incremental.enable=yes
PRODUCT_PRODUCT_PROPERTIES += \
persist.sys.fuse.passthrough.enable=true
$(call inherit-product, $(SRC_TARGET_DIR)/product/emulated_storage.mk)
# Subsystem silent restart
PRODUCT_VENDOR_PROPERTIES += \
persist.vendor.ssr.restart_level=ALL_ENABLE
# Thermal
PRODUCT_VENDOR_PROPERTIES += \
vendor.sys.thermal.data.path=/data/vendor/thermal/
# Update Engine
PRODUCT_PACKAGES += \
update_engine \
update_engine_sideload \
update_verifier
# Vendor
$(call inherit-product, vendor/xiaomi/alioth/alioth-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
$(call inherit-product, hardware/xiaomi/aidl/vibrator/vibrator-vendor-product.mk)
# VNDK
PRODUCT_PACKAGES += \
PRODUCT_COPY_FILES += \
prebuilts/vndk/v33/arm/arch-arm-armv7-a-neon/shared/vndk-core/libstagefright_foundation.so:$(TARGET_COPY_OUT_VENDOR)/lib/libstagefright_foundation-v33.so \
prebuilts/vndk/v33/arm64/arch-arm64-armv8-a/shared/vndk-core/libstagefright_foundation.so:$(TARGET_COPY_OUT_VENDOR)/lib64/libstagefright_foundation-v33.so
# VPP tunings
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/tunings.txt:$(TARGET_COPY_OUT_VENDOR)/etc/tunings.txt
# WLAN
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/wlan/WCNSS_qcom_cfg_qca6390.ini:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/WCNSS_qcom_cfg.ini
# WFD
PRODUCT_PACKAGES += \
libwfdaac_vendor:32