-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pather.mk
More file actions
98 lines (85 loc) · 4.56 KB
/
Copy pather.mk
File metadata and controls
98 lines (85 loc) · 4.56 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
############################################################################
#
# Copyright (C) 2020-2025 steadfasterX <steadfasterX@binbash.rocks>
#
# 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.
#
############################################################################
VENDOR_DIR := vendor/extendrom
ifeq ($(ENABLE_EXTENDROM), true)
##########################################
# boot debugger
ifeq ($(EXTENDROM_BOOT_DEBUG), true)
ifeq ($(call math_gt_or_eq,$(PLATFORM_SDK_VERSION),30),true)
ifeq ($(EXTENDROM_INTERCEPT_INSTALLSRC), true)
BOARD_VENDOR_SEPOLICY_DIRS += $(VENDOR_DIR)/sepolicy/property
endif # EXTENDROM_INTERCEPT_INSTALLSRC
BOARD_VENDOR_SEPOLICY_DIRS += $(VENDOR_DIR)/sepolicy/boot_debug
else
ifeq ($(EXTENDROM_INTERCEPT_INSTALLSRC), true)
BOARD_SEPOLICY_DIRS += $(VENDOR_DIR)/sepolicy/property
endif # EXTENDROM_INTERCEPT_INSTALLSRC
BOARD_SEPOLICY_DIRS += $(VENDOR_DIR)/sepolicy/boot_debug
endif # PLATFORM_SDK_VERSION >= 11
PRODUCT_PACKAGES += \
er-logcat
ifeq ($(call math_gt_or_eq,$(PLATFORM_SDK_VERSION),30), true)
PRODUCT_COPY_FILES += \
$(VENDOR_DIR)/config/init.er.rc:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/init/init.extendrom.rc
else
PRODUCT_COPY_FILES += \
$(VENDOR_DIR)/config/init.er.rc:$(TARGET_COPY_OUT_SYSTEM)/etc/init/init.extendrom.rc
endif # call math_gt_or_eq = true
endif # EXTENDROM_BOOT_DEBUG = true
# include package definitions generated by er.sh (NEVER use inherit!)
-include vendor/extendrom/packages.mk
# Android 11 introduced the /system_ext partition to avoid writing
# stuff into /system. If a device has PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS set
# writing to /system will be even prohibited and a build will fail.
# extendrom will use /system_ext as default when A11 or later to satisfy this.
# see: https://source.android.com/docs/core/architecture/partitions/product-interfaces#about-the-artifact-path-requirements
#
# Some apps and settings REQUIRE to be installed into /system though.
# 1. add them here to exclude them from the "require-artifacts-in-path" check
# 2. add an exception in tools/extract_utils.sh to not use /system_ext for them
#
# we need to ensure the allowed list gets included only once, otherwise this would cause errors like this:
# > build/make/core/artifact_path_requirements.mk:31: warning: device/google/sunfish/lineage_sunfish.mk includes redundant artifact path requirement allowed list entries.
# > Offending entries:
# > system/priv-app/Phonesky_AXP-OS_testing/Phonesky_AXP-OS_testing.apk
# > In file included from build/make/core/main.mk:1173:
# > build/make/core/artifact_path_requirements.mk:31: error: Build failed.
#EXTENDROM_FLAG_FILE := $(OUT_DIR)/.extendrom_artifacts_added
#ifneq ($(wildcard $(EXTENDROM_FLAG_FILE)),)
#$(warning EXTENDROM: skipping artifact path additions (already added))
#else
#$(shell mkdir -p $(dir $(EXTENDROM_FLAG_FILE)) && touch $(EXTENDROM_FLAG_FILE))
#PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST := \
# $(TARGET_COPY_OUT_SYSTEM)/priv-app/Phonesky_AXP-OS/Phonesky_AXP-OS.apk \
# $(TARGET_COPY_OUT_SYSTEM)/priv-app/Phonesky_AXP-OS_testing/Phonesky_AXP-OS_testing.apk \
# $(TARGET_COPY_OUT_SYSTEM)/etc/default-permissions/er_default-permissions-com.android.vending-phonesky.xml \
# $(TARGET_COPY_OUT_SYSTEM)/etc/permissions/er_privapp-permissions-com.android.vending-phonesky.xml \
# $(TARGET_COPY_OUT_SYSTEM)/etc/microg.xml
#$(shell echo "$(PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST)" > $(EXTENDROM_FLAG_FILE))
#endif
# Always append
PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \
$(TARGET_COPY_OUT_SYSTEM)/priv-app/Phonesky_AXP-OS/Phonesky_AXP-OS.apk \
$(TARGET_COPY_OUT_SYSTEM)/priv-app/Phonesky_AXP-OS_testing/Phonesky_AXP-OS_testing.apk \
$(TARGET_COPY_OUT_SYSTEM)/etc/default-permissions/er_default-permissions-com.android.vending-phonesky.xml \
$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/er_privapp-permissions-com.android.vending-phonesky.xml \
$(TARGET_COPY_OUT_SYSTEM)/etc/microg.xml
# Deduplicate
PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST := \
$(sort $(PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST))
endif # ENABLE_EXTENDROM = true