forked from dhirajms/vendor_pa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.mk
190 lines (152 loc) · 5.87 KB
/
main.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
# Copyright (C) 2013-2017 Paranoid Android
#
# 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.
export VENDOR := pa
# Include versioning information
# Format: Major.minor.maintenance(-TAG)
export PA_VERSION := 7.3.0-DEV
export ROM_VERSION := $(PA_VERSION)-$(shell date -u +%Y%m%d)
PRODUCT_PROPERTY_OVERRIDES += \
ro.modversion=$(ROM_VERSION) \
ro.pa.version=$(PA_VERSION)
# Override undesired Google defaults
PRODUCT_PROPERTY_OVERRIDES += \
keyguard.no_require_sim=true \
ro.com.android.dateformat=MM-dd-yyyy \
ro.com.android.wifi-watchlist=GoogleGuest \
ro.com.google.clientidbase=android-google \
ro.url.legal=http://www.google.com/intl/%s/mobile/android/basic/phone-legal.html \
ro.url.legal.android_privacy=http://www.google.com/intl/%s/mobile/android/basic/privacy.html \
ro.setupwizard.require_network=any \
ro.setupwizard.mode=OPTIONAL \
ro.opa.eligible_device=true
# Override old AOSP default sounds with newer Google stock ones
PRODUCT_PROPERTY_OVERRIDES += \
ro.config.alarm_alert=Osmium.ogg \
ro.config.notification_sound=Ariel.ogg \
ro.config.ringtone=Titania.ogg
# Enable SIP+VoIP
PRODUCT_COPY_FILES += frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml
# Don't Hide APNs
PRODUCT_PROPERTY_OVERRIDES += persist.sys.hideapn=false
# Include vendor overlays
PRODUCT_PACKAGE_OVERLAYS += vendor/pa/overlay/common
PRODUCT_PACKAGE_OVERLAYS += vendor/pa/overlay/$(TARGET_PRODUCT)
# Recommend using the non debug dexpreopter
USE_DEX2OAT_DEBUG := false
# Include APN information
PRODUCT_COPY_FILES += vendor/pa/prebuilt/etc/apns-conf.xml:system/etc/apns-conf.xml
# Include support for preconfigured permissions
PRODUCT_COPY_FILES += vendor/pa/prebuilt/etc/default-permissions/pa-permissions.xml:system/etc/default-permissions/pa-permissions.xml
# Copy PA specific init file
PRODUCT_COPY_FILES += vendor/pa/prebuilt/root/init.pa.rc:root/init.pa.rc
# Include support for additional filesystems
PRODUCT_PACKAGES += \
e2fsck \
mke2fs \
tune2fs \
mount.exfat \
fsck.exfat \
mkfs.exfat \
ntfsfix \
ntfs-3g
# Include support for GApps backup
PRODUCT_COPY_FILES += \
vendor/pa/prebuilt/install/bin/backuptool.functions:install/bin/backuptool.functions \
vendor/pa/prebuilt/install/bin/backuptool.sh:install/bin/backuptool.sh \
vendor/pa/prebuilt/addon.d/50-backuptool.sh:system/addon.d/50-backuptool.sh
# Include PA GApps config
PRODUCT_COPY_FILES += \
vendor/pa/prebuilt/install/gapps-config.txt:install/gapps-config.txt
# Include hostapd configuration
PRODUCT_COPY_FILES += \
vendor/pa/prebuilt/etc/hostapd/hostapd_default.conf:system/etc/hostapd/hostapd_default.conf \
vendor/pa/prebuilt/etc/hostapd/hostapd.deny:system/etc/hostapd/hostapd.deny \
vendor/pa/prebuilt/etc/hostapd/hostapd.accept:system/etc/hostapd/hostapd.accept
# Build Chromium for Snapdragon (PA Browser)
PRODUCT_PACKAGES += PABrowser
# Include hostapd configuration
PRODUCT_COPY_FILES += \
vendor/pa/prebuilt/etc/hostapd/hostapd_default.conf:system/etc/hostapd/hostapd_default.conf \
vendor/pa/prebuilt/etc/hostapd/hostapd.deny:system/etc/hostapd/hostapd.deny \
vendor/pa/prebuilt/etc/hostapd/hostapd.accept:system/etc/hostapd/hostapd.accept
# Build Snapdragon apps
PRODUCT_PACKAGES += \
SnapdragonGallery \
SnapdragonMusic
# Include explicitly to workaround GMS issues
PRODUCT_PACKAGES += \
libprotobuf-cpp-full \
librsjni
# Build sound recorder
PRODUCT_PACKAGES += SoundRecorder
# Build ParanoidHub
PRODUCT_PACKAGES += ParanoidHub
# Build WallpaperPicker
PRODUCT_PACKAGES += WallpaperPicker
# Build ParanoidPapers
PRODUCT_PACKAGES += ParanoidPapers
# Include the custom PA bootanimation
ifeq ($(TARGET_BOOT_ANIMATION_RES),480)
PRODUCT_COPY_FILES += vendor/pa/prebuilt/bootanimation/480.zip:system/media/bootanimation.zip
endif
ifeq ($(TARGET_BOOT_ANIMATION_RES),720)
PRODUCT_COPY_FILES += vendor/pa/prebuilt/bootanimation/720.zip:system/media/bootanimation.zip
endif
ifeq ($(TARGET_BOOT_ANIMATION_RES),1080)
PRODUCT_COPY_FILES += vendor/pa/prebuilt/bootanimation/1080.zip:system/media/bootanimation.zip
endif
ifeq ($(TARGET_BOOT_ANIMATION_RES),1440)
PRODUCT_COPY_FILES += vendor/pa/prebuilt/bootanimation/1440.zip:system/media/bootanimation.zip
endif
# Clear security patch level
PLATFORM_SECURITY_PATCH :=
PRODUCT_PROPERTY_OVERRIDES += \
ro.build.selinux=1
ifeq ($(TARGET_BUILD_VARIANT),user)
ADDITIONAL_DEFAULT_PROPERTIES += ro.adb.secure=1
else
ADDITIONAL_DEFAULT_PROPERTIES += ro.adb.secure=0
endif
# Squisher Location
SQUISHER_SCRIPT := vendor/pa/tools/squisher
# AOSPA services
PRODUCT_PACKAGES += pa-services
PRODUCT_PACKAGES += co.aospa.power.ShutdownAOSPA.xml
PRODUCT_BOOT_JARS += pa-services
# TCP Connection Management
PRODUCT_PACKAGES += tcmiface
PRODUCT_BOOT_JARS += tcmiface
# RCS Service
PRODUCT_PACKAGES += \
rcscommon \
rcscommon.xml \
rcsservice \
rcs_service_aidl \
rcs_service_aidl.xml \
rcs_service_aidl_static \
rcs_service_api \
rcs_service_api.xml
# Telephony packages
PRODUCT_PACKAGES += \
telephony-ext
PRODUCT_BOOT_JARS += \
telephony-ext
# Bluetooth Audio (A2DP)
PRODUCT_PACKAGES += libbthost_if
# Substratum
PRODUCT_PACKAGES += ThemeInterfacer
# Include vendor SEPolicy changes
include vendor/pa/sepolicy/sepolicy.mk
# Include proprietary header flags if vendor/head exists
-include vendor/head/head-capabilities.mk