-
Notifications
You must be signed in to change notification settings - Fork 1
/
device.mk
219 lines (177 loc) · 6.32 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
#
# Copyright (C) 2020 Android Open Source Project
#
# 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.
#
DEVICE_PATH := device/oneplus/pickle
# Installs gsi keys into ramdisk, to boot a GSI with verified boot.
$(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_keys.mk)
# Enable updating of APEXes
$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
# Setup dalvik vm configs
$(call inherit-product, frameworks/native/build/phone-xhdpi-6144-dalvik-heap.mk)
# Virtual A/B
$(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota.mk)
# Dynamic Partition
PRODUCT_USE_DYNAMIC_PARTITIONS := true
PRODUCT_BUILD_SUPER_PARTITION := false
#Suppot to compile recovery without msm headers
TARGET_HAS_GENERIC_KERNEL_HEADERS := true
# VNDK
PRODUCT_SHIPPING_API_LEVEL := 30
PRODUCT_TARGET_VNDK_VERSION := 30
PRODUCT_EXTRA_VNDK_VERSIONS := 30
# Boot animation
TARGET_SCREEN_HEIGHT := 2400
TARGET_SCREEN_WIDTH := 1080
# Audio
PRODUCT_PACKAGES += \
tinymix
PRODUCT_COPY_FILES += \
frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:$(TARGET_COPY_OUT_PRODUCT)/vendor_overlay/$(PRODUCT_TARGET_VNDK_VERSION)/etc/a2dp_audio_policy_configuration.xml \
frameworks/av/services/audiopolicy/config/a2dp_in_audio_policy_configuration.xml:$(TARGET_COPY_OUT_PRODUCT)/vendor_overlay/$(PRODUCT_TARGET_VNDK_VERSION)/etc/a2dp_in_audio_policy_configuration.xml \
frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration.xml:$(TARGET_COPY_OUT_PRODUCT)/vendor_overlay/$(PRODUCT_TARGET_VNDK_VERSION)/etc/bluetooth_audio_policy_configuration.xml \
$(LOCAL_PATH)/config/audio/audio_policy_configuration.xml::$(TARGET_COPY_OUT_PRODUCT)/vendor_overlay/$(PRODUCT_TARGET_VNDK_VERSION)/etc/audio_policy_configuration.xml
# A/B
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
# Boot control HAL
PRODUCT_PACKAGES += \
android.hardware.boot@1.1-mtkimpl.recovery \
android.hardware.boot@1.1-mtkimpl
PRODUCT_PACKAGES_DEBUG += \
bootctrl
# Build MT-PL-Utils
PRODUCT_PACKAGES += \
mtk_plpath_utils \
mtk_plpath_utils.recovery
# GCamGo Prebuilts
PRODUCT_PACKAGES += \
GCamGoPrebuilts
# fastbootd
PRODUCT_PACKAGES += \
fastbootd \
android.hardware.fastboot@1.0-impl-mock
# Fstab in ramdisk
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/rootdir/etc/fstab.mt6895:$(TARGET_COPY_OUT_RAMDISK)/first_stage_ramdisk/fstab.mt6895 \
$(LOCAL_PATH)/rootdir/etc/fstab.mt6895:$(TARGET_COPY_OUT_RAMDISK)/first_stage_ramdisk/fstab.mt6895 \
$(LOCAL_PATH)/rootdir/etc/fstab.mt6895:$(TARGET_COPY_OUT_RAMDISK)/fstab.mt6895 \
$(LOCAL_PATH)/rootdir/etc/fstab.mt6895:$(TARGET_COPY_OUT_RAMDISK)/fstab.mt6895 \
$(LOCAL_PATH)/rootdir/etc/fstab.mt6895:recovery/root/first_stage_ramdisk/fstab.mt6895 \
$(LOCAL_PATH)/rootdir/etc/fstab.mt6895:recovery/root/first_stage_ramdisk/fstab.mt6895
# F2FS
PRODUCT_PACKAGES += \
sg_write_buffer \
f2fs_io \
check_f2fs
# HIDL
PRODUCT_PACKAGES += \
android.hidl.base@1.0 \
android.hidl.manager@1.0 \
libhidltransport
# IFAA manager
PRODUCT_PACKAGES += \
org.ifaa.android.manager
PRODUCT_BOOT_JARS += \
org.ifaa.android.manager
# IMS
PRODUCT_BOOT_JARS += \
mediatek-common \
mediatek-framework \
mediatek-ims-base \
mediatek-ims-common \
mediatek-telecom-common \
mediatek-telephony-base \
mediatek-telephony-common
PRODUCT_PACKAGES += \
ImsServiceBase \
libshim_vtservice
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/config/permissions/privapp-permissions-mediatek.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/privapp-permissions-mediatek.xml
# Copy the kernel dtb from the prebuilts directory.
ifeq ($(IS_GLOBAL),true)
PRODUCT_COPY_FILES += \
$(CHOPIN_PREBUILT)/base/Global/dtb.img:dtb.img
else
PRODUCT_COPY_FILES += \
$(CHOPIN_PREBUILT)/base/China/dtb.img:dtb.img
endif
# Keylayout
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/config/keylayout/uinput-fpc.kl:$(TARGET_COPY_OUT_SYSTEM)/usr/keylayout/uinput-fpc.kl \
$(LOCAL_PATH)/config/keylayout/uinput-goodix.kl:$(TARGET_COPY_OUT_SYSTEM)/usr/keylayout/uinput-goodix.kl \
$(LOCAL_PATH)/config/keylayout/mtk-kpd.kl:$(TARGET_COPY_OUT_SYSTEM)/usr/keylayout/mtk-kpd.kl
# Lights
PRODUCT_PACKAGES += \
android.hardware.lights-service.chopin
# Location Provider
ifeq ($(USE_CN_AGPS),true)
PRODUCT_PACKAGES += \
AMapLocationProvider
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/config/gps/gps_debug.conf:$(TARGET_COPY_OUT_PRODUCT)/vendor_overlay/$(PRODUCT_TARGET_VNDK_VERSION)/etc/gps_debug.conf
endif
# NFC
PRODUCT_PACKAGES += \
NfcNci \
com.android.nfc_extras \
Tag \
SecureElement
# Overlays
DEVICE_PACKAGE_OVERLAYS += \
$(LOCAL_PATH)/overlay \
$(LOCAL_PATH)/overlay-lineage
PRODUCT_PACKAGES += \
FrameworkResOverlayPickle \
WifiResOverlayPickle \
SystemUIOverlayPickle \
TelephonyOverlayPickle
# Overlays - override vendor ones
PRODUCT_PACKAGES += \
FrameworksResCommon \
FrameworksResTarget \
DevicesOverlay \
DevicesAndroidOverlay
# Rootdir
PRODUCT_PACKAGES += \
init.recovery.mt6895.rc \
init.recovery.usb.rc \
init.mt6895.rc \
setup_MTK_In-Call_volume_adjust.sh \
init.mtkincalladj.rc
# Screen density
PRODUCT_AAPT_CONFIG := xxxhdpi
PRODUCT_AAPT_PREF_CONFIG := xxxhdpi
# Soong namespaces
PRODUCT_SOONG_NAMESPACES += \
$(LOCAL_PATH)
# Properties
include $(LOCAL_PATH)/config/prop/default.mk
# Update engine
PRODUCT_PACKAGES += \
checkpoint_gc \
otapreopt_script \
update_engine \
update_engine_sideload \
update_verifier
PRODUCT_PACKAGES_DEBUG += \
update_engine_client