blob: 5e7d3949366ee6e7ce22a4d5d9f0b4fa0be7ad46 [file] [log] [blame]
Christopher N. Hessee4a40882018-09-21 23:00:26 +02001# Allow vendor/extra to override any property by setting it first
2$(call inherit-product-if-exists, vendor/extra/product.mk)
3
Dan Pasanen03447712016-12-19 11:22:55 -06004PRODUCT_BRAND ?= LineageOS
Ricardo Cerqueira6ed03ff2011-11-28 16:37:47 +00005
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +00006PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0
7
Steve Kondik5a27f632013-11-06 13:55:11 -08008ifeq ($(PRODUCT_GMS_CLIENTID_BASE),)
Rashed Abdel-Tawabb6fb3e12018-03-02 10:21:37 -05009PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
Steve Kondik5a27f632013-11-06 13:55:11 -080010 ro.com.google.clientidbase=android-google
11else
Rashed Abdel-Tawabb6fb3e12018-03-02 10:21:37 -050012PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
Steve Kondik5a27f632013-11-06 13:55:11 -080013 ro.com.google.clientidbase=$(PRODUCT_GMS_CLIENTID_BASE)
14endif
15
Arne Coucheron61536d42016-09-09 00:04:09 +020016# Default notification/alarm sounds
Rashed Abdel-Tawabb6fb3e12018-03-02 10:21:37 -050017PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
Arne Coucheron61536d42016-09-09 00:04:09 +020018 ro.config.notification_sound=Argon.ogg \
Zhao Wei Liew805a7a22016-10-03 15:30:05 +080019 ro.config.alarm_alert=Hassium.ogg
Arne Coucheron61536d42016-09-09 00:04:09 +020020
Ricardo Cerqueiraed634842015-09-12 00:13:01 +010021ifneq ($(TARGET_BUILD_VARIANT),user)
Steve Kondike4f938c2014-02-04 22:59:01 -080022# Thank you, please drive thru!
Rashed Abdel-Tawabb6fb3e12018-03-02 10:21:37 -050023PRODUCT_SYSTEM_DEFAULT_PROPERTIES += persist.sys.dun.override=0
Ricardo Cerqueiraed634842015-09-12 00:13:01 +010024endif
Steve Kondike4f938c2014-02-04 22:59:01 -080025
codeworkxd51aef22018-09-14 14:35:14 +020026ifeq ($(TARGET_BUILD_VARIANT),eng)
27# Disable ADB authentication
28PRODUCT_SYSTEM_DEFAULT_PROPERTIES += ro.adb.secure=0
29else
Chirayu Desai59df3632013-02-15 21:16:39 +053030# Enable ADB authentication
Bruno Martinse68dd972018-03-06 09:42:15 -060031PRODUCT_SYSTEM_DEFAULT_PROPERTIES += ro.adb.secure=1
Chirayu Desai88401db2013-03-20 16:17:17 +053032endif
Chirayu Desai59df3632013-02-15 21:16:39 +053033
Warren Togamib1637c82012-03-03 22:37:42 -100034# Backup Tool
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000035PRODUCT_COPY_FILES += \
Dan Pasanen91f76202017-07-06 08:21:30 -050036 vendor/lineage/prebuilt/common/bin/backuptool.sh:install/bin/backuptool.sh \
37 vendor/lineage/prebuilt/common/bin/backuptool.functions:install/bin/backuptool.functions \
Michael Bestasf4032b82019-09-15 16:32:33 +030038 vendor/lineage/prebuilt/common/bin/50-lineage.sh:$(TARGET_COPY_OUT_SYSTEM)/addon.d/50-lineage.sh \
39 vendor/lineage/prebuilt/common/bin/blacklist:$(TARGET_COPY_OUT_SYSTEM)/addon.d/blacklist
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000040
Dan Pasanen4a049b52017-01-16 19:26:50 -060041ifeq ($(AB_OTA_UPDATER),true)
42PRODUCT_COPY_FILES += \
Michael Bestasf4032b82019-09-15 16:32:33 +030043 vendor/lineage/prebuilt/common/bin/backuptool_ab.sh:$(TARGET_COPY_OUT_SYSTEM)/bin/backuptool_ab.sh \
44 vendor/lineage/prebuilt/common/bin/backuptool_ab.functions:$(TARGET_COPY_OUT_SYSTEM)/bin/backuptool_ab.functions \
45 vendor/lineage/prebuilt/common/bin/backuptool_postinstall.sh:$(TARGET_COPY_OUT_SYSTEM)/bin/backuptool_postinstall.sh
Dan Pasanen4a049b52017-01-16 19:26:50 -060046endif
47
Abhisek Devkotaf1c5ab82016-07-06 15:18:29 -070048# Backup Services whitelist
49PRODUCT_COPY_FILES += \
Michael Bestasf4032b82019-09-15 16:32:33 +030050 vendor/lineage/config/permissions/backup.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysconfig/backup.xml
Abhisek Devkotaf1c5ab82016-07-06 15:18:29 -070051
Bruno Martinsa1b47e32017-10-16 09:37:03 +010052# Lineage-specific broadcast actions whitelist
53PRODUCT_COPY_FILES += \
Michael Bestasf4032b82019-09-15 16:32:33 +030054 vendor/lineage/config/permissions/lineage-sysconfig.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysconfig/lineage-sysconfig.xml
Bruno Martinsa1b47e32017-10-16 09:37:03 +010055
Steve Kondik485527d2011-12-20 12:14:24 -080056# init.d support
57PRODUCT_COPY_FILES += \
Michael Bestasf4032b82019-09-15 16:32:33 +030058 vendor/lineage/prebuilt/common/etc/init.d/00banner:$(TARGET_COPY_OUT_SYSTEM)/etc/init.d/00banner \
59 vendor/lineage/prebuilt/common/bin/sysinit:$(TARGET_COPY_OUT_SYSTEM)/bin/sysinit
Steve Kondik485527d2011-12-20 12:14:24 -080060
Ricardo Cerqueirafd6bfe72015-03-16 12:22:11 +000061ifneq ($(TARGET_BUILD_VARIANT),user)
James Sullinseb7799c2012-04-05 20:18:18 -050062# userinit support
63PRODUCT_COPY_FILES += \
Michael Bestasf4032b82019-09-15 16:32:33 +030064 vendor/lineage/prebuilt/common/etc/init.d/90userinit:$(TARGET_COPY_OUT_SYSTEM)/etc/init.d/90userinit
Ricardo Cerqueirafd6bfe72015-03-16 12:22:11 +000065endif
James Sullinseb7799c2012-04-05 20:18:18 -050066
Sam Mortimerc1088522017-09-21 10:10:49 -070067# Copy all Lineage-specific init rc files
68$(foreach f,$(wildcard vendor/lineage/prebuilt/common/etc/init/*.rc),\
Michael Bestasf4032b82019-09-15 16:32:33 +030069 $(eval PRODUCT_COPY_FILES += $(f):$(TARGET_COPY_OUT_SYSTEM)/etc/init/$(notdir $f)))
Ricardo Cerqueira8f412cb2012-10-18 16:38:25 +010070
herriojr5d2c9982015-10-01 11:20:26 -070071# Copy over added mimetype supported in libcore.net.MimeUtils
72PRODUCT_COPY_FILES += \
Michael Bestasf4032b82019-09-15 16:32:33 +030073 vendor/lineage/prebuilt/common/lib/content-types.properties:$(TARGET_COPY_OUT_SYSTEM)/lib/content-types.properties
herriojr5d2c9982015-10-01 11:20:26 -070074
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000075# Enable SIP+VoIP on all targets
76PRODUCT_COPY_FILES += \
Michael Bestasf4032b82019-09-15 16:32:33 +030077 frameworks/native/data/etc/android.software.sip.voip.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/android.software.sip.voip.xml
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000078
sleeplessninja918a7ea2013-01-30 14:45:20 -060079# Enable wireless Xbox 360 controller support
80PRODUCT_COPY_FILES += \
Michael Bestasf4032b82019-09-15 16:32:33 +030081 frameworks/base/data/keyboards/Vendor_045e_Product_028e.kl:$(TARGET_COPY_OUT_SYSTEM)/usr/keylayout/Vendor_045e_Product_0719.kl
sleeplessninja918a7ea2013-01-30 14:45:20 -060082
Luca Stefani5c60e4f2017-08-17 19:28:48 +020083# This is Lineage!
Steve Kondike0c12da2012-03-25 17:21:32 -070084PRODUCT_COPY_FILES += \
Michael Bestasf4032b82019-09-15 16:32:33 +030085 vendor/lineage/config/permissions/org.lineageos.android.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/org.lineageos.android.xml \
86 vendor/lineage/config/permissions/privapp-permissions-lineage-system.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/privapp-permissions-lineage.xml \
Han Wang89521b12019-09-15 13:36:12 +020087 vendor/lineage/config/permissions/privapp-permissions-lineage-product.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/privapp-permissions-lineage.xml \
Michael Bestasf4032b82019-09-15 16:32:33 +030088 vendor/lineage/config/permissions/privapp-permissions-cm-legacy.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/privapp-permissions-cm-legacy.xml
Steve Kondike0c12da2012-03-25 17:21:32 -070089
Luca Stefani214dfb92019-07-25 18:05:40 +020090# Enforce privapp-permissions whitelist
91PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
92 ro.control_privapp_permissions=enforce
93
Luca Stefanidab15692018-08-30 14:41:32 +020094# Hidden API whitelist
95PRODUCT_COPY_FILES += \
Michael Bestasf4032b82019-09-15 16:32:33 +030096 vendor/lineage/config/permissions/lineage-hiddenapi-package-whitelist.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/lineage-hiddenapi-package-whitelist.xml
Luca Stefanidab15692018-08-30 14:41:32 +020097
Han Wangbf74b7f2019-01-06 06:53:03 +010098# Power whitelist
99PRODUCT_COPY_FILES += \
Michael Bestasf4032b82019-09-15 16:32:33 +0300100 vendor/lineage/config/permissions/lineage-power-whitelist.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysconfig/lineage-power-whitelist.xml
Han Wangbf74b7f2019-01-06 06:53:03 +0100101
Michael Bestasf8b28f12019-04-12 02:08:21 +0300102# Include AOSP audio files
103include vendor/lineage/config/aosp_audio.mk
104
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200105# Include Lineage audio files
106include vendor/lineage/config/lineage_audio.mk
Arne Coucheron61536d42016-09-09 00:04:09 +0200107
Sam Mortimer19ce2d32017-09-18 21:05:19 -0700108ifneq ($(TARGET_DISABLE_LINEAGE_SDK), true)
109# Lineage SDK
110include vendor/lineage/config/lineage_sdk_common.mk
Luca Stefani25801972016-08-27 00:44:50 +0200111endif
Adnan Begovicf3610f52016-03-15 14:17:47 -0700112
Michael Bestasbeb05c82017-07-18 19:57:26 +0300113# TWRP
114ifeq ($(WITH_TWRP),true)
Dan Pasanen91f76202017-07-06 08:21:30 -0500115include vendor/lineage/config/twrp.mk
Michael Bestasbeb05c82017-07-18 19:57:26 +0300116endif
117
Luca Stefanic4d11902019-01-05 11:46:23 +0100118# Do not include art debug targets
119PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD := false
120
121# Strip the local variable table and the local variable type table to reduce
122# the size of the system image. This has no bearing on stack traces, but will
123# leave less information available via JDWP.
124PRODUCT_MINIMIZE_JAVA_DEBUG_INFO := true
125
Dan Pasanen24a1cc92016-12-28 22:59:21 -0600126# Bootanimation
Asher Simondse035b9a2017-01-16 21:52:24 -0600127PRODUCT_PACKAGES += \
128 bootanimation.zip
Dan Pasanen24a1cc92016-12-28 22:59:21 -0600129
Michael Bestas85fdce32019-09-13 20:58:35 +0300130# AOSP packages
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000131PRODUCT_PACKAGES += \
Michael Bestas85fdce32019-09-13 20:58:35 +0300132 ExactCalculator \
133 Exchange2 \
Steve Kondikdf96b442016-10-13 11:37:08 -0700134 Terminal
Koushik Dutta8387c322011-11-26 17:31:19 -0800135
Michael Bestas85fdce32019-09-13 20:58:35 +0300136# Lineage packages
Steve Kondik04a49412011-12-14 14:02:19 -0800137PRODUCT_PACKAGES += \
Steve Kondikc4f6b972014-12-09 13:29:29 -0800138 AudioFX \
Joey515f8e02019-04-29 12:50:45 +0200139 Backgrounds \
Michael Bestas85fdce32019-09-13 20:58:35 +0300140 LineageParts \
Sam Mortimer19ce2d32017-09-18 21:05:19 -0700141 LineageSettingsProvider \
cretin457674e052017-02-11 11:39:59 -0800142 LineageSetupWizard \
Steve Kondikdf96b442016-10-13 11:37:08 -0700143 Eleven \
Joey Rizzoli177ab032017-04-20 22:17:37 +0200144 Jelly \
Steve Kondikdf96b442016-10-13 11:37:08 -0700145 LockClock \
Michael Bestas85fdce32019-09-13 20:58:35 +0300146 Profiles \
Artem Borisove0ca3322018-10-27 12:08:00 +0300147 TrebuchetQuickStep \
Gabriele Mc7b874b2017-07-06 12:30:35 +0200148 Updater \
Paul Keitha23592c2018-04-02 00:45:00 +0000149 WeatherProvider
Steve Kondik04a49412011-12-14 14:02:19 -0800150
Joey7f9596f2018-01-20 14:06:47 +0100151# Berry styles
152PRODUCT_PACKAGES += \
Demon Singure6c0c252018-07-05 21:15:37 +0200153 LineageBlackTheme \
Joey7f9596f2018-01-20 14:06:47 +0100154 LineageDarkTheme \
155 LineageBlackAccent \
156 LineageBlueAccent \
157 LineageBrownAccent \
Joey7091a4f2018-03-25 18:11:51 +0200158 LineageCyanAccent \
Joey7f9596f2018-01-20 14:06:47 +0100159 LineageGreenAccent \
160 LineageOrangeAccent \
161 LineagePinkAccent \
162 LineagePurpleAccent \
163 LineageRedAccent \
164 LineageYellowAccent
165
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200166# Extra tools in Lineage
Sebastian Schmidt7d5de0c2012-04-15 11:39:25 +0200167PRODUCT_PACKAGES += \
Arne Coucheron61536d42016-09-09 00:04:09 +0200168 7z \
Tom Marshalle08b0212018-03-06 23:32:20 +0100169 awk \
Arne Coucheron61536d42016-09-09 00:04:09 +0200170 bash \
171 bzip2 \
172 curl \
LuK1337bf5dcb12019-03-22 10:42:33 +0100173 getcap \
Steve Kondikdf96b442016-10-13 11:37:08 -0700174 htop \
175 lib7z \
176 libsepol \
Steve Kondikdf96b442016-10-13 11:37:08 -0700177 pigz \
Arne Coucheron61536d42016-09-09 00:04:09 +0200178 powertop \
LuK1337bf5dcb12019-03-22 10:42:33 +0100179 setcap \
Arne Coucheron61536d42016-09-09 00:04:09 +0200180 unrar \
181 unzip \
182 vim \
183 wget \
184 zip
Sebastian Schmidt7d5de0c2012-04-15 11:39:25 +0200185
codeworkx9f22e532018-01-06 11:59:30 +0100186# Charger
Steve Kondik75956202016-08-07 23:21:29 -0700187PRODUCT_PACKAGES += \
codeworkx9f22e532018-01-06 11:59:30 +0100188 charger_res_images
189
190# Custom off-mode charger
191ifeq ($(WITH_LINEAGE_CHARGER),true)
192PRODUCT_PACKAGES += \
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200193 lineage_charger_res_images \
Steve Kondik75956202016-08-07 23:21:29 -0700194 font_log.png \
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200195 libhealthd.lineage
Steve Kondik75956202016-08-07 23:21:29 -0700196endif
197
Bruno Martinsdb4aa052018-07-25 09:40:10 +0100198# Filesystems tools
Scott Mertz2911a0e2015-11-09 11:35:41 -0800199PRODUCT_PACKAGES += \
Scott Mertz2911a0e2015-11-09 11:35:41 -0800200 fsck.exfat \
Bruno Martinsdb4aa052018-07-25 09:40:10 +0100201 fsck.ntfs \
202 mke2fs \
203 mkfs.exfat \
204 mkfs.ntfs \
205 mount.ntfs
Scott Mertz2911a0e2015-11-09 11:35:41 -0800206
Chirayu Desai8636d672012-07-19 16:04:25 +0530207# Openssh
208PRODUCT_PACKAGES += \
209 scp \
210 sftp \
211 ssh \
212 sshd \
213 sshd_config \
214 ssh-keygen \
Chirayu Desai4bacf672012-08-19 17:30:04 +0530215 start-ssh
216
217# rsync
218PRODUCT_PACKAGES += \
219 rsync
Chirayu Desai8636d672012-07-19 16:04:25 +0530220
Joey Rizzoli73a39652016-11-23 21:19:00 +0100221# Storage manager
Rashed Abdel-Tawabb6fb3e12018-03-02 10:21:37 -0500222PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
Joey Rizzoli73a39652016-11-23 21:19:00 +0100223 ro.storage_manager.enabled=true
224
Luca Stefani5c91b612018-01-24 16:35:11 +0100225# Media
Rashed Abdel-Tawabb6fb3e12018-03-02 10:21:37 -0500226PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
Luca Stefani5c91b612018-01-24 16:35:11 +0100227 media.recorder.show_manufacturer_and_model=true
228
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100229# These packages are excluded from user builds
Bruno Martins8d3ac292018-07-25 10:11:41 +0100230PRODUCT_PACKAGES_DEBUG += \
231 micro_bench \
Steve Kondik275701b2013-11-06 12:41:34 -0800232 procmem \
Bruno Martins8d3ac292018-07-25 10:11:41 +0100233 procrank \
234 strace
Abhisek Devkota6af9acb2016-12-27 22:30:35 -0800235
236# Conditionally build in su
Bruno Martins8d3ac292018-07-25 10:11:41 +0100237ifneq ($(TARGET_BUILD_VARIANT),user)
Abhisek Devkota6af9acb2016-12-27 22:30:35 -0800238ifeq ($(WITH_SU),true)
239PRODUCT_PACKAGES += \
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100240 su
repo Shareef Ali4bcfc312014-12-29 17:52:04 -0600241endif
Abhisek Devkota6af9acb2016-12-27 22:30:35 -0800242endif
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100243
Rashed Abdel-Tawabe4868cc2018-08-12 10:51:27 -0700244PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS += vendor/lineage/overlay
Dan Pasanen91f76202017-07-06 08:21:30 -0500245DEVICE_PACKAGE_OVERLAYS += vendor/lineage/overlay/common
Koushik Duttac6f7a492011-11-28 07:44:23 -0800246
Rashed Abdel-Tawabb6b34212019-09-04 15:08:51 -0700247PRODUCT_VERSION_MAJOR = 17
Rashed Abdel-Tawab6326caa2018-08-07 10:49:49 -0700248PRODUCT_VERSION_MINOR = 0
Dan Pasanen69354102016-08-24 10:19:50 -0500249PRODUCT_VERSION_MAINTENANCE := 0
Adrian DC3e85bf72016-08-06 21:47:23 +0200250
Scott Mertza9950592016-08-05 12:24:19 -0700251ifeq ($(TARGET_VENDOR_SHOW_MAINTENANCE_VERSION),true)
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200252 LINEAGE_VERSION_MAINTENANCE := $(PRODUCT_VERSION_MAINTENANCE)
Scott Mertza9950592016-08-05 12:24:19 -0700253else
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200254 LINEAGE_VERSION_MAINTENANCE := 0
Scott Mertza9950592016-08-05 12:24:19 -0700255endif
Koushik Duttac6f7a492011-11-28 07:44:23 -0800256
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200257# Set LINEAGE_BUILDTYPE from the env RELEASE_TYPE, for jenkins compat
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100258
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200259ifndef LINEAGE_BUILDTYPE
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100260 ifdef RELEASE_TYPE
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200261 # Starting with "LINEAGE_" is optional
262 RELEASE_TYPE := $(shell echo $(RELEASE_TYPE) | sed -e 's|^LINEAGE_||g')
263 LINEAGE_BUILDTYPE := $(RELEASE_TYPE)
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100264 endif
Warren Togami2128e2f2012-05-06 19:49:33 -1000265endif
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100266
267# Filter out random types, so it'll reset to UNOFFICIAL
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200268ifeq ($(filter RELEASE NIGHTLY SNAPSHOT EXPERIMENTAL,$(LINEAGE_BUILDTYPE)),)
269 LINEAGE_BUILDTYPE :=
Warren Togami2128e2f2012-05-06 19:49:33 -1000270endif
271
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200272ifdef LINEAGE_BUILDTYPE
273 ifneq ($(LINEAGE_BUILDTYPE), SNAPSHOT)
274 ifdef LINEAGE_EXTRAVERSION
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100275 # Force build type to EXPERIMENTAL
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200276 LINEAGE_BUILDTYPE := EXPERIMENTAL
277 # Remove leading dash from LINEAGE_EXTRAVERSION
278 LINEAGE_EXTRAVERSION := $(shell echo $(LINEAGE_EXTRAVERSION) | sed 's/-//')
279 # Add leading dash to LINEAGE_EXTRAVERSION
280 LINEAGE_EXTRAVERSION := -$(LINEAGE_EXTRAVERSION)
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100281 endif
282 else
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200283 ifndef LINEAGE_EXTRAVERSION
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100284 # Force build type to EXPERIMENTAL, SNAPSHOT mandates a tag
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200285 LINEAGE_BUILDTYPE := EXPERIMENTAL
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100286 else
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200287 # Remove leading dash from LINEAGE_EXTRAVERSION
288 LINEAGE_EXTRAVERSION := $(shell echo $(LINEAGE_EXTRAVERSION) | sed 's/-//')
289 # Add leading dash to LINEAGE_EXTRAVERSION
290 LINEAGE_EXTRAVERSION := -$(LINEAGE_EXTRAVERSION)
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100291 endif
Ricardo Cerqueirad8e76662012-06-08 11:08:15 +0100292 endif
293else
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200294 # If LINEAGE_BUILDTYPE is not defined, set to UNOFFICIAL
295 LINEAGE_BUILDTYPE := UNOFFICIAL
296 LINEAGE_EXTRAVERSION :=
Warren Togami2128e2f2012-05-06 19:49:33 -1000297endif
298
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200299ifeq ($(LINEAGE_BUILDTYPE), UNOFFICIAL)
Matt Mowerf4168392013-12-13 11:04:14 -0600300 ifneq ($(TARGET_UNOFFICIAL_BUILD_ID),)
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200301 LINEAGE_EXTRAVERSION := -$(TARGET_UNOFFICIAL_BUILD_ID)
Matt Mowerf4168392013-12-13 11:04:14 -0600302 endif
303endif
304
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200305ifeq ($(LINEAGE_BUILDTYPE), RELEASE)
Ricardo Cerqueiraae71f042013-11-11 00:55:51 +0000306 ifndef TARGET_VENDOR_RELEASE_BUILD_ID
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200307 LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(LINEAGE_BUILD)
Ricardo Cerqueiraae71f042013-11-11 00:55:51 +0000308 else
309 ifeq ($(TARGET_BUILD_VARIANT),user)
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200310 ifeq ($(LINEAGE_VERSION_MAINTENANCE),0)
311 LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(LINEAGE_BUILD)
Jessica Wagantall79204e62016-07-14 15:42:08 -0700312 else
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200313 LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(LINEAGE_VERSION_MAINTENANCE)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(LINEAGE_BUILD)
Jessica Wagantall79204e62016-07-14 15:42:08 -0700314 endif
Ricardo Cerqueiraae71f042013-11-11 00:55:51 +0000315 else
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200316 LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(LINEAGE_BUILD)
Ricardo Cerqueiraae71f042013-11-11 00:55:51 +0000317 endif
318 endif
Koushik Duttac6f7a492011-11-28 07:44:23 -0800319else
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200320 ifeq ($(LINEAGE_VERSION_MAINTENANCE),0)
Michael Bestas24807ea2017-12-24 04:08:07 +0200321 ifeq ($(LINEAGE_VERSION_APPEND_TIME_OF_DAY),true)
Kevin F. Haggertya2440d02017-10-21 04:41:20 +0200322 LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(shell date -u +%Y%m%d_%H%M%S)-$(LINEAGE_BUILDTYPE)$(LINEAGE_EXTRAVERSION)-$(LINEAGE_BUILD)
323 else
324 LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(shell date -u +%Y%m%d)-$(LINEAGE_BUILDTYPE)$(LINEAGE_EXTRAVERSION)-$(LINEAGE_BUILD)
325 endif
Jessica Wagantall79204e62016-07-14 15:42:08 -0700326 else
Michael Bestas24807ea2017-12-24 04:08:07 +0200327 ifeq ($(LINEAGE_VERSION_APPEND_TIME_OF_DAY),true)
Kevin F. Haggertya2440d02017-10-21 04:41:20 +0200328 LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(LINEAGE_VERSION_MAINTENANCE)-$(shell date -u +%Y%m%d_%H%M%S)-$(LINEAGE_BUILDTYPE)$(LINEAGE_EXTRAVERSION)-$(LINEAGE_BUILD)
329 else
330 LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(LINEAGE_VERSION_MAINTENANCE)-$(shell date -u +%Y%m%d)-$(LINEAGE_BUILDTYPE)$(LINEAGE_EXTRAVERSION)-$(LINEAGE_BUILD)
331 endif
Jessica Wagantall79204e62016-07-14 15:42:08 -0700332 endif
Koushik Duttac6f7a492011-11-28 07:44:23 -0800333endif
Koushik Duttad69b2922012-02-23 14:07:44 -0800334
Tom Powelle4c8c822017-01-06 22:29:06 -0800335PRODUCT_EXTRA_RECOVERY_KEYS += \
Dan Pasanen91f76202017-07-06 08:21:30 -0500336 vendor/lineage/build/target/product/security/lineage
Tom Powelle4c8c822017-01-06 22:29:06 -0800337
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200338-include vendor/lineage-priv/keys/keys.mk
Ricardo Cerqueira178dbd62013-10-23 20:56:56 +0100339
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200340LINEAGE_DISPLAY_VERSION := $(LINEAGE_VERSION)
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000341
Brint E. Kriebelac948f52014-01-24 09:58:36 -0800342ifneq ($(PRODUCT_DEFAULT_DEV_CERTIFICATE),)
343ifneq ($(PRODUCT_DEFAULT_DEV_CERTIFICATE),build/target/product/security/testkey)
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200344 ifneq ($(LINEAGE_BUILDTYPE), UNOFFICIAL)
Zhao Wei Liew046484f2017-01-07 15:55:35 +0800345 ifndef TARGET_VENDOR_RELEASE_BUILD_ID
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200346 ifneq ($(LINEAGE_EXTRAVERSION),)
347 # Remove leading dash from LINEAGE_EXTRAVERSION
348 LINEAGE_EXTRAVERSION := $(shell echo $(LINEAGE_EXTRAVERSION) | sed 's/-//')
349 TARGET_VENDOR_RELEASE_BUILD_ID := $(LINEAGE_EXTRAVERSION)
Zhao Wei Liew046484f2017-01-07 15:55:35 +0800350 else
351 TARGET_VENDOR_RELEASE_BUILD_ID := $(shell date -u +%Y%m%d)
352 endif
353 else
354 TARGET_VENDOR_RELEASE_BUILD_ID := $(TARGET_VENDOR_RELEASE_BUILD_ID)
355 endif
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200356 ifeq ($(LINEAGE_VERSION_MAINTENANCE),0)
357 LINEAGE_DISPLAY_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(LINEAGE_BUILD)
Zhao Wei Liew046484f2017-01-07 15:55:35 +0800358 else
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200359 LINEAGE_DISPLAY_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(LINEAGE_VERSION_MAINTENANCE)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(LINEAGE_BUILD)
Zhao Wei Liew046484f2017-01-07 15:55:35 +0800360 endif
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000361 endif
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000362endif
Ricardo Cerqueira74b4f9b2014-01-11 16:00:16 +0000363endif
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000364
Brint E. Kriebela1e49122014-01-31 11:59:56 -0800365-include $(WORKSPACE)/build_env/image-auto-bits.mk
Dan Pasanen91f76202017-07-06 08:21:30 -0500366-include vendor/lineage/config/partner_gms.mk