-
Notifications
You must be signed in to change notification settings - Fork 0
/
kona.mk
328 lines (267 loc) · 12.8 KB
/
kona.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
# Inherit proprietary targets
$(call inherit-product-if-exists, vendor/xiaomi/cmi/cmi-vendor.mk)
# Kernel
$(call inherit-product, device/xiaomi/cmi-kernel/kernel.mk)
# Enable AVB 2.0
BOARD_AVB_ENABLE := true
SHIPPING_API_LEVEL := 29
PRODUCT_SHIPPING_API_LEVEL := $(SHIPPING_API_LEVEL)
BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 3
BOARD_AVB_VBMETA_SYSTEM := system system_ext
BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA2048
BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 1
BOARD_AVB_RECOVERY_KEY_PATH := external/avb/test/data/testkey_rsa4096.pem
BOARD_AVB_RECOVERY_ALGORITHM := SHA256_RSA4096
BOARD_AVB_RECOVERY_ROLLBACK_INDEX := 1
BOARD_AVB_RECOVERY_ROLLBACK_INDEX_LOCATION := 1
#Enable incremental FS feature
PRODUCT_PROPERTY_OVERRIDES += ro.incremental.enable=1
#Product property overrides to configure the Dalvik heap
PRODUCT_PROPERTY_OVERRIDES += \
dalvik.vm.heapstartsize=8m \
dalvik.vm.heapsize=512m \
dalvik.vm.heapgrowthlimit=256m \
dalvik.vm.heaptargetutilization=0.75 \
dalvik.vm.heapminfree=512k \
dalvik.vm.heapmaxfree=8m
#Audio Features
PRODUCT_PROPERTY_OVERRIDES += \
af.fast_track_multiplier=1 \
aaudio.mmap_policy=2 \
aaudio.mmap_exclusive_policy=2 \
aaudio.hw_burst_min_usec=2000 \
vendor.audio.adm.buffering.ms=2 \
vendor.audio_hal.period_multiplier=2 \
vendor.audio.feature.a2dp_offload.enable=true \
vendor.audio.feature.audiozoom.enable=false \
vendor.audio.feature.concurrent_capture.enable=true \
vendor.audio.feature.external_dsp.enable=false \
vendor.audio.feature.external_speaker.enable=false \
vendor.audio.feature.fluence.enable=true \
vendor.audio.feature.hfp.enable=true \
vendor.audio.feature.hwdep_cal.enable=false \
vendor.audio.feature.incall_music.enable=true \
vendor.audio.feature.maxx_audio.enable=false \
vendor.audio.feature.snd_mon.enable=true \
vendor.audio.feature.multi_voice_session.enable=true \
vendor.audio.feature.spkr_prot.enable=false \
vendor.audio.feature.usb_offload.enable=true \
vendor.audio.capture.enforce_legacy_copp_sr=true \
vendor.audio.offload.buffer.size.kb=256 \
persist.vendor.audio_hal.dsp_bit_width_enforce_mode=24 \
persist.vendor.audio.voicecall.speaker.stereo=true \
vendor.audio.offload.gapless.enabled=true
#Audio Compress
PRODUCT_PROPERTY_OVERRIDES += \
vendor.audio.feature.compr_voip.enable=true
#Audio fluence
PRODUCT_PROPERTY_OVERRIDES += \
ro.vendor.audio.sdk.fluencetype=fluencepro \
persist.vendor.audio.fluence.voicecall=true \
persist.vendor.audio.fluence.speaker=true \
persist.vendor.audio.fluence.voicecomm=true \
persist.vendor.audio.fluence.voicerec=false
#Audio volume steps
PRODUCT_PROPERTY_OVERRIDES += \
ro.config.vc_call_vol_steps=7 \
ro.config.media_vol_steps=25
#Bluetooth
PRODUCT_PROPERTY_OVERRIDES += \
persist.bluetooth.a2dp_offload.cap=sbc-aac-aptx-aptxhd-ldac \
persist.bluetooth.a2dp_offload.disabled=false \
persist.sys.fflag.override.settings_bluetooth_hearing_aid=true \
persist.vendor.bt.a2dp_offload_cap=sbc-aptx-aptxtws-aptxhd-aac-ldac \
persist.vendor.bt.aac_frm_ctl.enabled=true \
persist.vendor.bt.aac_vbr_frm_ctl.enabled=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=false \
persist.vendor.qcom.bluetooth.scram.enabled=false \
persist.vendor.qcom.bluetooth.soc=hastings \
persist.vendor.qcom.bluetooth.twsp_state.enabled=true \
ro.bluetooth.a2dp_offload.supported=false \
ro.vendor.bluetooth.wipower=false \
vendor.qcom.bluetooth.soc=hastings
#Camera
PRODUCT_PROPERTY_OVERRIDES += \
vendor.camera.aux.packagelist=org.codeaurora.snapcam,com.xiaomi.cameratest,com.xiaomi.factory.mmi,com.android.camera
#Crypto
PRODUCT_PROPERTY_OVERRIDES += \
ro.crypto.allow_encrypt_override=true \
ro.crypto.volume.filenames_mode=aes-256-cts
#Display
PRODUCT_PROPERTY_OVERRIDES += \
ro.vendor.display.sensortype=2 \
vendor.display.use_layer_ext=1
#DRM
PRODUCT_PROPERTY_OVERRIDES += \
drm.service.enabled=true
#Fingerprint
PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.qfp=false
#FRP
PRODUCT_PROPERTY_OVERRIDES += \
ro.frp.pst=/dev/block/bootdevice/by-name/frp
#Gatekeeper
PRODUCT_PROPERTY_OVERRIDES += \
vendor.gatekeeper.disable_spu=true
#GPS
PRODUCT_PROPERTY_OVERRIDES += \
persist.backup.ntpServer=0.pool.ntp.org
#Graphics
PRODUCT_PROPERTY_OVERRIDES += \
debug.sf.latch_unsignaled=1 \
persist.sys.sf.native_mode=0 \
ro.gfx.driver.1=com.qualcomm.qti.gpudrivers.kona.api30 \
ro.hardware.egl=adreno \
ro.hardware.vulkan=adreno \
ro.opengles.version=196610 \
#Keystore
PRODUCT_PROPERTY_OVERRIDES += \
ro.hardware.keystore_desede=true
#Media
PRODUCT_PROPERTY_OVERRIDES += \
debug.stagefright.ccodec=4 \
debug.stagefright.omx_default_rank=0
#NFC
PRODUCT_PROPERTY_OVERRIDES += \
ro.camera.notify_nfc=1
#OTG
PRODUCT_PROPERTY_OVERRIDES += \
persist.sys.oem.otg_support=true
#PASR
PRODUCT_PROPERTY_OVERRIDES += \
vendor.power.pasr.enabled=false
#Qualcomm System Daemon
PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.qcomsysd.enabled=1
#Radio
PRODUCT_PROPERTY_OVERRIDES += \
persist.radio.snapshot_enabled=0 \
persist.radio.snapshot_timer=0 \
persist.rcs.otp_sms_port=0 \
persist.rcs.supported=1 \
persist.vendor.data.iwlan.enable=true \
persist.vendor.radio.5g_mode_pref=1 \
persist.vendor.radio.arfcn_test_mode=3 \
persist.vendor.radio.bar_fake_gcell=1 \
persist.vendor.radio.data_con_rprt=1 \
persist.vendor.radio.data_ltd_sys_ind=1 \
persist.vendor.radio.efssync=true \
persist.vendor.radio.force_on_dc=true \
persist.vendor.radio.ignore_dom_time=10 \
persist.vendor.radio.process_sups_ind=1 \
persist.vendor.radio.uicc_se_enabled=true \
rild.libpath=/vendor/lib64/libril-qc-hal-qmi.so \
ro.com.android.dataroaming=false
#Seamless transfer
PRODUCT_PROPERTY_OVERRIDES += \
sys.fflag.override.settings_seamless_transfer=true
#Sensors
PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.sensors.allow_non_default_discovery=true \
persist.vendor.sensors.sync_request=true
#USB
PRODUCT_PROPERTY_OVERRIDES += \
vendor.usb.diag.func.name=diag \
vendor.usb.use_ffs_mtp=0
#WiFi
PRODUCT_PROPERTY_OVERRIDES += \
wifi.aware.interface=wifi-aware0
#RRO configuration
TARGET_USES_RRO := true
TARGET_ENABLE_QC_AV_ENHANCEMENTS := true
PRODUCT_PACKAGES += fs_config_files
DEVICE_MANIFEST_FILE := device/xiaomi/cmi/manifest.xml
DEVICE_MATRIX_FILE := device/xiaomi/cmi/compatibility_matrix.xml
#MIDI feature
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml
# Pro Audio feature
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.audio.pro.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.pro.xml
#Low Latency feature
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.audio.low_latency.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.low_latency.xml
#Bluetooth
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml \
frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml
BOARD_VNDK_VERSION := current
# Component overrides
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/component-overrides.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sysconfig/component-overrides.xml
#FaceAuth feature
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.biometrics.face.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.biometrics.face.xml \
#Fingerprint feature
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml \
vendor/mokee/config/permissions/vendor.mokee.biometrics.fingerprint.inscreen.xml:vendor/etc/permissions/vendor.mokee.biometrics.fingerprint.inscreen.xml
#IR
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.consumerir.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.consumerir.xml
#OMAPI
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.se.omapi.ese.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.ese.xml \
frameworks/native/data/etc/android.hardware.se.omapi.uicc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.uicc.xml
#Power
PRODUCT_COPY_FILES += \
vendor/qcom/opensource/power/config/kona/powerhint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.xml
# system prop for enabling QFS (QTI Fingerprint Solution)
PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.qfp=false
#FEATURE_OPENGLES_EXTENSION_PACK support string config file
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.opengles.aep.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.opengles.aep.xml
#Vendor property to enable advanced network scanning
PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.radio.enableadvancedscan=true
#Vibrator
PRODUCT_PACKAGES += \
vendor.qti.hardware.vibrator.service.xiaomi_kona
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/vibrator/excluded-input-devices.xml:$(TARGET_COPY_OUT_VENDOR)/etc/excluded-input-devices.xml
#Audio
PRODUCT_COPY_FILES += \
device/xiaomi/cmi/audio/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \
device/xiaomi/cmi/audio/audio_io_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_io_policy.conf \
device/xiaomi/cmi/audio/audio_policy_configuration_a2dp_offload_disabled.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_a2dp_offload_disabled.xml \
device/xiaomi/cmi/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
device/xiaomi/cmi/audio/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \
device/xiaomi/cmi/audio/bluetooth_hearing_aid_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_hearing_aid_audio_policy_configuration.xml
PRODUCT_COPY_FILES += \
device/xiaomi/cmi/audio/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml \
device/xiaomi/cmi/audio/mixer_paths_overlay_static.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_overlay_static.xml \
device/xiaomi/cmi/audio/mixer_paths_overlay_dynamic.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_overlay_dynamic.xml \
device/xiaomi/cmi/audio/audio_platform_info_intcodec.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info_intcodec.xml
PRODUCT_COPY_FILES += \
hardware/qcom-caf/sm8250/audio/configs/kona/audio_tuning_mixer.txt:$(TARGET_COPY_OUT_VENDOR)/etc/audio_tuning_mixer.txt \
hardware/qcom-caf/sm8250/audio/configs/kona/sound_trigger_mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths.xml \
hardware/qcom-caf/sm8250/audio/configs/kona/sound_trigger_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_platform_info.xml
#Display
$(call inherit-product, $(LOCAL_PATH)/kona/display/display.mk)
#Media
PRODUCT_COPY_FILES += \
device/xiaomi/cmi/media/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \
device/xiaomi/cmi/media/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles.xml \
device/xiaomi/cmi/media/media_profiles_vendor.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_vendor.xml
PRODUCT_COPY_FILES += \
hardware/qcom-caf/sm8250/media/conf_files/kona/media_codecs_performance.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance.xml \
hardware/qcom-caf/sm8250/media/conf_files/kona/media_codecs_vendor.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor.xml \
hardware/qcom-caf/sm8250/media/conf_files/kona/media_codecs_vendor_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor_audio.xml
#Power
PRODUCT_COPY_FILES += \
vendor/qcom/opensource/power/config/kona/powerhint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.xml
# USB
PRODUCT_PACKAGES += \
#WiFi
PRODUCT_COPY_FILES += \
device/xiaomi/cmi/wifi/qca6390/WCNSS_qcom_cfg.ini:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/qca6390/WCNSS_qcom_cfg.ini \
device/xiaomi/cmi/wifi/p2p_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/p2p_supplicant_overlay.conf \
device/xiaomi/cmi/wifi/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf