forked from opengapps/aosp_build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
opengapps-files.mk
164 lines (141 loc) · 7.41 KB
/
opengapps-files.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
GAPPS_NEXUS2015_CODENAMES += \
%angler \
%bullhead
GAPPS_NEXUS_CODENAMES += \
%maguro \
%toro \
%toroplus \
%grouper \
%tilapia \
%manta \
%mako \
%flo \
%deb \
%hammerhead \
%flounder \
%shamu \
$(GAPPS_NEXUS2015_CODENAMES)
GAPPS_PIXEL2016_CODENAMES += \
%marlin \
%sailfish
GAPPS_PIXEL2017_CODENAMES += \
%muskie \
%taimen \
%wahoo \
%walleye
GAPPS_PIXEL2018_CODENAMES += \
%blueline \
%crosshatch
GAPPS_PIXEL_CODENAMES += \
$(GAPPS_PIXEL2016_CODENAMES) \
$(GAPPS_PIXEL2017_CODENAMES) \
$(GAPPS_PIXEL2018_CODENAMES)
gapps_etc_files := $(call gapps-copy-to-system,all,etc)
gapps_framework_files := $(call gapps-copy-to-system,all,framework)
# Remove experimental2015 camera on non-Nexus 2015 devices
ifeq ($(filter $(GAPPS_NEXUS2015_CODENAMES),$(TARGET_PRODUCT)),)
gapps_etc_files := $(filter-out %permissions/com.google.android.camera.experimental2015.xml,$(gapps_etc_files))
gapps_framework_files := $(filter-out %com.google.android.camera.experimental2015.jar,$(gapps_framework_files))
endif
# Remove experimental2016 camera on non-Pixel 2016 devices
ifeq ($(filter $(GAPPS_PIXEL2016_CODENAMES),$(TARGET_PRODUCT)),)
gapps_etc_files := $(filter-out %permissions/com.google.android.camera.experimental2016.xml,$(gapps_etc_files))
gapps_framework_files := $(filter-out %com.google.android.camera.experimental2016.jar,$(gapps_framework_files))
endif
# Remove experimental2017 camera on non-Pixel 2017 devices
ifeq ($(filter $(GAPPS_PIXEL2017_CODENAMES),$(TARGET_PRODUCT)),)
gapps_etc_files := $(filter-out %permissions/com.google.android.camera.experimental2017.xml,$(gapps_etc_files))
gapps_framework_files := $(filter-out %com.google.android.camera.experimental2017.jar,$(gapps_framework_files))
endif
# Remove experimental2018 camera on non-Pixel 2018 devices
ifeq ($(filter $(GAPPS_PIXEL2018_CODENAMES),$(TARGET_PRODUCT)),)
gapps_etc_files := $(filter-out %permissions/com.google.android.camera.experimental2018.xml,$(gapps_etc_files))
gapps_framework_files := $(filter-out %com.google.android.camera.experimental2018.jar,$(gapps_framework_files))
endif
# Remove google_build.xml and nexus.xml on non-Pixel devices
ifeq ($(filter $(GAPPS_PIXEL_CODENAMES),$(TARGET_PRODUCT)),)
gapps_etc_files := $(filter-out %sysconfig/google_build.xml,$(gapps_etc_files))
gapps_etc_files := $(filter-out %sysconfig/nexus.xml,$(gapps_etc_files))
endif
# Copy pixel_experience_2017.xml on 2017 and later Pixels
ifeq ($(filter $(GAPPS_PIXEL2017_CODENAMES) $(GAPPS_PIXEL2018_CODENAMES),$(TARGET_PRODUCT)),)
gapps_etc_files := $(filter-out %sysconfig/pixel_experience_2017.xml,$(gapps_etc_files))
endif
# Only copy pixel_experience_2018 on 2018 Pixels
ifeq ($(filter $(GAPPS_PIXEL2018_CODENAMES),$(TARGET_PRODUCT)),)
gapps_etc_files := $(filter-out %sysconfig/pixel_experience_2018.xml,$(gapps_etc_files))
endif
# Copy pixel_YEAR_exclusive on a Pixel's corresponding year
ifeq ($(filter $(GAPPS_PIXEL2017_CODENAMES),$(TARGET_PRODUCT)),)
gapps_etc_files := $(filter-out %sysconfig/pixel_2017_exclusive.xml,$(gapps_etc_files))
endif
ifeq ($(filter $(GAPPS_PIXEL2018_CODENAMES),$(TARGET_PRODUCT)),)
gapps_etc_files := $(filter-out %sysconfig/pixel_2018_exclusive.xml,$(gapps_etc_files))
endif
# This is included as part of GoogleDialer build, for devices that have the
# GoogleDialer
gapps_etc_files := $(filter-out %sysconfig/dialer_experience.xml,$(gapps_etc_files))
# Use separate opengapps-permissions for Q+
ifneq ($(filter 29,$(call get-allowed-api-levels)),)
gapps_etc_files := $(filter-out %default-permissions/opengapps-permissions.xml,$(gapps_etc_files))
else
gapps_etc_files := $(filter-out %default-permissions/opengapps-permissions-q.xml,$(gapps_etc_files))
endif
# For ATV, only install a limited set of etc and framework files
ifneq ($(filter tvmini,$(TARGET_GAPPS_VARIANT)),)
gapps_etc_files := \
vendor/opengapps/sources/all/etc/permissions/privapp-permissions-atv.xml:$(TARGET_COPY_OUT_SYSTEM)/etc//permissions/privapp-permissions-atv.xml \
vendor/opengapps/sources/all/etc/sysconfig/google.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysconfig/google.xml \
vendor/opengapps/sources/all/etc/sysconfig/google_atv.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysconfig/google_atv.xml \
vendor/opengapps/sources/all/etc/sysconfig/google_build.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysconfig/google_build.xml \
vendor/opengapps/sources/all/etc/permissions/privapp-permissions-google.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/privapp-permissions-google.xml \
vendor/opengapps/sources/all/etc/sysconfig/google-hiddenapi-package-whitelist.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysconfig/google-hiddenapi-package-whitelist.xml
ifneq ($(filter 28, $(call get-allowed-api-levels)),)
gapps_framework_files :=
else
gapps_framework_files := \
vendor/opengapps/sources/all/etc/permissions/com.google.android.pano.v1.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/com.google.android.pano.v1.xml \
vendor/opengapps/sources/all/etc/permissions/com.google.widevine.software.drm.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/com.google.widevine.software.drm.xml \
vendor/opengapps/sources/all/framework/24/com.google.android.pano.v1.jar:$(TARGET_COPY_OUT_SYSTEM)/framework/com.google.android.pano.v1.jar
ifneq ($(filter 25, $(call get-allowed-api-levels)),)
gapps_framework_files += \
vendor/opengapps/sources/all/framework/25/com.google.widevine.software.drm.jar:$(TARGET_COPY_OUT_SYSTEM)/framework/com.google.widevine.software.drm.jar
else
gapps_framework_files += \
vendor/opengapps/sources/all/framework/24/com.google.widevine.software.drm.jar:$(TARGET_COPY_OUT_SYSTEM)/framework/com.google.widevine.software.drm.jar
endif
endif
else
# Filter out tv related files
gapps_etc_files := $(filter-out %sysconfig/google_atv.xml,$(gapps_etc_files))
gapps_etc_files := $(filter-out %permissions/privapp-permissions-atv.xml,$(gapps_etc_files))
gapps_etc_files := $(filter-out %permissions/com.google.android.pano.v1.xml,$(gapps_etc_files))
gapps_etc_files := $(filter-out %permissions/com.google.android.tv.installed.xml,$(gapps_etc_files))
gapps_framework_files := $(filter-out %com.google.android.pano.v1.jar,$(gapps_framework_files))
endif
PRODUCT_COPY_FILES += $(gapps_etc_files) $(gapps_framework_files)
# check if we are building a vendor image
ifneq ($(CALLED_FROM_SETUP),true)
ifneq ($(filter 28, $(call get-allowed-api-levels)),)
BUILD_VENDORIMAGE := $(shell CALLED_FROM_SETUP=true build/soong/soong_ui.bash --dumpvar-mode BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE)
else
BUILD_VENDORIMAGE := $(shell CALLED_FROM_SETUP=true BUILD_SYSTEM=build/core \
command make --no-print-directory -f build/core/config.mk dumpvar-BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE)
endif
endif
# Pico and higher
ifneq ($(filter pico,$(TARGET_GAPPS_VARIANT)),)
# vendor/pittpatt seems to be removed on N+ (so only copy it to older than N)
ifeq ($(filter 24,$(call get-allowed-api-levels)),)
PITTPATT_COPY_FILES := $(call gapps-copy-to-system,all,vendor/pittpatt)
# if we are building a vendor image, then we cannot copy to system/vendor, so update our copy statements.
ifdef BUILD_VENDORIMAGE
PITTPATT_COPY_FILES := $(subst :system/vendor/pittpatt,:vendor/pittpatt,$(PITTPATT_COPY_FILES))
endif
PRODUCT_COPY_FILES += $(PITTPATT_COPY_FILES)
endif
PRODUCT_COPY_FILES += $(call gapps-copy-to-system,all,usr/srec)
endif
# Reset internal variables
gapps_etc_files :=
gapps_framework_files :=