This repository has been archived by the owner on Dec 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdevice.mk
281 lines (227 loc) · 7.83 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
#
# Copyright (C) 2023 The Android Open Source Project
#
# SPDX-License-Identifier: Apache-2.0
#
# Inherit virtual_ab_ota_product.
$(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota/android_t_baseline.mk)
PRODUCT_VIRTUAL_AB_COMPRESSION_METHOD := gz
# Installs gsi keys into ramdisk, to boot a developer GSI with verified boot.
$(call inherit-product, $(SRC_TARGET_DIR)/product/developer_gsi_keys.mk)
# Setup dalvik vm configs.
$(call inherit-product, frameworks/native/build/phone-xhdpi-6144-dalvik-heap.mk)
# Call the proprietary setup.
$(call inherit-product-if-exists, vendor/xiaomi/topaz/topaz-vendor.mk)
# MiuiCamera
TARGET_CAMERA_USES_NEWER_HIDL_OVERRIDE_FORMAT := true
TARGET_INCLUDES_MIUI_CAMERA := true
$(call inherit-product-if-exists, vendor/xiaomi/camera/miuicamera.mk)
# Enable updating of APEXes.
$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
# Project ID Quota.
$(call inherit-product, $(SRC_TARGET_DIR)/product/emulated_storage.mk)
# Enforce generic ramdisk allow list
$(call inherit-product, $(SRC_TARGET_DIR)/product/generic_ramdisk.mk)
DEVICE_PATH := device/xiaomi/topaz
# SHIPPING API
PRODUCT_SHIPPING_API_LEVEL := 31
# VNDK API
PRODUCT_TARGET_VNDK_VERSION := 32
PRODUCT_EXTRA_VNDK_VERSIONS := 30 31 32
# Call the BCR setup
$(call inherit-product-if-exists, vendor/bcr/bcr.mk)
# A/B
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
# Audio Configs
PRODUCT_COPY_FILES += \
$(DEVICE_PATH)/configs/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/audio_policy_configuration.xml
# Bluetooth Audio (System-side HAL, sysbta)
PRODUCT_PACKAGES += \
audio.sysbta.default \
android.hardware.bluetooth.audio-service-system \
libldacBT_abr \
libldacBT_bco \
libldacBT_enc
# Camera Legacy HIDL deps
PRODUCT_PACKAGES += \
android.hidl.manager@1.0 \
android.hidl.manager@1.0.vendor \
android.hidl.memory.block@1.0 \
android.hidl.memory.block@1.0.vendor \
android.hidl.memory@1.0-impl
# Boot control
PRODUCT_PACKAGES += \
android.hardware.boot@1.2-impl-qti \
android.hardware.boot@1.2-impl-qti.recovery \
android.hardware.boot@1.2-service \
bootctrl.xiaomi_bengal \
bootctrl.xiaomi_bengal.recovery
PRODUCT_PACKAGES_DEBUG += \
bootctl
# Boot Jars
PRODUCT_BOOT_JARS += \
QPerformance \
UxPerformance
# Audio Configs
PRODUCT_COPY_FILES += \
$(DEVICE_PATH)/configs/camera/lib/libhidltransport.so:$(TARGET_COPY_OUT_SYSTEM)/etc/lib/libhidltransport.so \
$(DEVICE_PATH)/configs/camera/lib64/libhidltransport.so:$(TARGET_COPY_OUT_SYSTEM)/etc/lib64/libhidltransport.so
# Dtb
PRODUCT_COPY_FILES += \
$(DEVICE_PATH)/prebuilts/dtb:dtb.img
# DT2W
PRODUCT_PACKAGES += \
DT2W-Service-Topaz
# Fingerprint hal patched
PRODUCT_COPY_FILES += \
$(DEVICE_PATH)/prebuilts/libgf_hal.so.patched:$(TARGET_COPY_OUT_SYSTEM)/lib64/libgf_hal.so.patched
# FUSE passthrough
PRODUCT_SYSTEM_PROPERTIES += \
persist.sys.fuse.passthrough.enable=true
# Fix thermal QC
PRODUCT_COPY_FILES += \
$(DEVICE_PATH)/configs/thermal/thermal-normal.conf:$(TARGET_COPY_OUT_SYSTEM)/etc/thermal-normal.conf
# Fastbootd
PRODUCT_PACKAGES += \
android.hardware.fastboot@1.1-impl-mock \
fastbootd
# F2FS utilities
PRODUCT_PACKAGES += \
sg_write_buffer \
f2fs_io \
check_f2fs
# Google Dialer Call recording
PRODUCT_COPY_FILES += \
$(DEVICE_PATH)/configs/permissions/com.google.android.apps.dialer.call_recording_audio.features.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/com.google.android.apps.dialer.call_recording_audio.features.xml
# Health
PRODUCT_PACKAGES += \
android.hardware.health@2.1-impl.recovery
# HotwordEnrollement
PRODUCT_COPY_FILES += \
$(DEVICE_PATH)/configs/permissions/hotword-hiddenapi-package-whitelist.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysconfig/hotword-hiddenapi-package-whitelist.xml \
$(DEVICE_PATH)/configs/permissions/privapp-permissions-hotword.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/privapp-permissions-hotword.xml
# Input
PRODUCT_COPY_FILES += \
$(DEVICE_PATH)/configs/idc/uinput-fpc.idc:$(TARGET_COPY_OUT_SYSTEM)/usr/idc/uinput-fpc.idc \
$(DEVICE_PATH)/configs/idc/uinput-goodix.idc:$(TARGET_COPY_OUT_SYSTEM)/usr/idc/uinput-goodix.idc \
$(DEVICE_PATH)/configs/idc/uinput-fortsense.idc:$(TARGET_COPY_OUT_SYSTEM)/usr/idc/uinput-fortsense.idc \
$(DEVICE_PATH)/configs/keylayout/uinput-fpc.kl:$(TARGET_COPY_OUT_SYSTEM)/usr/keylayout/uinput-fpc.kl \
$(DEVICE_PATH)/configs/keylayout/uinput-goodix.kl:$(TARGET_COPY_OUT_SYSTEM)/usr/keylayout/uinput-goodix.kl \
$(DEVICE_PATH)/configs/keylayout/uinput-fortsense.kl:$(TARGET_COPY_OUT_SYSTEM)/usr/keylayout/uinput-fortsense.kl
# Lineage Health
PRODUCT_PACKAGES += \
vendor.lineage.health-service.default
# NFC
PRODUCT_PACKAGES += \
NfcNci \
Tag \
SecureElement \
com.android.nfc_extras
# Overlays
PRODUCT_PACKAGES += \
ApertureResTopaz \
CarrierConfigResCommon \
FrameworksResCommon \
FrameworksResTopaz \
SettingsOverlayM7G \
SettingsOverlayM7N \
SettingsOverlayM7L \
SettingsOverlayM7IN \
SettingsResCommon \
SettingsResTopaz \
SystemUIResCommon \
SystemUIResTopaz \
TelecommResCommon \
SimpleDeviceConfig \
TelephonyResCommon \
TetheringResCommon \
NotchBarKiller \
SettingsLibCommon \
BoostFrameworkOverlay \
WifiOverlayTopaz
# Partitions
PRODUCT_USE_DYNAMIC_PARTITIONS := true
#PRODUCT_BUILD_SUPER_PARTITION := true
# Parts
PRODUCT_PACKAGES += \
XiaomiParts
# Perf
PRODUCT_COPY_FILES += \
$(DEVICE_PATH)/configs/permissions/com.qualcomm.qti.Performance.xml:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/permissions/com.qualcomm.qti.Performance.xml \
$(DEVICE_PATH)/configs/permissions/com.qualcomm.qti.UxPerformance.xml:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/permissions/com.qualcomm.qti.UxPerformance.xml
# Power
PRODUCT_PACKAGES += \
android.hardware.power-service-qti
# Properties
include $(DEVICE_PATH)/configs/properties/default.mk
# RIL
PRODUCT_PACKAGES += \
Ims \
QtiTelephony \
qti-telephony-common
# Perf
PRODUCT_PACKAGES += \
vendor.qti.hardware.perf@2.3
# Rootdir
PRODUCT_PACKAGES += \
init.recovery.qcom.rc \
init.qcom.rc
# Soong namespaces
PRODUCT_SOONG_NAMESPACES += \
$(DEVICE_PATH) \
hardware/xiaomi
# Speed profile services and wifi-service to reduce RAM and storage
PRODUCT_SYSTEM_SERVER_COMPILER_FILTER := speed-profile
PRODUCT_ALWAYS_PREOPT_EXTRACTED_APK := true
WITH_DEXPREOPT_DEBUG_INFO := false
DONT_DEXPREOPT_PREBUILTS := true
PRODUCT_DEXPREOPT_SPEED_APPS += \
Settings \
SystemUI
# Treble
PRODUCT_FULL_TREBLE_OVERRIDE := true
# Telephony
PRODUCT_PACKAGES += \
extphonelib \
extphonelib-product \
extphonelib.xml \
extphonelib_product.xml \
ims-ext-common \
ims_ext_common.xml \
qti-telephony-hidl-wrapper \
qti-telephony-hidl-wrapper-prd \
qti_telephony_hidl_wrapper.xml \
qti_telephony_hidl_wrapper_prd.xml \
qti-telephony-utils \
qti-telephony-utils-prd \
qti_telephony_utils.xml \
qti_telephony_utils_prd.xml \
telephony-ext
PRODUCT_BOOT_JARS += \
telephony-ext
# Thermal
PRODUCT_PACKAGES += \
android.hardware.thermal@2.0
# Update engine
PRODUCT_PACKAGES += \
checkpoint_gc \
otapreopt_script \
update_engine \
update_engine_sideload \
update_verifier
PRODUCT_PACKAGES_DEBUG += \
update_engine_client
# Vibrator
PRODUCT_PACKAGES += \
vendor.qti.hardware.vibrator.service.xiaomi
PRODUCT_COPY_FILES += \
$(DEVICE_PATH)/vibrator/excluded-input-devices.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/excluded-input-devices.xml