blob: 1c25f0a191a70d41fef1af2bf3fc8e2ea5d5eb99 [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
codeworkxd51aef22018-09-14 14:35:14 +020016ifeq ($(TARGET_BUILD_VARIANT),eng)
17# Disable ADB authentication
18PRODUCT_SYSTEM_DEFAULT_PROPERTIES += ro.adb.secure=0
19else
Chirayu Desai59df3632013-02-15 21:16:39 +053020# Enable ADB authentication
Bruno Martinse68dd972018-03-06 09:42:15 -060021PRODUCT_SYSTEM_DEFAULT_PROPERTIES += ro.adb.secure=1
Chirayu Desai88401db2013-03-20 16:17:17 +053022endif
Chirayu Desai59df3632013-02-15 21:16:39 +053023
Warren Togamib1637c82012-03-03 22:37:42 -100024# Backup Tool
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000025PRODUCT_COPY_FILES += \
Dan Pasanen91f76202017-07-06 08:21:30 -050026 vendor/lineage/prebuilt/common/bin/backuptool.sh:install/bin/backuptool.sh \
27 vendor/lineage/prebuilt/common/bin/backuptool.functions:install/bin/backuptool.functions \
Wang Hane43d6992020-02-05 16:45:15 +080028 vendor/lineage/prebuilt/common/bin/50-lineage.sh:$(TARGET_COPY_OUT_SYSTEM)/addon.d/50-lineage.sh
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000029
Dan Pasanen3e7435c2019-10-23 08:35:32 -050030ifneq ($(AB_OTA_PARTITIONS),)
Dan Pasanen4a049b52017-01-16 19:26:50 -060031PRODUCT_COPY_FILES += \
Michael Bestasf4032b82019-09-15 16:32:33 +030032 vendor/lineage/prebuilt/common/bin/backuptool_ab.sh:$(TARGET_COPY_OUT_SYSTEM)/bin/backuptool_ab.sh \
33 vendor/lineage/prebuilt/common/bin/backuptool_ab.functions:$(TARGET_COPY_OUT_SYSTEM)/bin/backuptool_ab.functions \
34 vendor/lineage/prebuilt/common/bin/backuptool_postinstall.sh:$(TARGET_COPY_OUT_SYSTEM)/bin/backuptool_postinstall.sh
Luca Stefanib3bd7282020-03-26 08:15:14 +010035ifneq ($(TARGET_BUILD_VARIANT),user)
36PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
37 ro.ota.allow_downgrade=true
38endif
Dan Pasanen4a049b52017-01-16 19:26:50 -060039endif
40
Abhisek Devkotaf1c5ab82016-07-06 15:18:29 -070041# Backup Services whitelist
42PRODUCT_COPY_FILES += \
Michael Bestasf4032b82019-09-15 16:32:33 +030043 vendor/lineage/config/permissions/backup.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysconfig/backup.xml
Abhisek Devkotaf1c5ab82016-07-06 15:18:29 -070044
Bruno Martinsa1b47e32017-10-16 09:37:03 +010045# Lineage-specific broadcast actions whitelist
46PRODUCT_COPY_FILES += \
Michael Bestasf4032b82019-09-15 16:32:33 +030047 vendor/lineage/config/permissions/lineage-sysconfig.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysconfig/lineage-sysconfig.xml
Bruno Martinsa1b47e32017-10-16 09:37:03 +010048
Sam Mortimerc1088522017-09-21 10:10:49 -070049# Copy all Lineage-specific init rc files
50$(foreach f,$(wildcard vendor/lineage/prebuilt/common/etc/init/*.rc),\
Michael Bestasf4032b82019-09-15 16:32:33 +030051 $(eval PRODUCT_COPY_FILES += $(f):$(TARGET_COPY_OUT_SYSTEM)/etc/init/$(notdir $f)))
Ricardo Cerqueira8f412cb2012-10-18 16:38:25 +010052
herriojr5d2c9982015-10-01 11:20:26 -070053# Copy over added mimetype supported in libcore.net.MimeUtils
54PRODUCT_COPY_FILES += \
Michael Bestasf4032b82019-09-15 16:32:33 +030055 vendor/lineage/prebuilt/common/lib/content-types.properties:$(TARGET_COPY_OUT_SYSTEM)/lib/content-types.properties
herriojr5d2c9982015-10-01 11:20:26 -070056
LuK13374f0ad572019-10-24 02:33:34 +020057# Enable Android Beam on all targets
58PRODUCT_COPY_FILES += \
59 vendor/lineage/config/permissions/android.software.nfc.beam.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/android.software.nfc.beam.xml
60
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000061# Enable SIP+VoIP on all targets
62PRODUCT_COPY_FILES += \
Michael Bestasf4032b82019-09-15 16:32:33 +030063 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 +000064
sleeplessninja918a7ea2013-01-30 14:45:20 -060065# Enable wireless Xbox 360 controller support
66PRODUCT_COPY_FILES += \
Michael Bestasf4032b82019-09-15 16:32:33 +030067 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 -060068
Luca Stefani5c60e4f2017-08-17 19:28:48 +020069# This is Lineage!
Steve Kondike0c12da2012-03-25 17:21:32 -070070PRODUCT_COPY_FILES += \
Michael Bestasb838db52020-05-06 15:57:40 +030071 vendor/lineage/config/permissions/org.lineageos.android.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/org.lineageos.android.xml
Steve Kondike0c12da2012-03-25 17:21:32 -070072
Luca Stefani214dfb92019-07-25 18:05:40 +020073# Enforce privapp-permissions whitelist
74PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
75 ro.control_privapp_permissions=enforce
76
Michael Bestasf8b28f12019-04-12 02:08:21 +030077# Include AOSP audio files
78include vendor/lineage/config/aosp_audio.mk
79
Luca Stefani5c60e4f2017-08-17 19:28:48 +020080# Include Lineage audio files
81include vendor/lineage/config/lineage_audio.mk
Arne Coucheron61536d42016-09-09 00:04:09 +020082
Sam Mortimer19ce2d32017-09-18 21:05:19 -070083ifneq ($(TARGET_DISABLE_LINEAGE_SDK), true)
84# Lineage SDK
85include vendor/lineage/config/lineage_sdk_common.mk
Luca Stefani25801972016-08-27 00:44:50 +020086endif
Adnan Begovicf3610f52016-03-15 14:17:47 -070087
Michael Bestasbeb05c82017-07-18 19:57:26 +030088# TWRP
89ifeq ($(WITH_TWRP),true)
Dan Pasanen91f76202017-07-06 08:21:30 -050090include vendor/lineage/config/twrp.mk
Michael Bestasbeb05c82017-07-18 19:57:26 +030091endif
92
Luca Stefanic4d11902019-01-05 11:46:23 +010093# Do not include art debug targets
94PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD := false
95
96# Strip the local variable table and the local variable type table to reduce
97# the size of the system image. This has no bearing on stack traces, but will
98# leave less information available via JDWP.
99PRODUCT_MINIMIZE_JAVA_DEBUG_INFO := true
100
Luca Stefani24ada062017-08-17 21:43:22 +0200101# Disable vendor restrictions
102PRODUCT_RESTRICT_VENDOR_FILES := false
103
Dan Pasanen24a1cc92016-12-28 22:59:21 -0600104# Bootanimation
Asher Simondse035b9a2017-01-16 21:52:24 -0600105PRODUCT_PACKAGES += \
106 bootanimation.zip
Dan Pasanen24a1cc92016-12-28 22:59:21 -0600107
Michael Bestas85fdce32019-09-13 20:58:35 +0300108# AOSP packages
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000109PRODUCT_PACKAGES += \
Steve Kondikdf96b442016-10-13 11:37:08 -0700110 Terminal
Koushik Dutta8387c322011-11-26 17:31:19 -0800111
Michael Bestas85fdce32019-09-13 20:58:35 +0300112# Lineage packages
Steve Kondik04a49412011-12-14 14:02:19 -0800113PRODUCT_PACKAGES += \
Michael Bestas85fdce32019-09-13 20:58:35 +0300114 LineageParts \
Sam Mortimer19ce2d32017-09-18 21:05:19 -0700115 LineageSettingsProvider \
cretin457674e052017-02-11 11:39:59 -0800116 LineageSetupWizard \
Aaron Kling89269902020-02-22 01:25:46 -0600117 Updater
Luca Stefani31264cd2019-11-01 22:01:21 +0100118
119# Themes
120PRODUCT_PACKAGES += \
121 LineageThemesStub \
Luca Stefani406b4dc2019-11-01 21:34:55 +0100122 ThemePicker
Joey7f9596f2018-01-20 14:06:47 +0100123
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200124# Extra tools in Lineage
Sebastian Schmidt7d5de0c2012-04-15 11:39:25 +0200125PRODUCT_PACKAGES += \
Arne Coucheron61536d42016-09-09 00:04:09 +0200126 7z \
Tom Marshalle08b0212018-03-06 23:32:20 +0100127 awk \
Arne Coucheron61536d42016-09-09 00:04:09 +0200128 bash \
129 bzip2 \
130 curl \
LuK1337bf5dcb12019-03-22 10:42:33 +0100131 getcap \
Steve Kondikdf96b442016-10-13 11:37:08 -0700132 htop \
133 lib7z \
134 libsepol \
LuK1337defae4a2019-10-09 01:45:33 +0200135 nano \
Steve Kondikdf96b442016-10-13 11:37:08 -0700136 pigz \
Arne Coucheron61536d42016-09-09 00:04:09 +0200137 powertop \
LuK1337bf5dcb12019-03-22 10:42:33 +0100138 setcap \
Arne Coucheron61536d42016-09-09 00:04:09 +0200139 unrar \
140 unzip \
141 vim \
142 wget \
143 zip
Sebastian Schmidt7d5de0c2012-04-15 11:39:25 +0200144
Bruno Martinsdb4aa052018-07-25 09:40:10 +0100145# Filesystems tools
Scott Mertz2911a0e2015-11-09 11:35:41 -0800146PRODUCT_PACKAGES += \
Scott Mertz2911a0e2015-11-09 11:35:41 -0800147 fsck.exfat \
Bruno Martinsdb4aa052018-07-25 09:40:10 +0100148 fsck.ntfs \
149 mke2fs \
150 mkfs.exfat \
151 mkfs.ntfs \
152 mount.ntfs
Scott Mertz2911a0e2015-11-09 11:35:41 -0800153
Chirayu Desai8636d672012-07-19 16:04:25 +0530154# Openssh
155PRODUCT_PACKAGES += \
156 scp \
157 sftp \
158 ssh \
159 sshd \
160 sshd_config \
161 ssh-keygen \
Chirayu Desai4bacf672012-08-19 17:30:04 +0530162 start-ssh
163
164# rsync
165PRODUCT_PACKAGES += \
166 rsync
Chirayu Desai8636d672012-07-19 16:04:25 +0530167
Joey Rizzoli73a39652016-11-23 21:19:00 +0100168# Storage manager
Rashed Abdel-Tawabb6fb3e12018-03-02 10:21:37 -0500169PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
Joey Rizzoli73a39652016-11-23 21:19:00 +0100170 ro.storage_manager.enabled=true
171
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100172# These packages are excluded from user builds
Bruno Martins8d3ac292018-07-25 10:11:41 +0100173PRODUCT_PACKAGES_DEBUG += \
Bruno Martins3bf932e2019-10-07 12:12:25 +0100174 procmem
Abhisek Devkota6af9acb2016-12-27 22:30:35 -0800175
Luca Stefani0e387902020-03-13 23:15:16 +0100176# Root
Luca Stefani06b93c02019-11-03 00:06:45 +0100177PRODUCT_PACKAGES += \
178 adb_root
Luca Stefani0e387902020-03-13 23:15:16 +0100179ifneq ($(TARGET_BUILD_VARIANT),user)
Abhisek Devkota6af9acb2016-12-27 22:30:35 -0800180ifeq ($(WITH_SU),true)
181PRODUCT_PACKAGES += \
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100182 su
repo Shareef Ali4bcfc312014-12-29 17:52:04 -0600183endif
Abhisek Devkota6af9acb2016-12-27 22:30:35 -0800184endif
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100185
Wei Wang058e5fd2018-02-02 13:01:38 -0800186# Dex preopt
187PRODUCT_DEXPREOPT_SPEED_APPS += \
Bruno Martins8560cdd2020-02-12 00:21:23 +0000188 SystemUI \
189 TrebuchetQuickStep
Wei Wang058e5fd2018-02-02 13:01:38 -0800190
Rashed Abdel-Tawabe4868cc2018-08-12 10:51:27 -0700191PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS += vendor/lineage/overlay
Dan Pasanen91f76202017-07-06 08:21:30 -0500192DEVICE_PACKAGE_OVERLAYS += vendor/lineage/overlay/common
Koushik Duttac6f7a492011-11-28 07:44:23 -0800193
Jan Altensendd29a472020-09-11 21:56:13 +0200194PRODUCT_VERSION_MAJOR = 18
195PRODUCT_VERSION_MINOR = 0
Dan Pasanen69354102016-08-24 10:19:50 -0500196PRODUCT_VERSION_MAINTENANCE := 0
Adrian DC3e85bf72016-08-06 21:47:23 +0200197
Scott Mertza9950592016-08-05 12:24:19 -0700198ifeq ($(TARGET_VENDOR_SHOW_MAINTENANCE_VERSION),true)
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200199 LINEAGE_VERSION_MAINTENANCE := $(PRODUCT_VERSION_MAINTENANCE)
Scott Mertza9950592016-08-05 12:24:19 -0700200else
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200201 LINEAGE_VERSION_MAINTENANCE := 0
Scott Mertza9950592016-08-05 12:24:19 -0700202endif
Koushik Duttac6f7a492011-11-28 07:44:23 -0800203
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200204# Set LINEAGE_BUILDTYPE from the env RELEASE_TYPE, for jenkins compat
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100205
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200206ifndef LINEAGE_BUILDTYPE
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100207 ifdef RELEASE_TYPE
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200208 # Starting with "LINEAGE_" is optional
209 RELEASE_TYPE := $(shell echo $(RELEASE_TYPE) | sed -e 's|^LINEAGE_||g')
210 LINEAGE_BUILDTYPE := $(RELEASE_TYPE)
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100211 endif
Warren Togami2128e2f2012-05-06 19:49:33 -1000212endif
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100213
214# Filter out random types, so it'll reset to UNOFFICIAL
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200215ifeq ($(filter RELEASE NIGHTLY SNAPSHOT EXPERIMENTAL,$(LINEAGE_BUILDTYPE)),)
216 LINEAGE_BUILDTYPE :=
Warren Togami2128e2f2012-05-06 19:49:33 -1000217endif
218
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200219ifdef LINEAGE_BUILDTYPE
220 ifneq ($(LINEAGE_BUILDTYPE), SNAPSHOT)
221 ifdef LINEAGE_EXTRAVERSION
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100222 # Force build type to EXPERIMENTAL
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200223 LINEAGE_BUILDTYPE := EXPERIMENTAL
224 # Remove leading dash from LINEAGE_EXTRAVERSION
225 LINEAGE_EXTRAVERSION := $(shell echo $(LINEAGE_EXTRAVERSION) | sed 's/-//')
226 # Add leading dash to LINEAGE_EXTRAVERSION
227 LINEAGE_EXTRAVERSION := -$(LINEAGE_EXTRAVERSION)
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100228 endif
229 else
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200230 ifndef LINEAGE_EXTRAVERSION
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100231 # Force build type to EXPERIMENTAL, SNAPSHOT mandates a tag
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200232 LINEAGE_BUILDTYPE := EXPERIMENTAL
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100233 else
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200234 # Remove leading dash from LINEAGE_EXTRAVERSION
235 LINEAGE_EXTRAVERSION := $(shell echo $(LINEAGE_EXTRAVERSION) | sed 's/-//')
236 # Add leading dash to LINEAGE_EXTRAVERSION
237 LINEAGE_EXTRAVERSION := -$(LINEAGE_EXTRAVERSION)
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100238 endif
Ricardo Cerqueirad8e76662012-06-08 11:08:15 +0100239 endif
240else
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200241 # If LINEAGE_BUILDTYPE is not defined, set to UNOFFICIAL
242 LINEAGE_BUILDTYPE := UNOFFICIAL
243 LINEAGE_EXTRAVERSION :=
Warren Togami2128e2f2012-05-06 19:49:33 -1000244endif
245
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200246ifeq ($(LINEAGE_BUILDTYPE), UNOFFICIAL)
Matt Mowerf4168392013-12-13 11:04:14 -0600247 ifneq ($(TARGET_UNOFFICIAL_BUILD_ID),)
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200248 LINEAGE_EXTRAVERSION := -$(TARGET_UNOFFICIAL_BUILD_ID)
Matt Mowerf4168392013-12-13 11:04:14 -0600249 endif
250endif
251
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200252ifeq ($(LINEAGE_BUILDTYPE), RELEASE)
Ricardo Cerqueiraae71f042013-11-11 00:55:51 +0000253 ifndef TARGET_VENDOR_RELEASE_BUILD_ID
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200254 LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(LINEAGE_BUILD)
Ricardo Cerqueiraae71f042013-11-11 00:55:51 +0000255 else
256 ifeq ($(TARGET_BUILD_VARIANT),user)
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200257 ifeq ($(LINEAGE_VERSION_MAINTENANCE),0)
258 LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(LINEAGE_BUILD)
Jessica Wagantall79204e62016-07-14 15:42:08 -0700259 else
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200260 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 -0700261 endif
Ricardo Cerqueiraae71f042013-11-11 00:55:51 +0000262 else
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200263 LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(LINEAGE_BUILD)
Ricardo Cerqueiraae71f042013-11-11 00:55:51 +0000264 endif
265 endif
Koushik Duttac6f7a492011-11-28 07:44:23 -0800266else
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200267 ifeq ($(LINEAGE_VERSION_MAINTENANCE),0)
Michael Bestas24807ea2017-12-24 04:08:07 +0200268 ifeq ($(LINEAGE_VERSION_APPEND_TIME_OF_DAY),true)
Kevin F. Haggertya2440d02017-10-21 04:41:20 +0200269 LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(shell date -u +%Y%m%d_%H%M%S)-$(LINEAGE_BUILDTYPE)$(LINEAGE_EXTRAVERSION)-$(LINEAGE_BUILD)
270 else
271 LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(shell date -u +%Y%m%d)-$(LINEAGE_BUILDTYPE)$(LINEAGE_EXTRAVERSION)-$(LINEAGE_BUILD)
272 endif
Jessica Wagantall79204e62016-07-14 15:42:08 -0700273 else
Michael Bestas24807ea2017-12-24 04:08:07 +0200274 ifeq ($(LINEAGE_VERSION_APPEND_TIME_OF_DAY),true)
Kevin F. Haggertya2440d02017-10-21 04:41:20 +0200275 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)
276 else
277 LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(LINEAGE_VERSION_MAINTENANCE)-$(shell date -u +%Y%m%d)-$(LINEAGE_BUILDTYPE)$(LINEAGE_EXTRAVERSION)-$(LINEAGE_BUILD)
278 endif
Jessica Wagantall79204e62016-07-14 15:42:08 -0700279 endif
Koushik Duttac6f7a492011-11-28 07:44:23 -0800280endif
Koushik Duttad69b2922012-02-23 14:07:44 -0800281
Tom Powelle4c8c822017-01-06 22:29:06 -0800282PRODUCT_EXTRA_RECOVERY_KEYS += \
Dan Pasanen91f76202017-07-06 08:21:30 -0500283 vendor/lineage/build/target/product/security/lineage
Tom Powelle4c8c822017-01-06 22:29:06 -0800284
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200285-include vendor/lineage-priv/keys/keys.mk
Ricardo Cerqueira178dbd62013-10-23 20:56:56 +0100286
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200287LINEAGE_DISPLAY_VERSION := $(LINEAGE_VERSION)
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000288
Brint E. Kriebelac948f52014-01-24 09:58:36 -0800289ifneq ($(PRODUCT_DEFAULT_DEV_CERTIFICATE),)
290ifneq ($(PRODUCT_DEFAULT_DEV_CERTIFICATE),build/target/product/security/testkey)
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200291 ifneq ($(LINEAGE_BUILDTYPE), UNOFFICIAL)
Zhao Wei Liew046484f2017-01-07 15:55:35 +0800292 ifndef TARGET_VENDOR_RELEASE_BUILD_ID
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200293 ifneq ($(LINEAGE_EXTRAVERSION),)
294 # Remove leading dash from LINEAGE_EXTRAVERSION
295 LINEAGE_EXTRAVERSION := $(shell echo $(LINEAGE_EXTRAVERSION) | sed 's/-//')
296 TARGET_VENDOR_RELEASE_BUILD_ID := $(LINEAGE_EXTRAVERSION)
Zhao Wei Liew046484f2017-01-07 15:55:35 +0800297 else
298 TARGET_VENDOR_RELEASE_BUILD_ID := $(shell date -u +%Y%m%d)
299 endif
300 else
301 TARGET_VENDOR_RELEASE_BUILD_ID := $(TARGET_VENDOR_RELEASE_BUILD_ID)
302 endif
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200303 ifeq ($(LINEAGE_VERSION_MAINTENANCE),0)
304 LINEAGE_DISPLAY_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(LINEAGE_BUILD)
Zhao Wei Liew046484f2017-01-07 15:55:35 +0800305 else
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200306 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 +0800307 endif
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000308 endif
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000309endif
Ricardo Cerqueira74b4f9b2014-01-11 16:00:16 +0000310endif
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000311
Brint E. Kriebela1e49122014-01-31 11:59:56 -0800312-include $(WORKSPACE)/build_env/image-auto-bits.mk
Dan Pasanen91f76202017-07-06 08:21:30 -0500313-include vendor/lineage/config/partner_gms.mk