-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.mk
433 lines (355 loc) · 14.2 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
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
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
#
# Copyright (C) 2021 The Android Open Source Project
# (C) 2022-2023 Paranoid Android
#
# SPDX-License-Identifier: Apache-2.0
#
# 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=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 += \
android.hardware.boot@1.2-impl-qti \
android.hardware.boot@1.2-impl-qti.recovery \
android.hardware.boot@1.2-service \
checkpoint_gc \
otapreopt_script \
update_engine \
update_engine_sideload \
update_verifier
# AAPT
PRODUCT_AAPT_CONFIG := normal
PRODUCT_AAPT_PREF_CONFIG := xxhdpi
# APEX
$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
# Audio
QCV_FAMILY_SKUS := cape taro ukee
PRODUCT_COPY_FILES += \
$(foreach DEVICE_SKU, $(QCV_FAMILY_SKUS), \
$(LOCAL_PATH)/configs/audio/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio/sku_$(DEVICE_SKU)/audio_effects.xml \
$(LOCAL_PATH)/configs/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio/sku_$(DEVICE_SKU)_qssi/audio_policy_configuration.xml)
PRODUCT_ODM_PROPERTIES += \
aaudio.mmap_policy=1 \
vendor.audio.offload.buffer.size.kb=256
PRODUCT_VENDOR_PROPERTIES += \
persist.vendor.audio.auto.scenario=true \
persist.vendor.audio.misound.disable=true \
ro.audio.monitorRotation=true \
ro.audio.spatializer_enabled=true \
ro.config.alarm_vol_steps=15 \
ro.config.system_vol_steps=15 \
ro.config.vc_call_vol_default=9 \
ro.config.vc_call_vol_steps=11 \
ro.vendor.audio.camera.loopback.support=false \
ro.vendor.audio.feature.spatial=7 \
ro.vendor.audio.gain.support=true \
ro.vendor.audio.soundtrigger.appdefine.cnn.level=45 \
ro.vendor.audio.soundtrigger.appdefine.gmm.level=65 \
ro.vendor.audio.soundtrigger.appdefine.gmm.user.level=55 \
ro.vendor.audio.soundtrigger.appdefine.vop.level=10 \
ro.vendor.audio.soundtrigger.xanzn.cnn.level=158 \
ro.vendor.audio.soundtrigger.xanzn.gmm.level=80 \
ro.vendor.audio.soundtrigger.xanzn.gmm.user.level=80 \
ro.vendor.audio.soundtrigger.xanzn.vop.level=41 \
ro.vendor.audio.soundtrigger.xatx.cnn.level=95 \
ro.vendor.audio.soundtrigger.xatx.gmm.level=54 \
ro.vendor.audio.soundtrigger.xatx.gmm.user.level=54 \
ro.vendor.audio.soundtrigger.xatx.vop.level=0 \
ro.vendor.audio.support.sound.id=true
# Bluetooth
TARGET_USE_AIDL_QTI_BT_AUDIO := true
PRODUCT_VENDOR_PROPERTIES += \
persist.sys.fflag.override.settings_bluetooth_hearing_aid=true \
persist.vendor.qcom.bluetooth.a2dp_offload_cap=sbc-aptx-aptxtws-aptxhd-aac-ldac-aptxadaptiver2 \
persist.vendor.qcom.bluetooth.a2dp_mcast_test.enabled=false \
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 \
persist.vendor.service.bdroid.soc.alwayson=true \
ro.vendor.bluetooth.csip_qti=true
# Camera
$(call inherit-product-if-exists, vendor/xiaomi/camera/miuicamera.mk)
PRODUCT_PACKAGES += \
android.hardware.camera.provider@2.7.vendor \
vendor.qti.hardware.camera.aon@1.0.vendor \
vendor.qti.hardware.camera.postproc@1.0.vendor
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_SYSTEM_PROPERTIES += \
ro.miui.notch=1
PRODUCT_VENDOR_PROPERTIES += \
camera.disable_zsl_mode=1 \
ro.camera.enableCamera1MaxZsl=1 \
ro.hardware.camera=xiaomi
# Cutout
PRODUCT_PACKAGES += \
AvoidAppsInCutoutOverlay \
NoCutoutOverlay
PRODUCT_PRODUCT_PROPERTIES += \
ro.support_hide_display_cutout=true
# Dalvik
$(call inherit-product, frameworks/native/build/phone-xhdpi-6144-dalvik-heap.mk)
# Device Settings
PRODUCT_PACKAGES += \
KeyHandler \
XiaomiDolby \
XiaomiParts
# Display / Graphics
PRODUCT_PACKAGES += \
vendor.qti.hardware.display.config-V2-ndk_platform.vendor \
vendor.qti.hardware.display.config-V5-ndk_platform.vendor \
vendor.qti.hardware.memtrack-service
PRODUCT_ODM_PROPERTIES += \
persist.sys.sf.color_mode=0 \
ro.surface_flinger.set_idle_timer_ms?=1100 \
ro.surface_flinger.set_touch_timer_ms?=200 \
vendor.display.disable_3d_adaptive_tm=0 \
vendor.display.enable_rounded_corner=0
PRODUCT_VENDOR_PROPERTIES += \
debug.sf.disable_backpressure=1 \
debug.sf.frame_rate_multiple_threshold=120 \
persist.sys.sf.native_mode=258 \
ro.gfx.driver.1?=com.qualcomm.qti.gpudrivers.taro.api32 \
ro.vendor.display.ai_disp.enable=true \
ro.vendor.display.hwc_thermal_dimming=true \
ro.vendor.display.mi_calib.enable=true \
ro.vendor.display.nature_mode.enable=true \
ro.vendor.histogram.enable=true \
ro.vendor.sre.enable=true \
ro.vendor.xiaomi.bl.poll=true
# Doze
PRODUCT_PACKAGES += \
ParanoidDoze
PRODUCT_SYSTEM_EXT_PROPERTIES += \
ro.sensor.pickup=xiaomi.sensor.pickup \
ro.sensor.pickup.lower.value=2 \
ro.sensor.proximity?=true
# DPM
PRODUCT_VENDOR_PROPERTIES += \
persist.vendor.dpm.vndr.feature=1 \
persist.vendor.dpm.vndr.halservice.enable=1 \
persist.vendor.dpm.vndr.idletimer.mode=default
# DRM
PRODUCT_PACKAGES += \
android.hardware.drm@1.4.vendor \
android.hardware.drm-service.clearkey \
libdrm.vendor
PRODUCT_VENDOR_PROPERTIES += \
drm.service.enabled=true
# Fastboot
PRODUCT_PACKAGES += \
fastbootd
# FaceSense
PRODUCT_SYSTEM_PROPERTIES += \
ro.face.sense_service.camera_id=1
# Fingerprint
ifneq ($(TARGET_USES_MFP_DAEMON),true)
PRODUCT_PACKAGES += \
android.hardware.biometrics.fingerprint@2.3-service.xiaomi \
libudfpshandler
endif
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/frp
# FUSE
PRODUCT_SYSTEM_PROPERTIES += \
persist.sys.fuse.passthrough.enable=true
# GPS
PRODUCT_PACKAGES += \
android.hardware.gnss-V1-ndk_platform.vendor
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/gps.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gps.conf
# Health
PRODUCT_PACKAGES += \
android.hardware.health-service.xiaomi \
android.hardware.health-service.xiaomi_recovery \
android.hardware.health@1.0.vendor \
android.hardware.health@2.1.vendor \
vendor.lineage.health-service.default
# Identity
PRODUCT_PACKAGES += \
android.hardware.identity-V3-ndk_platform.vendor
# Incremental FS
PRODUCT_VENDOR_PROPERTIES += \
ro.incremental.enable=1
# Init scripts
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/rootdir/bin/init.kernel.post_boot.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.kernel.post_boot.sh \
$(LOCAL_PATH)/rootdir/bin/init.xiaomi_taro.perf.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.xiaomi_taro.perf.sh \
$(LOCAL_PATH)/rootdir/bin/init.xiaomi_taro.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.xiaomi_taro.sh \
$(LOCAL_PATH)/rootdir/etc/init.target.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.target.rc \
$(LOCAL_PATH)/rootdir/etc/init.xiaomi_taro.perf.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.xiaomi_taro.perf.rc \
$(LOCAL_PATH)/rootdir/etc/init.xiaomi_taro.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.xiaomi_taro.rc \
$(LOCAL_PATH)/rootdir/etc/ueventd.rc:$(TARGET_COPY_OUT_ODM)/etc/ueventd.rc
# IR
PRODUCT_PACKAGES += \
android.hardware.ir@1.0-impl \
android.hardware.ir@1.0-service
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.consumerir.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.consumerir.xml
# Keymaster
PRODUCT_PACKAGES += \
android.hardware.gatekeeper@1.0.vendor \
android.hardware.keymaster@4.1.vendor \
android.hardware.security.keymint-V1-ndk_platform.vendor \
android.hardware.security.secureclock-V1-ndk_platform.vendor \
android.hardware.security.sharedsecret-V1-ndk_platform.vendor \
android.hardware.security.rkp-V1-ndk_platform.vendor \
libkeymaster_messages.vendor
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.keystore.app_attest_key.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.keystore.app_attest_key.xml
PRODUCT_VENDOR_PROPERTIES += \
ro.hardware.keystore_desede=true \
vendor.gatekeeper.disable_spu=true
# Keylayout
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/keylayout/gpio-keys.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/gpio-keys.kl \
$(LOCAL_PATH)/configs/keylayout/Button_Jack.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/ukee-mtp-snd-card_Button_Jack.kl \
$(LOCAL_PATH)/configs/keylayout/Button_Jack.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/waipio-mtp-snd-card_Button_Jack.kl
# Logging
SPAMMY_LOG_TAGS := \
MiStcImpl \
SDM \
SDM-histogram \
SRE \
WifiHAL \
cnss-daemon \
libsensor-displayalgo \
libsensor-parseRGB \
libsensor-ssccalapi \
sensors \
vendor.qti.hardware.display.composer-service \
ifneq ($(TARGET_BUILD_VARIANT),eng)
PRODUCT_VENDOR_PROPERTIES += \
$(foreach tag,$(SPAMMY_LOG_TAGS),log.tag.$(tag)=E)
endif
# Media
PRODUCT_PACKAGES += \
libavservices_minijail_vendor \
libcodec2_hidl@1.2.vendor \
libcodec2_soft_common.vendor \
libsfplugin_ccodec_utils.vendor
PRODUCT_VENDOR_PROPERTIES += \
debug.stagefright.c2inputsurface=-1 \
ro.mediaserver.64b.enable=true \
vendor.media.omx=0
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/media_codecs_dolby_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_dolby_audio.xml
# Mlipay
PRODUCT_PACKAGES += \
IFAAService
# NDK
NEED_AIDL_NDK_PLATFORM_BACKEND := true
# Namespaces
PRODUCT_SOONG_NAMESPACES += \
$(LOCAL_PATH) \
hardware/xiaomi
# Overlays
PRODUCT_PACKAGES += \
AOSPAXiaomiTaroFrameworksOverlay \
AOSPAXiaomiTaroSettingsOverlay \
AOSPAXiaomiTaroSystemUIOverlay \
DcDimmingFrameworksOverlay \
XiaomiTaroCarrierConfigOverlay \
XiaomiTaroFrameworksOverlay \
XiaomiTaroSettingsOverlay \
XiaomiTaroSystemUIOverlay \
XiaomiTaroWifiOverlay \
XiaomiTaroUsbOverlay \
XiaomiTaroWifiMainlineOverlay
# Partitions
PRODUCT_USE_DYNAMIC_PARTITIONS := true
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/rootdir/etc/fstab.qcom:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.qcom \
$(LOCAL_PATH)/rootdir/etc/fstab.qcom:$(TARGET_COPY_OUT_VENDOR_RAMDISK)/first_stage_ramdisk/fstab.qcom
# Perf
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/perf/perfconfigstore.xml:$(TARGET_COPY_OUT_VENDOR)/etc/perf/perfconfigstore.xml
# Platform
TARGET_BOARD_PLATFORM := taro
# Project ID Quota
$(call inherit-product, $(SRC_TARGET_DIR)/product/emulated_storage.mk)
# QC common
TARGET_COMMON_QTI_COMPONENTS := \
adreno \
alarm \
audio \
av \
bt \
display \
gps \
init \
media \
nfc \
overlay \
perf \
telephony \
usb \
wfd \
wlan
# Radio
PRODUCT_VENDOR_PROPERTIES += \
persist.vendor.data.iwlan.enable=true \
persist.vendor.radio.add_power_save=1 \
persist.vendor.radio.dynamic_sar=1 \
persist.vendor.radio.redir_party_num=0 \
ro.vendor.radio.build_profile=u-stable
# Sensors
PRODUCT_PACKAGES += \
android.hardware.sensors-service.multihal \
libsensorndkbridge
PRODUCT_PACKAGES += \
sensor-notifier
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_VENDOR_PROPERTIES += \
persist.vendor.sensors.enable.mag_filter=true
# Shipping API
PRODUCT_SHIPPING_API_LEVEL := 31
# Thermal
PRODUCT_PACKAGES += \
android.hardware.thermal@2.0-service.qti-v2
# TrustedUI
PRODUCT_PACKAGES += \
android.hidl.memory.block@1.0.vendor \
vendor.qti.hardware.systemhelper@1.0.vendor
# USB
PRODUCT_VENDOR_PROPERTIES += \
ro.usb.uvc.enabled=true
PRODUCT_HAS_GADGET_HAL := true
# VNDK
PRODUCT_PACKAGES += \
libutils-shim
PRODUCT_COPY_FILES += \
prebuilts/vndk/v33/arm64/arch-arm64-armv8-a/shared/vndk-core/libstagefright_foundation.so:$(TARGET_COPY_OUT_VENDOR)/lib64/libstagefright_foundation-v33.so
# Vendor blobs
$(call inherit-product, vendor/xiaomi/sm8450-common/sm8450-common-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)
# Wi-Fi
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/WCNSS_qcom_cfg.ini:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/qca6490/WCNSS_qcom_cfg.ini