-
Notifications
You must be signed in to change notification settings - Fork 0
/
kona.mk
339 lines (279 loc) · 11.5 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
329
330
331
332
333
334
335
336
337
338
339
# 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.
ifeq ($(BOARD_BOOT_HEADER_VERSION),3)
# A/B
$(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota/compression.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
PRODUCT_PACKAGES += \
# Update Engine
PRODUCT_PACKAGES += \
update_engine \
update_engine_sideload \
update_verifier
endif
# AID/fs configs
PRODUCT_PACKAGES += \
fs_config_files
# 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_PROPERTY_OVERRIDES += \
aaudio.mmap_policy=1 \
persist.audio.button_jack.profile=volume \
persist.audio.button_jack.switch=0 \
persist.vendor.audio.hifi=false \
persist.vendor.audio.ring.filter.mask=0 \
persist.vendor.bt.a2dp_offload_cap=sbc-aptx-aptxtws-aptxhd-aptxadaptiver2-aac-ldac-lhdc \
ro.config.vc_call_vol_steps=11 \
ro.vendor.audio.afe.record=true \
ro.vendor.audio.aiasst.support=true \
ro.vendor.audio.dump.mixer=true \
ro.vendor.audio.game.effect=true \
ro.vendor.audio.hifi=true \
ro.vendor.audio.miui.karaoke.show=false \
ro.vendor.audio.multiroute=true \
ro.vendor.audio.ring.filter=true \
ro.vendor.audio.scenario.support=true \
ro.vendor.audio.sdk.fluencetype=fluence \
ro.vendor.audio.sfx.audiovisual=true \
ro.vendor.audio.sfx.earadj=true \
ro.vendor.audio.sfx.scenario=true \
ro.vendor.audio.sos=true \
ro.vendor.audio.soundfx.type=mi \
ro.vendor.audio.soundfx.usb=true \
ro.vendor.audio.surround.support=true \
ro.vendor.audio.us.proximity=true \
ro.vendor.audio.vocal.support=true \
ro.vendor.audio.voice.change.support=true \
ro.vendor.audio.voice.change.youme.support=true \
ro.vendor.audio.voice.volume.boost=none \
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.mic.status=off \
vendor.audio.offload.track.enable=false \
vendor.audio.spkcal.copy.inhal=true \
vendor.audio.spkr_prot.tx.sampling_rate=48000 \
vendor.audio.usb.disable.sidetone=true
PRODUCT_COPY_FILES += \
$(call find-copy-subdir-files,*,$(LOCAL_PATH)/configs/audio/,$(TARGET_COPY_OUT_VENDOR)/etc)
# Bluetooth
PRODUCT_PACKAGES += \
audio.bluetooth.default \
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.aptxadaptiver2_1_support=false \
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 \
vendor.qcom.bluetooth.soc=hastings
PRODUCT_SYSTEM_EXT_PROPERTIES += \
persist.vendor.btstack.enable.lpa=true \
persist.vendor.btstack.enable.twsplus=true \
persist.vendor.bt.a2dp.aac_whitelist=false
# Camera
PRODUCT_PROPERTY_OVERRIDES += \
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_PACKAGES += \
[email protected]_64 \
libcamera2ndk_vendor \
libstdc++.vendor \
# Charging
PRODUCT_SYSTEM_EXT_PROPERTIES += \
ro.charger.enable_suspend=1
PRODUCT_PROPERTY_OVERRIDES += \
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
# Config Store
PRODUCT_PACKAGES += \
disable_configstore
# 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)
# Data
PRODUCT_SYSTEM_EXT_PROPERTIES += \
persist.vendor.data.mode=concurrent \
ro.vendor.use_data_netmgrd=true
# Display
PRODUCT_PROPERTY_OVERRIDES += \
ro.vendor.display.paneltype=2 \
ro.vendor.display.sensortype=2 \
vendor.display.enable_async_powermode=0 \
vendor.display.qdcm.mode_combine=1 \
vendor.display.use_layer_ext=0 \
vendor.display.use_smooth_motion=0
PRODUCT_COPY_FILES += \
$(call find-copy-subdir-files,*,$(LOCAL_PATH)/configs/display/,$(TARGET_COPY_OUT_VENDOR)/etc)
# DPM
PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.dpmhalservice.enable=1
# Doze
PRODUCT_PACKAGES += \
ParanoidDoze
PRODUCT_SYSTEM_EXT_PROPERTIES += \
ro.sensor.pickup=xiaomi.sensor.pickup
# DRM
PRODUCT_PROPERTY_OVERRIDES += \
drm.service.enabled=true
PRODUCT_PACKAGES += \
# Fastboot
PRODUCT_PACKAGES += \
fastbootd
# Fingerprint
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml
# FM
PRODUCT_PACKAGES += \
# FRP
PRODUCT_PROPERTY_OVERRIDES += \
ro.frp.pst=/dev/block/bootdevice/by-name/frp
# GPS
LOC_HIDL_VERSION = 4.0
# GSI
$(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_keys.mk)
# Gatekeeper
PRODUCT_PROPERTY_OVERRIDES += \
vendor.gatekeeper.disable_spu=true
# Health
PRODUCT_PACKAGES += \
# Init
PRODUCT_PACKAGES += \
init.mi.usb.sh \
init.qti.dcvs.sh \
init.target.rc
# Incremental FS
PRODUCT_PROPERTY_OVERRIDES += \
ro.incremental.enable=1
# Netflix
PRODUCT_PROPERTY_OVERRIDES += \
ro.netflix.bsp_rev=Q8250-19134-1
# Namespaces
PRODUCT_SOONG_NAMESPACES += \
$(LOCAL_PATH) \
# Overlays
PRODUCT_PACKAGES += \
FrameworksResTarget \
WifiResTarget
# Partitions
PRODUCT_USE_DYNAMIC_PARTITIONS := true
# Platform
TARGET_BOARD_PLATFORM := kona
# QTI
TARGET_COMMON_QTI_COMPONENTS := all
# Recovery
PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.flash.recovery=1
# Sensors
PRODUCT_PROPERTY_OVERRIDES += \
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_PACKAGES += \
libsensorndkbridge
# Shipping API
PRODUCT_SHIPPING_API_LEVEL := 29
# SOC Properties
PRODUCT_PROPERTY_OVERRIDES += \
ro.soc.manufacturer=QTI \
ro.soc.model=SM8250
# Telephony
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.telephony.gsm.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.gsm.xml \
frameworks/native/data/etc/android.hardware.telephony.cdma.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.cdma.xml \
frameworks/native/data/etc/android.hardware.telephony.ims.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.ims.xml
# Vendor Service Manager
PRODUCT_PACKAGES += \
vndservicemanager
# 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
# VNDK
PRODUCT_EXTRA_VNDK_VERSIONS := 30
PRODUCT_PACKAGES += \
# WLAN
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/wlan/WCNSS_qcom_cfg_qca6390.ini:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/WCNSS_qcom_cfg.ini
# Inherit the proprietary files
$(call inherit-product, vendor/xiaomi/sm8250-common/sm8250-common-vendor.mk)