-
Notifications
You must be signed in to change notification settings - Fork 672
/
common.mk
234 lines (186 loc) · 6.71 KB
/
common.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
# Allow vendor/extra to override any property by setting it first
$(call inherit-product-if-exists, vendor/extra/product.mk)
PRODUCT_BRAND ?= LineageOS
PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0
ifeq ($(PRODUCT_GMS_CLIENTID_BASE),)
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
ro.com.google.clientidbase=android-google
else
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
ro.com.google.clientidbase=$(PRODUCT_GMS_CLIENTID_BASE)
endif
ifeq ($(TARGET_BUILD_VARIANT),eng)
# Disable ADB authentication
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += ro.adb.secure=0
else
ifdef WITH_ADB_INSECURE
# Forcebly disable ADB authentication
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += ro.adb.secure=0
else
# Enable ADB authentication
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += ro.adb.secure=1
endif
# Disable extra StrictMode features on all non-engineering builds
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += persist.sys.strictmode.disable=true
endif
# Backup Tool
PRODUCT_COPY_FILES += \
vendor/lineage/prebuilt/common/bin/backuptool.sh:install/bin/backuptool.sh \
vendor/lineage/prebuilt/common/bin/backuptool.functions:install/bin/backuptool.functions \
vendor/lineage/prebuilt/common/bin/50-lineage.sh:$(TARGET_COPY_OUT_SYSTEM)/addon.d/50-lineage.sh
PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \
system/addon.d/50-lineage.sh
ifneq ($(strip $(AB_OTA_PARTITIONS) $(AB_OTA_POSTINSTALL_CONFIG)),)
PRODUCT_COPY_FILES += \
vendor/lineage/prebuilt/common/bin/backuptool_ab.sh:$(TARGET_COPY_OUT_SYSTEM)/bin/backuptool_ab.sh \
vendor/lineage/prebuilt/common/bin/backuptool_ab.functions:$(TARGET_COPY_OUT_SYSTEM)/bin/backuptool_ab.functions \
vendor/lineage/prebuilt/common/bin/backuptool_postinstall.sh:$(TARGET_COPY_OUT_SYSTEM)/bin/backuptool_postinstall.sh
PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \
system/bin/backuptool_ab.sh \
system/bin/backuptool_ab.functions \
system/bin/backuptool_postinstall.sh
ifneq ($(TARGET_BUILD_VARIANT),user)
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
ro.ota.allow_downgrade=true
endif
endif
# Lineage-specific broadcast actions whitelist
PRODUCT_COPY_FILES += \
vendor/lineage/config/permissions/lineage-sysconfig.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/sysconfig/lineage-sysconfig.xml
# Lineage-specific init rc file
PRODUCT_COPY_FILES += \
vendor/lineage/prebuilt/common/etc/init/init.lineage-system_ext.rc:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/init/init.lineage-system_ext.rc
# Enable Android Beam on all targets
PRODUCT_COPY_FILES += \
vendor/lineage/config/permissions/android.software.nfc.beam.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/android.software.nfc.beam.xml
# Enable SIP+VoIP on all targets
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.software.sip.voip.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/android.software.sip.voip.xml
# Enable wireless Xbox 360 controller support
PRODUCT_COPY_FILES += \
frameworks/base/data/keyboards/Vendor_045e_Product_028e.kl:$(TARGET_COPY_OUT_PRODUCT)/usr/keylayout/Vendor_045e_Product_0719.kl
# This is Lineage!
PRODUCT_COPY_FILES += \
vendor/lineage/config/permissions/org.lineageos.android.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/org.lineageos.android.xml
# Enforce privapp-permissions whitelist
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
ro.control_privapp_permissions=enforce
ifneq ($(TARGET_DISABLE_LINEAGE_SDK), true)
# Lineage SDK
include vendor/lineage/config/lineage_sdk_common.mk
endif
# Do not include art debug targets
PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD := false
# Strip the local variable table and the local variable type table to reduce
# the size of the system image. This has no bearing on stack traces, but will
# leave less information available via JDWP.
PRODUCT_MINIMIZE_JAVA_DEBUG_INFO := true
# Disable vendor restrictions
PRODUCT_RESTRICT_VENDOR_FILES := false
ifneq ($(TARGET_DISABLE_EPPE),true)
# Require all requested packages to exist
$(call enforce-product-packages-exist-internal,$(wildcard device/*/$(LINEAGE_BUILD)/$(TARGET_PRODUCT).mk),product_manifest.xml rild Calendar Launcher3 Launcher3Go Launcher3QuickStep Launcher3QuickStepGo android.hidl.memory@1.0-impl.vendor vndk_apex_snapshot_package)
endif
# Bootanimation
TARGET_SCREEN_WIDTH ?= 1080
TARGET_SCREEN_HEIGHT ?= 1920
PRODUCT_PACKAGES += \
bootanimation.zip
# Build Manifest
PRODUCT_PACKAGES += \
build-manifest
# Lineage packages
PRODUCT_PACKAGES += \
LineageParts \
LineageSettingsProvider \
LineageSetupWizard \
Updater
PRODUCT_COPY_FILES += \
vendor/lineage/prebuilt/common/etc/init/init.lineage-updater.rc:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/init/init.lineage-updater.rc
# Config
PRODUCT_PACKAGES += \
SimpleDeviceConfig \
SimpleSettingsConfig
# Extra tools in Lineage
PRODUCT_PACKAGES += \
bash \
curl \
getcap \
htop \
nano \
setcap \
vim
PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \
system/bin/curl \
system/bin/getcap \
system/bin/setcap
# Filesystems tools
PRODUCT_PACKAGES += \
fsck.ntfs \
mkfs.ntfs \
mount.ntfs
PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \
system/bin/fsck.ntfs \
system/bin/mkfs.ntfs \
system/bin/mount.ntfs \
system/%/libfuse-lite.so \
system/%/libntfs-3g.so
# Openssh
PRODUCT_PACKAGES += \
scp \
sftp \
ssh \
sshd \
sshd_config \
ssh-keygen \
start-ssh
PRODUCT_COPY_FILES += \
vendor/lineage/prebuilt/common/etc/init/init.openssh.rc:$(TARGET_COPY_OUT_PRODUCT)/etc/init/init.openssh.rc
# rsync
PRODUCT_PACKAGES += \
rsync
# Storage manager
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
ro.storage_manager.enabled=true
# These packages are excluded from user builds
PRODUCT_PACKAGES_DEBUG += \
procmem
ifneq ($(TARGET_BUILD_VARIANT),user)
PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \
system/bin/procmem
endif
# Root
PRODUCT_PACKAGES += \
adb_root
ifneq ($(TARGET_BUILD_VARIANT),user)
ifeq ($(WITH_SU),true)
PRODUCT_PACKAGES += \
su
endif
endif
# SystemUI
PRODUCT_DEXPREOPT_SPEED_APPS += \
SystemUI
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
dalvik.vm.systemuicompilerfilter=speed
PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS += vendor/lineage/overlay/no-rro
PRODUCT_PACKAGE_OVERLAYS += \
vendor/lineage/overlay/common \
vendor/lineage/overlay/no-rro
PRODUCT_PACKAGES += \
DocumentsUIOverlay \
NetworkStackOverlay
# Translations
CUSTOM_LOCALES += \
ast_ES \
gd_GB \
cy_GB \
fur_IT
PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS += vendor/crowdin/overlay
PRODUCT_PACKAGE_OVERLAYS += vendor/crowdin/overlay
PRODUCT_EXTRA_RECOVERY_KEYS += \
vendor/lineage/build/target/product/security/lineage
include vendor/lineage/config/version.mk
-include vendor/lineage-priv/keys/keys.mk
-include $(WORKSPACE)/build_env/image-auto-bits.mk
-include vendor/lineage/config/partner_gms.mk