-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdevice.mk
323 lines (267 loc) · 11.2 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
#
# Copyright (C) 2023 Paranoid Android
#
# SPDX-License-Identifier: Apache-2.0
#
# Product launched with 9.0
$(call inherit-product, $(SRC_TARGET_DIR)/product/product_launched_with_p.mk)
# Setup dalvik vm configs
$(call inherit-product, frameworks/native/build/phone-xhdpi-6144-dalvik-heap.mk)
# Additional native libraries
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/public.libraries.txt:$(TARGET_COPY_OUT_VENDOR)/etc/public.libraries.txt
# AID/fs configs
PRODUCT_PACKAGES += \
fs_config_files
# Audio
PRODUCT_PACKAGES += \
android.hardware.audio.service
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/audio/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \
$(LOCAL_PATH)/configs/audio/audio_platform_info_intcodec.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info_intcodec.xml \
$(LOCAL_PATH)/configs/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
$(LOCAL_PATH)/configs/audio/mixer_paths_idp.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_idp.xml
# Bluetooth
PRODUCT_SYSTEM_PROPERTIES += \
persist.vendor.bt.a2dp.aac_whitelist=false \
persist.vendor.bt.a2dp.mac_whitelist=false \
persist.vendor.btstack.enable.twsplus=true \
persist.vendor.btstack.enable.twsplussho=true \
persist.vendor.btsatck.absvolfeature=true \
persist.vendor.qcom.bluetooth.aac_vbr_ctl.enabled=false \
ro.bluetooth.library_name=libbluetooth_qti.so \
vendor.bluetooth.soc=cherokee
PRODUCT_VENDOR_PROPERTIES += \
persist.vendor.qcom.bluetooth.a2dp_offload_cap=sbc-aptx-aptxtws-aptxhd-aac-ldac-aptxadaptive \
persist.vendor.qcom.bluetooth.aac_frm_ctl.enabled=true \
persist.vendor.qcom.bluetooth.enable.splita2dp=true \
persist.vendor.qcom.bluetooth.scram.enabled=true \
persist.vendor.qcom.bluetooth.soc=cherokee \
persist.vendor.qcom.bluetooth.twsp_state.enabled=false \
ro.vendor.bluetooth.wipower=false \
vendor.qcom.bluetooth.soc=cherokee
# Camera
PRODUCT_PACKAGES += \
[email protected]_64 \
libdng_sdk.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_COPY_FILES += \
prebuilts/vndk/v29/arm64/arch-arm64-armv8-a/shared/vndk-sp/libc++.so:$(TARGET_COPY_OUT_VENDOR)/lib64/libc++.so
PRODUCT_SYSTEM_PROPERTIES += \
vendor.camera.aux.packagelist=org.codeaurora.snapcam,com.android.camera,org.lineageos.snap
PRODUCT_VENDOR_PROPERTIES += \
camera.disable_zsl_mode=1
# Capability Configstore
PRODUCT_PACKAGES += \
# 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 += \
# Charger Properties
PRODUCT_SYSTEM_PROPERTIES += \
ro.charger.enable_suspend=true
# Crypto Properties
PRODUCT_VENDOR_PROPERTIES += \
ro.crypto.dm_default_key.options_format.version=2 \
ro.crypto.volume.filenames_mode=aes-256-cts \
ro.crypto.volume.metadata.method=dm-default-key \
ro.crypto.volume.options=::v2
# Display
PRODUCT_PACKAGES += \
disable_configstore
# Display
PRODUCT_VENDOR_PROPERTIES += \
debug.sf.disable_backpressure=1 \
ro.surface_flinger.protected_contents=true \
debug.sf.use_phase_offsets_as_durations=1 \
debug.sf.late.sf.duration=10500000 \
debug.sf.late.app.duration=20500000 \
debug.sf.early.sf.duration=21000000 \
debug.sf.early.app.duration=16500000 \
debug.sf.earlyGl.sf.duration=13500000 \
debug.sf.earlyGl.app.duration=21000000 \
debug.sf.enable_egl_image_tracker=1 \
debug.sf.enable_hwc_vds=1 \
debug.sf.latch_unsignaled=1 \
ro.surface_flinger.force_hwc_copy_for_virtual_displays=true \
ro.surface_flinger.has_wide_color_display=true \
ro.surface_flinger.has_HDR_display=true \
ro.surface_flinger.max_frame_buffer_acquired_buffers=3 \
ro.surface_flinger.max_virtual_display_dimension=4096 \
ro.surface_flinger.protected_contents=true \
ro.surface_flinger.use_color_management=true \
ro.surface_flinger.wcg_composition_dataspace=143261696 \
vendor.display.qdcm.mode_combine=1
# Display - Set color mode to Adaptive by default
PRODUCT_VENDOR_PROPERTIES += \
persist.sys.sf.color_saturation=1.0 \
persist.sys.sf.native_mode=2 \
persist.sys.sf.color_mode=9
# DPM
PRODUCT_VENDOR_PROPERTIES += \
persist.vendor.dpmhalservice.enable=1
# DRM
PRODUCT_PACKAGES += \
# Dynamic Partitions
PRODUCT_BUILD_SUPER_PARTITION := false
PRODUCT_USE_DYNAMIC_PARTITIONS := true
PRODUCT_RETROFIT_DYNAMIC_PARTITIONS := true
# Fastbootd
PRODUCT_PACKAGES += \
fastbootd
# Fingerprint
PRODUCT_PACKAGES += \
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
# GPS Configs
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/gps/apdr.conf:$(TARGET_COPY_OUT_VENDOR)/etc/apdr.conf \
$(LOCAL_PATH)/configs/gps/flp.conf:$(TARGET_COPY_OUT_VENDOR)/etc/flp.conf \
$(LOCAL_PATH)/configs/gps/gnss_antenna_info.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss_antenna_info.conf \
$(LOCAL_PATH)/configs/gps/gps.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gps.conf \
$(LOCAL_PATH)/configs/gps/izat.conf:$(TARGET_COPY_OUT_VENDOR)/etc/izat.conf \
$(LOCAL_PATH)/configs/gps/lowi.conf:$(TARGET_COPY_OUT_VENDOR)/etc/lowi.conf \
$(LOCAL_PATH)/configs/gps/sap.conf:$(TARGET_COPY_OUT_VENDOR)/etc/sap.conf
# Gatekeeper
PRODUCT_VENDOR_PROPERTIES += \
vendor.gatekeeper.disable_spu = true
# HIDL
PRODUCT_PACKAGES += \
libhidltransport.vendor \
libhwbinder.vendor
# Init scripts
PRODUCT_PACKAGES += \
fstab.qcom \
init.qti.dcvs.sh \
init.target.rc \
init.xiaomi.perf.rc
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/init/fstab.qcom:$(TARGET_COPY_OUT_RAMDISK)/fstab.qcom
# Input
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/idc/uinput-fpc.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/uinput-fpc.idc \
$(LOCAL_PATH)/configs/idc/uinput-goodix.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/uinput-goodix.idc
# IRSC
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/security/sec_config:$(TARGET_COPY_OUT_VENDOR)/etc/sec_config
# Keylayouts
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/keylayout/uinput-fpc.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/uinput-fpc.kl \
$(LOCAL_PATH)/configs/keylayout/uinput-goodix.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/uinput-goodix.kl \
$(LOCAL_PATH)/configs/keylayout/sm6150-idp-snd-card_Button_Jack.kl:$(TARGET_COPY_OUT_SYSTEM)/usr/keylayout/sm6150-idp-snd-card_Button_Jack.kl
# Lights
PRODUCT_PACKAGES += \
# Netflix
PRODUCT_VENDOR_PROPERTIES += \
ro.netflix.bsp_rev=Q6150-17263-1
# Overlay
PRODUCT_PACKAGES += \
AOSPAVioletFrameworksOverlay \
AOSPAVioletSettingsOverlay \
VioletCarrierConfigOverlay \
VioletFrameworksOverlay \
VioletSettingsProviderOverlay \
VioletSystemUIOverlay \
VioletWifiOverlay
# ParanoidDoze
PRODUCT_PACKAGES += \
ParanoidDoze
PRODUCT_SYSTEM_PROPERTIES += \
ro.sensor.pickup=xiaomi.sensor.pickup
ro.sensor.proximity=true
# Perf
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/perf/msm_irqbalance.conf:$(TARGET_COPY_OUT_VENDOR)/etc/msm_irqbalance.conf \
$(LOCAL_PATH)/configs/perf/perfboostsconfig.xml:$(TARGET_COPY_OUT_VENDOR)/etc/perf/perfboostsconfig.xml \
$(LOCAL_PATH)/configs/perf/perfconfigstore.xml:$(TARGET_COPY_OUT_VENDOR)/etc/perf/perfconfigstore.xml
# Platform
MSMSTEPPE := sm6150
TARGET_BOARD_PLATFORM := $(MSMSTEPPE)
# Protobuf
PRODUCT_PACKAGES += \
libprotobuf-cpp-full-vendorcompat
# QTI
TARGET_COMMON_QTI_COMPONENTS := \
adreno \
audio \
av \
bt \
charging \
display \
gps \
init \
keymaster \
media \
overlay \
perf \
qseecomd \
telephony \
usb \
vibrator \
wfd \
wlan
# RIL
PRODUCT_SYSTEM_PROPERTIES += \
persist.rcs.supported=1 \
persist.radio.NO_STAPA=1 \
persist.radio.VT_HYBRID_ENABLE=1 \
ro.telephony.default_cdma_sub=0
PRODUCT_VENDOR_PROPERTIES += \
persist.vendor.radio.data_ltd_sys_ind=1 \
persist.vendor.radio.dynamic_sar=1 \
persist.vendor.radio.force_ltd_sys_ind=1 \
persist.vendor.radio.force_on_dc=true \
persist.vendor.radio.manual_nw_rej_ct=1 \
persist.vendor.radio.redir_party_num=1 \
persist.vendor.radio.report_codec=1
# Sensors
PRODUCT_PACKAGES += \
libsensorndkbridge
# Sensors Configs
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
# Soong namespaces
PRODUCT_SOONG_NAMESPACES += \
$(LOCAL_PATH) \
hardware/xiaomi
# Vulkan
PRODUCT_PACKAGES += \
libvulkan
# WiFi
PRODUCT_PACKAGES += \
libwpa_client
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/wifi/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf \
$(LOCAL_PATH)/configs/wifi/p2p_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/p2p_supplicant_overlay.conf \
$(LOCAL_PATH)/configs/wifi/WCNSS_qcom_cfg.ini:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/WCNSS_qcom_cfg.ini
PRODUCT_VENDOR_PROPERTIES += \
ro.telephony.iwlan_operation_mode=legacy
# WiFi Display
PRODUCT_PACKAGES += \
libwfdaac_vendor
# Call the proprietary setup
$(call inherit-product, vendor/xiaomi/violet/violet-vendor.mk)