blob: d2f84853a07aeb3d41fd090511b0d52e31bc2002 [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
Rashed Abdel-Tawabb6fb3e12018-03-02 10:21:37 -050016PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +010017 ro.build.selinux=1
Ricardo Cerqueiraf3835632013-08-04 13:25:00 +010018
Arne Coucheron61536d42016-09-09 00:04:09 +020019# Default notification/alarm sounds
Rashed Abdel-Tawabb6fb3e12018-03-02 10:21:37 -050020PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
Arne Coucheron61536d42016-09-09 00:04:09 +020021 ro.config.notification_sound=Argon.ogg \
Zhao Wei Liew805a7a22016-10-03 15:30:05 +080022 ro.config.alarm_alert=Hassium.ogg
Arne Coucheron61536d42016-09-09 00:04:09 +020023
Ricardo Cerqueiraed634842015-09-12 00:13:01 +010024ifneq ($(TARGET_BUILD_VARIANT),user)
Steve Kondike4f938c2014-02-04 22:59:01 -080025# Thank you, please drive thru!
Rashed Abdel-Tawabb6fb3e12018-03-02 10:21:37 -050026PRODUCT_SYSTEM_DEFAULT_PROPERTIES += persist.sys.dun.override=0
Ricardo Cerqueiraed634842015-09-12 00:13:01 +010027endif
Steve Kondike4f938c2014-02-04 22:59:01 -080028
codeworkxd51aef22018-09-14 14:35:14 +020029ifeq ($(TARGET_BUILD_VARIANT),eng)
30# Disable ADB authentication
31PRODUCT_SYSTEM_DEFAULT_PROPERTIES += ro.adb.secure=0
32else
Chirayu Desai59df3632013-02-15 21:16:39 +053033# Enable ADB authentication
Bruno Martinse68dd972018-03-06 09:42:15 -060034PRODUCT_SYSTEM_DEFAULT_PROPERTIES += ro.adb.secure=1
Chirayu Desai88401db2013-03-20 16:17:17 +053035endif
Chirayu Desai59df3632013-02-15 21:16:39 +053036
Warren Togamib1637c82012-03-03 22:37:42 -100037# Backup Tool
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000038PRODUCT_COPY_FILES += \
Dan Pasanen91f76202017-07-06 08:21:30 -050039 vendor/lineage/prebuilt/common/bin/backuptool.sh:install/bin/backuptool.sh \
40 vendor/lineage/prebuilt/common/bin/backuptool.functions:install/bin/backuptool.functions \
Luca Stefani5c60e4f2017-08-17 19:28:48 +020041 vendor/lineage/prebuilt/common/bin/50-lineage.sh:system/addon.d/50-lineage.sh \
Dan Pasanen91f76202017-07-06 08:21:30 -050042 vendor/lineage/prebuilt/common/bin/blacklist:system/addon.d/blacklist
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000043
Dan Pasanen4a049b52017-01-16 19:26:50 -060044ifeq ($(AB_OTA_UPDATER),true)
45PRODUCT_COPY_FILES += \
46 vendor/lineage/prebuilt/common/bin/backuptool_ab.sh:system/bin/backuptool_ab.sh \
47 vendor/lineage/prebuilt/common/bin/backuptool_ab.functions:system/bin/backuptool_ab.functions \
48 vendor/lineage/prebuilt/common/bin/backuptool_postinstall.sh:system/bin/backuptool_postinstall.sh
49endif
50
Abhisek Devkotaf1c5ab82016-07-06 15:18:29 -070051# Backup Services whitelist
52PRODUCT_COPY_FILES += \
Dan Pasanen91f76202017-07-06 08:21:30 -050053 vendor/lineage/config/permissions/backup.xml:system/etc/sysconfig/backup.xml
Abhisek Devkotaf1c5ab82016-07-06 15:18:29 -070054
Bruno Martinsa1b47e32017-10-16 09:37:03 +010055# Lineage-specific broadcast actions whitelist
56PRODUCT_COPY_FILES += \
57 vendor/lineage/config/permissions/lineage-sysconfig.xml:system/etc/sysconfig/lineage-sysconfig.xml
58
Steve Kondik485527d2011-12-20 12:14:24 -080059# init.d support
60PRODUCT_COPY_FILES += \
Dan Pasanen91f76202017-07-06 08:21:30 -050061 vendor/lineage/prebuilt/common/etc/init.d/00banner:system/etc/init.d/00banner \
62 vendor/lineage/prebuilt/common/bin/sysinit:system/bin/sysinit
Steve Kondik485527d2011-12-20 12:14:24 -080063
Ricardo Cerqueirafd6bfe72015-03-16 12:22:11 +000064ifneq ($(TARGET_BUILD_VARIANT),user)
James Sullinseb7799c2012-04-05 20:18:18 -050065# userinit support
66PRODUCT_COPY_FILES += \
Dan Pasanen91f76202017-07-06 08:21:30 -050067 vendor/lineage/prebuilt/common/etc/init.d/90userinit:system/etc/init.d/90userinit
Ricardo Cerqueirafd6bfe72015-03-16 12:22:11 +000068endif
James Sullinseb7799c2012-04-05 20:18:18 -050069
Sam Mortimerc1088522017-09-21 10:10:49 -070070# Copy all Lineage-specific init rc files
71$(foreach f,$(wildcard vendor/lineage/prebuilt/common/etc/init/*.rc),\
72 $(eval PRODUCT_COPY_FILES += $(f):system/etc/init/$(notdir $f)))
Ricardo Cerqueira8f412cb2012-10-18 16:38:25 +010073
herriojr5d2c9982015-10-01 11:20:26 -070074# Copy over added mimetype supported in libcore.net.MimeUtils
75PRODUCT_COPY_FILES += \
Dan Pasanen91f76202017-07-06 08:21:30 -050076 vendor/lineage/prebuilt/common/lib/content-types.properties:system/lib/content-types.properties
herriojr5d2c9982015-10-01 11:20:26 -070077
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000078# Enable SIP+VoIP on all targets
79PRODUCT_COPY_FILES += \
Ricardo Cerqueira3ff9b6f2012-07-11 11:21:50 +010080 frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000081
sleeplessninja918a7ea2013-01-30 14:45:20 -060082# Enable wireless Xbox 360 controller support
83PRODUCT_COPY_FILES += \
84 frameworks/base/data/keyboards/Vendor_045e_Product_028e.kl:system/usr/keylayout/Vendor_045e_Product_0719.kl
85
Luca Stefani5c60e4f2017-08-17 19:28:48 +020086# This is Lineage!
Steve Kondike0c12da2012-03-25 17:21:32 -070087PRODUCT_COPY_FILES += \
Ethan Chenc3532d92017-11-15 00:37:27 -080088 vendor/lineage/config/permissions/org.lineageos.android.xml:system/etc/permissions/org.lineageos.android.xml \
blunden6b5af982019-05-19 12:51:39 +020089 vendor/lineage/config/permissions/privapp-permissions-lineage.xml:system/etc/permissions/privapp-permissions-lineage.xml \
90 vendor/lineage/config/permissions/privapp-permissions-cm-legacy.xml:system/etc/permissions/privapp-permissions-cm-legacy.xml
Steve Kondike0c12da2012-03-25 17:21:32 -070091
Luca Stefanidab15692018-08-30 14:41:32 +020092# Hidden API whitelist
93PRODUCT_COPY_FILES += \
94 vendor/lineage/config/permissions/lineage-hiddenapi-package-whitelist.xml:system/etc/permissions/lineage-hiddenapi-package-whitelist.xml
95
Han Wangbf74b7f2019-01-06 06:53:03 +010096# Power whitelist
97PRODUCT_COPY_FILES += \
98 vendor/lineage/config/permissions/lineage-power-whitelist.xml:system/etc/sysconfig/lineage-power-whitelist.xml
99
Michael Bestasf8b28f12019-04-12 02:08:21 +0300100# Include AOSP audio files
101include vendor/lineage/config/aosp_audio.mk
102
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200103# Include Lineage audio files
104include vendor/lineage/config/lineage_audio.mk
Arne Coucheron61536d42016-09-09 00:04:09 +0200105
Sam Mortimer19ce2d32017-09-18 21:05:19 -0700106ifneq ($(TARGET_DISABLE_LINEAGE_SDK), true)
107# Lineage SDK
108include vendor/lineage/config/lineage_sdk_common.mk
Luca Stefani25801972016-08-27 00:44:50 +0200109endif
Adnan Begovicf3610f52016-03-15 14:17:47 -0700110
Michael Bestasbeb05c82017-07-18 19:57:26 +0300111# TWRP
112ifeq ($(WITH_TWRP),true)
Dan Pasanen91f76202017-07-06 08:21:30 -0500113include vendor/lineage/config/twrp.mk
Michael Bestasbeb05c82017-07-18 19:57:26 +0300114endif
115
Luca Stefanic4d11902019-01-05 11:46:23 +0100116# Do not include art debug targets
117PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD := false
118
119# Strip the local variable table and the local variable type table to reduce
120# the size of the system image. This has no bearing on stack traces, but will
121# leave less information available via JDWP.
122PRODUCT_MINIMIZE_JAVA_DEBUG_INFO := true
123
Dan Pasanen24a1cc92016-12-28 22:59:21 -0600124# Bootanimation
Asher Simondse035b9a2017-01-16 21:52:24 -0600125PRODUCT_PACKAGES += \
126 bootanimation.zip
Dan Pasanen24a1cc92016-12-28 22:59:21 -0600127
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200128# Required Lineage packages
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000129PRODUCT_PACKAGES += \
Sam Mortimer19ce2d32017-09-18 21:05:19 -0700130 LineageParts \
Steve Kondike0c297d2011-12-20 16:16:01 -0800131 Development \
Michael Bestas6c664d92017-12-28 00:32:59 +0200132 Profiles
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000133
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200134# Optional packages
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000135PRODUCT_PACKAGES += \
Arne Coucheron61536d42016-09-09 00:04:09 +0200136 LiveWallpapersPicker \
Steve Kondikdf96b442016-10-13 11:37:08 -0700137 PhotoTable \
138 Terminal
Koushik Dutta8387c322011-11-26 17:31:19 -0800139
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200140# Custom Lineage packages
Steve Kondik04a49412011-12-14 14:02:19 -0800141PRODUCT_PACKAGES += \
Steve Kondikc4f6b972014-12-09 13:29:29 -0800142 AudioFX \
Joey515f8e02019-04-29 12:50:45 +0200143 Backgrounds \
Sam Mortimer19ce2d32017-09-18 21:05:19 -0700144 LineageSettingsProvider \
cretin457674e052017-02-11 11:39:59 -0800145 LineageSetupWizard \
Steve Kondikdf96b442016-10-13 11:37:08 -0700146 Eleven \
d34d2cf159c2016-03-08 09:12:04 -0800147 ExactCalculator \
Joey Rizzoli177ab032017-04-20 22:17:37 +0200148 Jelly \
Steve Kondikdf96b442016-10-13 11:37:08 -0700149 LockClock \
Artem Borisove0ca3322018-10-27 12:08:00 +0300150 TrebuchetQuickStep \
Gabriele Mc7b874b2017-07-06 12:30:35 +0200151 Updater \
Paul Keitha23592c2018-04-02 00:45:00 +0000152 WeatherProvider
Steve Kondik04a49412011-12-14 14:02:19 -0800153
Abhisek Devkotacf03e162016-03-14 12:45:43 -0800154# Exchange support
155PRODUCT_PACKAGES += \
156 Exchange2
157
Joey7f9596f2018-01-20 14:06:47 +0100158# Berry styles
159PRODUCT_PACKAGES += \
Demon Singure6c0c252018-07-05 21:15:37 +0200160 LineageBlackTheme \
Joey7f9596f2018-01-20 14:06:47 +0100161 LineageDarkTheme \
162 LineageBlackAccent \
163 LineageBlueAccent \
164 LineageBrownAccent \
Joey7091a4f2018-03-25 18:11:51 +0200165 LineageCyanAccent \
Joey7f9596f2018-01-20 14:06:47 +0100166 LineageGreenAccent \
167 LineageOrangeAccent \
168 LineagePinkAccent \
169 LineagePurpleAccent \
170 LineageRedAccent \
171 LineageYellowAccent
172
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200173# Extra tools in Lineage
Sebastian Schmidt7d5de0c2012-04-15 11:39:25 +0200174PRODUCT_PACKAGES += \
Arne Coucheron61536d42016-09-09 00:04:09 +0200175 7z \
Tom Marshalle08b0212018-03-06 23:32:20 +0100176 awk \
Arne Coucheron61536d42016-09-09 00:04:09 +0200177 bash \
178 bzip2 \
179 curl \
Steve Kondikdf96b442016-10-13 11:37:08 -0700180 htop \
181 lib7z \
182 libsepol \
Steve Kondikdf96b442016-10-13 11:37:08 -0700183 pigz \
Arne Coucheron61536d42016-09-09 00:04:09 +0200184 powertop \
185 unrar \
186 unzip \
187 vim \
188 wget \
189 zip
Sebastian Schmidt7d5de0c2012-04-15 11:39:25 +0200190
codeworkx9f22e532018-01-06 11:59:30 +0100191# Charger
Steve Kondik75956202016-08-07 23:21:29 -0700192PRODUCT_PACKAGES += \
codeworkx9f22e532018-01-06 11:59:30 +0100193 charger_res_images
194
195# Custom off-mode charger
196ifeq ($(WITH_LINEAGE_CHARGER),true)
197PRODUCT_PACKAGES += \
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200198 lineage_charger_res_images \
Steve Kondik75956202016-08-07 23:21:29 -0700199 font_log.png \
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200200 libhealthd.lineage
Steve Kondik75956202016-08-07 23:21:29 -0700201endif
202
Bruno Martinsdb4aa052018-07-25 09:40:10 +0100203# Filesystems tools
Scott Mertz2911a0e2015-11-09 11:35:41 -0800204PRODUCT_PACKAGES += \
Scott Mertz2911a0e2015-11-09 11:35:41 -0800205 fsck.exfat \
Bruno Martinsdb4aa052018-07-25 09:40:10 +0100206 fsck.ntfs \
207 mke2fs \
208 mkfs.exfat \
209 mkfs.ntfs \
210 mount.ntfs
Scott Mertz2911a0e2015-11-09 11:35:41 -0800211
Chirayu Desai8636d672012-07-19 16:04:25 +0530212# Openssh
213PRODUCT_PACKAGES += \
214 scp \
215 sftp \
216 ssh \
217 sshd \
218 sshd_config \
219 ssh-keygen \
Chirayu Desai4bacf672012-08-19 17:30:04 +0530220 start-ssh
221
222# rsync
223PRODUCT_PACKAGES += \
224 rsync
Chirayu Desai8636d672012-07-19 16:04:25 +0530225
Joey Rizzoli73a39652016-11-23 21:19:00 +0100226# Storage manager
Rashed Abdel-Tawabb6fb3e12018-03-02 10:21:37 -0500227PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
Joey Rizzoli73a39652016-11-23 21:19:00 +0100228 ro.storage_manager.enabled=true
229
Luca Stefani5c91b612018-01-24 16:35:11 +0100230# Media
Rashed Abdel-Tawabb6fb3e12018-03-02 10:21:37 -0500231PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
Luca Stefani5c91b612018-01-24 16:35:11 +0100232 media.recorder.show_manufacturer_and_model=true
233
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100234# These packages are excluded from user builds
Bruno Martins8d3ac292018-07-25 10:11:41 +0100235PRODUCT_PACKAGES_DEBUG += \
236 micro_bench \
Steve Kondik275701b2013-11-06 12:41:34 -0800237 procmem \
Bruno Martins8d3ac292018-07-25 10:11:41 +0100238 procrank \
239 strace
Abhisek Devkota6af9acb2016-12-27 22:30:35 -0800240
241# Conditionally build in su
Bruno Martins8d3ac292018-07-25 10:11:41 +0100242ifneq ($(TARGET_BUILD_VARIANT),user)
Abhisek Devkota6af9acb2016-12-27 22:30:35 -0800243ifeq ($(WITH_SU),true)
244PRODUCT_PACKAGES += \
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100245 su
repo Shareef Ali4bcfc312014-12-29 17:52:04 -0600246endif
Abhisek Devkota6af9acb2016-12-27 22:30:35 -0800247endif
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100248
Rashed Abdel-Tawabe4868cc2018-08-12 10:51:27 -0700249PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS += vendor/lineage/overlay
Dan Pasanen91f76202017-07-06 08:21:30 -0500250DEVICE_PACKAGE_OVERLAYS += vendor/lineage/overlay/common
Koushik Duttac6f7a492011-11-28 07:44:23 -0800251
Rashed Abdel-Tawab6326caa2018-08-07 10:49:49 -0700252PRODUCT_VERSION_MAJOR = 16
253PRODUCT_VERSION_MINOR = 0
Dan Pasanen69354102016-08-24 10:19:50 -0500254PRODUCT_VERSION_MAINTENANCE := 0
Adrian DC3e85bf72016-08-06 21:47:23 +0200255
Scott Mertza9950592016-08-05 12:24:19 -0700256ifeq ($(TARGET_VENDOR_SHOW_MAINTENANCE_VERSION),true)
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200257 LINEAGE_VERSION_MAINTENANCE := $(PRODUCT_VERSION_MAINTENANCE)
Scott Mertza9950592016-08-05 12:24:19 -0700258else
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200259 LINEAGE_VERSION_MAINTENANCE := 0
Scott Mertza9950592016-08-05 12:24:19 -0700260endif
Koushik Duttac6f7a492011-11-28 07:44:23 -0800261
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200262# Set LINEAGE_BUILDTYPE from the env RELEASE_TYPE, for jenkins compat
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100263
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200264ifndef LINEAGE_BUILDTYPE
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100265 ifdef RELEASE_TYPE
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200266 # Starting with "LINEAGE_" is optional
267 RELEASE_TYPE := $(shell echo $(RELEASE_TYPE) | sed -e 's|^LINEAGE_||g')
268 LINEAGE_BUILDTYPE := $(RELEASE_TYPE)
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100269 endif
Warren Togami2128e2f2012-05-06 19:49:33 -1000270endif
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100271
272# Filter out random types, so it'll reset to UNOFFICIAL
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200273ifeq ($(filter RELEASE NIGHTLY SNAPSHOT EXPERIMENTAL,$(LINEAGE_BUILDTYPE)),)
274 LINEAGE_BUILDTYPE :=
Warren Togami2128e2f2012-05-06 19:49:33 -1000275endif
276
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200277ifdef LINEAGE_BUILDTYPE
278 ifneq ($(LINEAGE_BUILDTYPE), SNAPSHOT)
279 ifdef LINEAGE_EXTRAVERSION
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100280 # Force build type to EXPERIMENTAL
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200281 LINEAGE_BUILDTYPE := EXPERIMENTAL
282 # Remove leading dash from LINEAGE_EXTRAVERSION
283 LINEAGE_EXTRAVERSION := $(shell echo $(LINEAGE_EXTRAVERSION) | sed 's/-//')
284 # Add leading dash to LINEAGE_EXTRAVERSION
285 LINEAGE_EXTRAVERSION := -$(LINEAGE_EXTRAVERSION)
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100286 endif
287 else
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200288 ifndef LINEAGE_EXTRAVERSION
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100289 # Force build type to EXPERIMENTAL, SNAPSHOT mandates a tag
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200290 LINEAGE_BUILDTYPE := EXPERIMENTAL
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100291 else
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200292 # Remove leading dash from LINEAGE_EXTRAVERSION
293 LINEAGE_EXTRAVERSION := $(shell echo $(LINEAGE_EXTRAVERSION) | sed 's/-//')
294 # Add leading dash to LINEAGE_EXTRAVERSION
295 LINEAGE_EXTRAVERSION := -$(LINEAGE_EXTRAVERSION)
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100296 endif
Ricardo Cerqueirad8e76662012-06-08 11:08:15 +0100297 endif
298else
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200299 # If LINEAGE_BUILDTYPE is not defined, set to UNOFFICIAL
300 LINEAGE_BUILDTYPE := UNOFFICIAL
301 LINEAGE_EXTRAVERSION :=
Warren Togami2128e2f2012-05-06 19:49:33 -1000302endif
303
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200304ifeq ($(LINEAGE_BUILDTYPE), UNOFFICIAL)
Matt Mowerf4168392013-12-13 11:04:14 -0600305 ifneq ($(TARGET_UNOFFICIAL_BUILD_ID),)
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200306 LINEAGE_EXTRAVERSION := -$(TARGET_UNOFFICIAL_BUILD_ID)
Matt Mowerf4168392013-12-13 11:04:14 -0600307 endif
308endif
309
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200310ifeq ($(LINEAGE_BUILDTYPE), RELEASE)
Ricardo Cerqueiraae71f042013-11-11 00:55:51 +0000311 ifndef TARGET_VENDOR_RELEASE_BUILD_ID
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200312 LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(LINEAGE_BUILD)
Ricardo Cerqueiraae71f042013-11-11 00:55:51 +0000313 else
314 ifeq ($(TARGET_BUILD_VARIANT),user)
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200315 ifeq ($(LINEAGE_VERSION_MAINTENANCE),0)
316 LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(LINEAGE_BUILD)
Jessica Wagantall79204e62016-07-14 15:42:08 -0700317 else
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200318 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 -0700319 endif
Ricardo Cerqueiraae71f042013-11-11 00:55:51 +0000320 else
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200321 LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(LINEAGE_BUILD)
Ricardo Cerqueiraae71f042013-11-11 00:55:51 +0000322 endif
323 endif
Koushik Duttac6f7a492011-11-28 07:44:23 -0800324else
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200325 ifeq ($(LINEAGE_VERSION_MAINTENANCE),0)
Michael Bestas24807ea2017-12-24 04:08:07 +0200326 ifeq ($(LINEAGE_VERSION_APPEND_TIME_OF_DAY),true)
Kevin F. Haggertya2440d02017-10-21 04:41:20 +0200327 LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(shell date -u +%Y%m%d_%H%M%S)-$(LINEAGE_BUILDTYPE)$(LINEAGE_EXTRAVERSION)-$(LINEAGE_BUILD)
328 else
329 LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(shell date -u +%Y%m%d)-$(LINEAGE_BUILDTYPE)$(LINEAGE_EXTRAVERSION)-$(LINEAGE_BUILD)
330 endif
Jessica Wagantall79204e62016-07-14 15:42:08 -0700331 else
Michael Bestas24807ea2017-12-24 04:08:07 +0200332 ifeq ($(LINEAGE_VERSION_APPEND_TIME_OF_DAY),true)
Kevin F. Haggertya2440d02017-10-21 04:41:20 +0200333 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)
334 else
335 LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(LINEAGE_VERSION_MAINTENANCE)-$(shell date -u +%Y%m%d)-$(LINEAGE_BUILDTYPE)$(LINEAGE_EXTRAVERSION)-$(LINEAGE_BUILD)
336 endif
Jessica Wagantall79204e62016-07-14 15:42:08 -0700337 endif
Koushik Duttac6f7a492011-11-28 07:44:23 -0800338endif
Koushik Duttad69b2922012-02-23 14:07:44 -0800339
Tom Powelle4c8c822017-01-06 22:29:06 -0800340PRODUCT_EXTRA_RECOVERY_KEYS += \
Dan Pasanen91f76202017-07-06 08:21:30 -0500341 vendor/lineage/build/target/product/security/lineage
Tom Powelle4c8c822017-01-06 22:29:06 -0800342
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200343-include vendor/lineage-priv/keys/keys.mk
Ricardo Cerqueira178dbd62013-10-23 20:56:56 +0100344
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200345LINEAGE_DISPLAY_VERSION := $(LINEAGE_VERSION)
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000346
Brint E. Kriebelac948f52014-01-24 09:58:36 -0800347ifneq ($(PRODUCT_DEFAULT_DEV_CERTIFICATE),)
348ifneq ($(PRODUCT_DEFAULT_DEV_CERTIFICATE),build/target/product/security/testkey)
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200349 ifneq ($(LINEAGE_BUILDTYPE), UNOFFICIAL)
Zhao Wei Liew046484f2017-01-07 15:55:35 +0800350 ifndef TARGET_VENDOR_RELEASE_BUILD_ID
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200351 ifneq ($(LINEAGE_EXTRAVERSION),)
352 # Remove leading dash from LINEAGE_EXTRAVERSION
353 LINEAGE_EXTRAVERSION := $(shell echo $(LINEAGE_EXTRAVERSION) | sed 's/-//')
354 TARGET_VENDOR_RELEASE_BUILD_ID := $(LINEAGE_EXTRAVERSION)
Zhao Wei Liew046484f2017-01-07 15:55:35 +0800355 else
356 TARGET_VENDOR_RELEASE_BUILD_ID := $(shell date -u +%Y%m%d)
357 endif
358 else
359 TARGET_VENDOR_RELEASE_BUILD_ID := $(TARGET_VENDOR_RELEASE_BUILD_ID)
360 endif
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200361 ifeq ($(LINEAGE_VERSION_MAINTENANCE),0)
362 LINEAGE_DISPLAY_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(LINEAGE_BUILD)
Zhao Wei Liew046484f2017-01-07 15:55:35 +0800363 else
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200364 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 +0800365 endif
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000366 endif
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000367endif
Ricardo Cerqueira74b4f9b2014-01-11 16:00:16 +0000368endif
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000369
Brint E. Kriebela1e49122014-01-31 11:59:56 -0800370-include $(WORKSPACE)/build_env/image-auto-bits.mk
Dan Pasanen91f76202017-07-06 08:21:30 -0500371-include vendor/lineage/config/partner_gms.mk