-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevice.mk
More file actions
170 lines (129 loc) · 6.78 KB
/
Copy pathdevice.mk
File metadata and controls
170 lines (129 loc) · 6.78 KB
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
#
# Copyright 2014 The 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.
#
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit_only.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base.mk)
# AVB
ifeq ($(TARGET_BUILD_VARIANT), user)
TARGET_AVB_ENABLE := true
endif
# Kernel
$(call inherit-product, device/mediatek/kernel/device.mk)
# Filesystems
$(call inherit-product, device/mediatek/fs/device.mk)
# Recovery
$(call inherit-product, device/mediatek/recovery/device.mk)
# Audio
$(call inherit-product, device/mediatek/audio/device.mk)
# USB
$(call inherit-product, device/mediatek/usb/device.mk)
# Graphics
$(call inherit-product, device/mediatek/graphics/device.mk)
# Security
$(call inherit-product, device/mediatek/security/device.mk)
# Media
$(call inherit-product, device/mediatek/media/device.mk)
# Utils
$(call inherit-product, device/mediatek/utils/device.mk)
# Fastboot
$(call inherit-product, device/mediatek/fastboot/device.mk)
# Boot
$(call inherit-product, device/mediatek/boot/device.mk)
# Binaries
$(call inherit-product, device/mediatek/binaries/device.mk)
#######################################################################
# Configs, properties, rc/xml files, modules/packages ... #
# not related to any feature folder are placed here. #
#######################################################################
# Shipping API level to Android 14
PRODUCT_SHIPPING_API_LEVEL := 34
# Set Vendor SPL to match platform
VENDOR_SECURITY_PATCH = $(PLATFORM_SECURITY_PATCH)
# Set boot SPL
BOOT_SECURITY_PATCH = $(PLATFORM_SECURITY_PATCH)
# Specify the manufacturer
PRODUCT_PRODUCT_PROPERTIES += ro.soc.manufacturer=mediatek
# Enable Incremental on the device
PRODUCT_PRODUCT_PROPERTIES += ro.incremental.enable=yes
# Increase JVM heap size
PRODUCT_PROPERTY_OVERRIDES += \
dalvik.vm.heapgrowthlimit=256m \
dalvik.vm.heapsize=256m
# Enforce permission allowlists for system apps.
PRODUCT_PROPERTY_OVERRIDES += ro.control_privapp_permissions=enforce
# Use not updatable APEXes
PRODUCT_PROPERTY_OVERRIDES += ro.apex.updatable=false
# Mediatek rc files
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/init.mediatek.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.mediatek.rc \
$(LOCAL_PATH)/init.lights.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.lights.rc
# Health: Install default binderized implementation to vendor.
PRODUCT_PACKAGES += android.hardware.health-service.batteryless
# Backlight/brightness
PRODUCT_PACKAGES += android.hardware.lights-service
# Thermal
PRODUCT_PACKAGES += com.android.hardware.thermal.mediatek
# Memtrack
PRODUCT_PACKAGES += android.hardware.memtrack-service.example
# DRM (Digital Rights Management)
PRODUCT_PACKAGES += android.hardware.drm@latest-service.clearkey
# Power HAL
PRODUCT_PACKAGES += android.hardware.power-service.example
# Update engine
PRODUCT_PACKAGES += \
update_engine \
update_engine_sideload \
update_verifier
# Persist prebuilt image
PRODUCT_CUSTOM_IMAGE_MAKEFILES += \
device/mediatek/build/custom_images/persist.mk
PRODUCT_COPY_FILES += \
device/mediatek/binaries/persist.img:$(TARGET_OUT)/persist.img
# CTS
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.software.cts.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.cts.xml
# app widget, needed for default launcher3
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.software.app_widgets.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.app_widgets.xml \
# Copy xml file to support backup function
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.software.backup.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.backup.xml
# Copy xml file to support PIN, pattern and password LOck
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.software.secure_lock_screen.xml:system/etc/permissions/android.software.secure_lock_screen.xml
# Copy xml file to tell PackageManager that the system supports Verified Boot
ifeq ($(TARGET_AVB_ENABLE), true)
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.software.verified_boot.xml:system/etc/permissions/android.software.verified_boot.xml
endif
# Copy permissions to match NXP BSP
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.ethernet.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.ethernet.xml \
frameworks/native/data/etc/android.hardware.touchscreen.multitouch.distinct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.distinct.xml \
frameworks/native/data/etc/android.hardware.touchscreen.multitouch.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.xml \
frameworks/native/data/etc/android.hardware.touchscreen.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.xml \
frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml \
frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml \
frameworks/native/data/etc/android.software.activities_on_secondary_displays.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.activities_on_secondary_displays.xml \
frameworks/native/data/etc/android.software.credentials.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.credentials.xml \
frameworks/native/data/etc/android.software.device_admin.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.device_admin.xml \
frameworks/native/data/etc/android.software.managed_users.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.managed_users.xml \
frameworks/native/data/etc/android.software.picture_in_picture.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.picture_in_picture.xml \
frameworks/native/data/etc/android.software.print.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.print.xml \
frameworks/native/data/etc/android.software.sip.voip.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.sip.voip.xml \
# Enable project quotas and casefolding for emulated storage without sdcardfs
$(call inherit-product, $(SRC_TARGET_DIR)/product/emulated_storage.mk)
# overlays
DEVICE_PACKAGE_OVERLAYS := device/mediatek/overlay