blob: df171df34f85ff104c184cb12b17ac7990e7589d [file] [log] [blame]
Dan Pasanen03447712016-12-19 11:22:55 -06001PRODUCT_BRAND ?= LineageOS
Ricardo Cerqueira6ed03ff2011-11-28 16:37:47 +00002
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +00003PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0
4
Steve Kondik5a27f632013-11-06 13:55:11 -08005ifeq ($(PRODUCT_GMS_CLIENTID_BASE),)
Rashed Abdel-Tawab6255f032017-12-26 02:58:23 +02006PRODUCT_GENERIC_PROPERTIES += \
Steve Kondik5a27f632013-11-06 13:55:11 -08007 ro.com.google.clientidbase=android-google
8else
Rashed Abdel-Tawab6255f032017-12-26 02:58:23 +02009PRODUCT_GENERIC_PROPERTIES += \
Steve Kondik5a27f632013-11-06 13:55:11 -080010 ro.com.google.clientidbase=$(PRODUCT_GMS_CLIENTID_BASE)
11endif
12
Rashed Abdel-Tawab6255f032017-12-26 02:58:23 +020013PRODUCT_GENERIC_PROPERTIES += \
Zhao Wei Liewa18b0572017-01-13 15:41:01 +080014 keyguard.no_require_sim=true
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000015
Rashed Abdel-Tawab6255f032017-12-26 02:58:23 +020016PRODUCT_GENERIC_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-Tawab6255f032017-12-26 02:58:23 +020020PRODUCT_GENERIC_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-Tawab6255f032017-12-26 02:58:23 +020026PRODUCT_GENERIC_PROPERTIES += persist.sys.dun.override=0
Ricardo Cerqueiraed634842015-09-12 00:13:01 +010027endif
Steve Kondike4f938c2014-02-04 22:59:01 -080028
Chirayu Desai88401db2013-03-20 16:17:17 +053029ifneq ($(TARGET_BUILD_VARIANT),eng)
Chirayu Desai59df3632013-02-15 21:16:39 +053030# Enable ADB authentication
Luca Stefanic22b0dc2017-08-17 22:11:34 +020031PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.adb.secure=1
Chirayu Desai88401db2013-03-20 16:17:17 +053032endif
Chirayu Desai59df3632013-02-15 21:16:39 +053033
Luca Stefani75a79d62017-08-17 22:44:27 +020034ifeq ($(BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE),)
Luca Stefanic22b0dc2017-08-17 22:11:34 +020035 PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
Luca Stefani75a79d62017-08-17 22:44:27 +020036 ro.device.cache_dir=/data/cache
37else
Luca Stefanic22b0dc2017-08-17 22:11:34 +020038 PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
Luca Stefani75a79d62017-08-17 22:44:27 +020039 ro.device.cache_dir=/cache
40endif
41
Warren Togamib1637c82012-03-03 22:37:42 -100042# Backup Tool
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000043PRODUCT_COPY_FILES += \
Dan Pasanen91f76202017-07-06 08:21:30 -050044 vendor/lineage/prebuilt/common/bin/backuptool.sh:install/bin/backuptool.sh \
45 vendor/lineage/prebuilt/common/bin/backuptool.functions:install/bin/backuptool.functions \
Luca Stefani5c60e4f2017-08-17 19:28:48 +020046 vendor/lineage/prebuilt/common/bin/50-lineage.sh:system/addon.d/50-lineage.sh \
Dan Pasanen91f76202017-07-06 08:21:30 -050047 vendor/lineage/prebuilt/common/bin/blacklist:system/addon.d/blacklist
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000048
Abhisek Devkotaf1c5ab82016-07-06 15:18:29 -070049# Backup Services whitelist
50PRODUCT_COPY_FILES += \
Dan Pasanen91f76202017-07-06 08:21:30 -050051 vendor/lineage/config/permissions/backup.xml:system/etc/sysconfig/backup.xml
Abhisek Devkotaf1c5ab82016-07-06 15:18:29 -070052
Bruno Martinsa1b47e32017-10-16 09:37:03 +010053# Lineage-specific broadcast actions whitelist
54PRODUCT_COPY_FILES += \
55 vendor/lineage/config/permissions/lineage-sysconfig.xml:system/etc/sysconfig/lineage-sysconfig.xml
56
Ricardo Cerqueiraaff5e542014-05-09 22:24:12 +010057# Signature compatibility validation
58PRODUCT_COPY_FILES += \
Dan Pasanen91f76202017-07-06 08:21:30 -050059 vendor/lineage/prebuilt/common/bin/otasigcheck.sh:install/bin/otasigcheck.sh
Ricardo Cerqueiraaff5e542014-05-09 22:24:12 +010060
Steve Kondik485527d2011-12-20 12:14:24 -080061# init.d support
62PRODUCT_COPY_FILES += \
Dan Pasanen91f76202017-07-06 08:21:30 -050063 vendor/lineage/prebuilt/common/etc/init.d/00banner:system/etc/init.d/00banner \
64 vendor/lineage/prebuilt/common/bin/sysinit:system/bin/sysinit
Steve Kondik485527d2011-12-20 12:14:24 -080065
Ricardo Cerqueirafd6bfe72015-03-16 12:22:11 +000066ifneq ($(TARGET_BUILD_VARIANT),user)
James Sullinseb7799c2012-04-05 20:18:18 -050067# userinit support
68PRODUCT_COPY_FILES += \
Dan Pasanen91f76202017-07-06 08:21:30 -050069 vendor/lineage/prebuilt/common/etc/init.d/90userinit:system/etc/init.d/90userinit
Ricardo Cerqueirafd6bfe72015-03-16 12:22:11 +000070endif
James Sullinseb7799c2012-04-05 20:18:18 -050071
Sam Mortimerc1088522017-09-21 10:10:49 -070072# Copy all Lineage-specific init rc files
73$(foreach f,$(wildcard vendor/lineage/prebuilt/common/etc/init/*.rc),\
74 $(eval PRODUCT_COPY_FILES += $(f):system/etc/init/$(notdir $f)))
Ricardo Cerqueira8f412cb2012-10-18 16:38:25 +010075
herriojr5d2c9982015-10-01 11:20:26 -070076# Copy over added mimetype supported in libcore.net.MimeUtils
77PRODUCT_COPY_FILES += \
Dan Pasanen91f76202017-07-06 08:21:30 -050078 vendor/lineage/prebuilt/common/lib/content-types.properties:system/lib/content-types.properties
herriojr5d2c9982015-10-01 11:20:26 -070079
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000080# Enable SIP+VoIP on all targets
81PRODUCT_COPY_FILES += \
Ricardo Cerqueira3ff9b6f2012-07-11 11:21:50 +010082 frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000083
sleeplessninja918a7ea2013-01-30 14:45:20 -060084# Enable wireless Xbox 360 controller support
85PRODUCT_COPY_FILES += \
86 frameworks/base/data/keyboards/Vendor_045e_Product_028e.kl:system/usr/keylayout/Vendor_045e_Product_0719.kl
87
Luca Stefani5c60e4f2017-08-17 19:28:48 +020088# This is Lineage!
Steve Kondike0c12da2012-03-25 17:21:32 -070089PRODUCT_COPY_FILES += \
Ethan Chenc3532d92017-11-15 00:37:27 -080090 vendor/lineage/config/permissions/org.lineageos.android.xml:system/etc/permissions/org.lineageos.android.xml \
91 vendor/lineage/config/permissions/privapp-permissions-lineage.xml:system/etc/permissions/privapp-permissions-lineage.xml
Steve Kondike0c12da2012-03-25 17:21:32 -070092
Luca Stefani5c60e4f2017-08-17 19:28:48 +020093# Include Lineage audio files
94include vendor/lineage/config/lineage_audio.mk
Arne Coucheron61536d42016-09-09 00:04:09 +020095
Sam Mortimer19ce2d32017-09-18 21:05:19 -070096ifneq ($(TARGET_DISABLE_LINEAGE_SDK), true)
97# Lineage SDK
98include vendor/lineage/config/lineage_sdk_common.mk
Luca Stefani25801972016-08-27 00:44:50 +020099endif
Adnan Begovicf3610f52016-03-15 14:17:47 -0700100
Michael Bestasbeb05c82017-07-18 19:57:26 +0300101# TWRP
102ifeq ($(WITH_TWRP),true)
Dan Pasanen91f76202017-07-06 08:21:30 -0500103include vendor/lineage/config/twrp.mk
Michael Bestasbeb05c82017-07-18 19:57:26 +0300104endif
105
Dan Pasanen24a1cc92016-12-28 22:59:21 -0600106# Bootanimation
Asher Simondse035b9a2017-01-16 21:52:24 -0600107PRODUCT_PACKAGES += \
108 bootanimation.zip
Dan Pasanen24a1cc92016-12-28 22:59:21 -0600109
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200110# Required Lineage packages
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000111PRODUCT_PACKAGES += \
Steve Kondik4992d382016-08-29 18:23:03 -0700112 BluetoothExt \
Sam Mortimer19ce2d32017-09-18 21:05:19 -0700113 LineageParts \
Steve Kondike0c297d2011-12-20 16:16:01 -0800114 Development \
Michael Bestas6c664d92017-12-28 00:32:59 +0200115 Profiles
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000116
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200117# Optional packages
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000118PRODUCT_PACKAGES += \
Ricardo Cerqueira117984f2015-01-04 01:55:24 +0000119 libemoji \
Arne Coucheron61536d42016-09-09 00:04:09 +0200120 LiveWallpapersPicker \
Steve Kondikdf96b442016-10-13 11:37:08 -0700121 PhotoTable \
122 Terminal
Koushik Dutta8387c322011-11-26 17:31:19 -0800123
Alexander Martinze7f40582016-12-01 18:57:48 +0100124# Include explicitly to work around GMS issues
Steve Kondikdac37852015-12-01 13:31:45 -0800125PRODUCT_PACKAGES += \
Alexander Martinze7f40582016-12-01 18:57:48 +0100126 libprotobuf-cpp-full \
Steve Kondikdac37852015-12-01 13:31:45 -0800127 librsjni
128
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200129# Custom Lineage packages
Steve Kondik04a49412011-12-14 14:02:19 -0800130PRODUCT_PACKAGES += \
Steve Kondikc4f6b972014-12-09 13:29:29 -0800131 AudioFX \
Sam Mortimer19ce2d32017-09-18 21:05:19 -0700132 LineageSettingsProvider \
cretin457674e052017-02-11 11:39:59 -0800133 LineageSetupWizard \
Steve Kondikdf96b442016-10-13 11:37:08 -0700134 Eleven \
d34d2cf159c2016-03-08 09:12:04 -0800135 ExactCalculator \
Joey Rizzoli177ab032017-04-20 22:17:37 +0200136 Jelly \
Steve Kondikdf96b442016-10-13 11:37:08 -0700137 LockClock \
Steve Kondikdf96b442016-10-13 11:37:08 -0700138 Trebuchet \
Gabriele Mc7b874b2017-07-06 12:30:35 +0200139 Updater \
Steve Kondikdf96b442016-10-13 11:37:08 -0700140 WallpaperPicker \
141 WeatherProvider
Steve Kondik04a49412011-12-14 14:02:19 -0800142
Abhisek Devkotacf03e162016-03-14 12:45:43 -0800143# Exchange support
144PRODUCT_PACKAGES += \
145 Exchange2
146
Joey7f9596f2018-01-20 14:06:47 +0100147# Berry styles
148PRODUCT_PACKAGES += \
149 LineageDarkTheme \
150 LineageBlackAccent \
151 LineageBlueAccent \
152 LineageBrownAccent \
153 LineageGreenAccent \
154 LineageOrangeAccent \
155 LineagePinkAccent \
156 LineagePurpleAccent \
157 LineageRedAccent \
158 LineageYellowAccent
159
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200160# Extra tools in Lineage
Sebastian Schmidt7d5de0c2012-04-15 11:39:25 +0200161PRODUCT_PACKAGES += \
Arne Coucheron61536d42016-09-09 00:04:09 +0200162 7z \
Arne Coucheron61536d42016-09-09 00:04:09 +0200163 bash \
164 bzip2 \
165 curl \
Steve Kondikdf96b442016-10-13 11:37:08 -0700166 fsck.ntfs \
167 gdbserver \
168 htop \
169 lib7z \
170 libsepol \
171 micro_bench \
172 mke2fs \
173 mkfs.ntfs \
174 mount.ntfs \
175 oprofiled \
176 pigz \
Arne Coucheron61536d42016-09-09 00:04:09 +0200177 powertop \
Steve Kondikdf96b442016-10-13 11:37:08 -0700178 sqlite3 \
179 strace \
180 tune2fs \
Arne Coucheron61536d42016-09-09 00:04:09 +0200181 unrar \
182 unzip \
183 vim \
184 wget \
185 zip
Sebastian Schmidt7d5de0c2012-04-15 11:39:25 +0200186
codeworkx9f22e532018-01-06 11:59:30 +0100187# Charger
Steve Kondik75956202016-08-07 23:21:29 -0700188PRODUCT_PACKAGES += \
codeworkx9f22e532018-01-06 11:59:30 +0100189 charger_res_images
190
191# Custom off-mode charger
192ifeq ($(WITH_LINEAGE_CHARGER),true)
193PRODUCT_PACKAGES += \
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200194 lineage_charger_res_images \
Steve Kondik75956202016-08-07 23:21:29 -0700195 font_log.png \
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200196 libhealthd.lineage
Steve Kondik75956202016-08-07 23:21:29 -0700197endif
198
Paul Keith08004d82018-02-22 14:06:54 +0100199# exFAT tools
Scott Mertz2911a0e2015-11-09 11:35:41 -0800200PRODUCT_PACKAGES += \
Scott Mertz2911a0e2015-11-09 11:35:41 -0800201 fsck.exfat \
202 mkfs.exfat
Scott Mertz2911a0e2015-11-09 11:35:41 -0800203
Chirayu Desai8636d672012-07-19 16:04:25 +0530204# Openssh
205PRODUCT_PACKAGES += \
206 scp \
207 sftp \
208 ssh \
209 sshd \
210 sshd_config \
211 ssh-keygen \
Chirayu Desai4bacf672012-08-19 17:30:04 +0530212 start-ssh
213
214# rsync
215PRODUCT_PACKAGES += \
216 rsync
Chirayu Desai8636d672012-07-19 16:04:25 +0530217
Michael Bestas7d5d16d2014-06-10 20:06:48 +0300218# Stagefright FFMPEG plugin
Steve Kondikb5ee3772016-09-06 03:06:35 -0700219PRODUCT_PACKAGES += \
220 libffmpeg_extractor \
221 libffmpeg_omx \
222 media_codecs_ffmpeg.xml
223
Rashed Abdel-Tawab6255f032017-12-26 02:58:23 +0200224PRODUCT_GENERIC_PROPERTIES += \
Steve Kondikb5ee3772016-09-06 03:06:35 -0700225 media.sf.omx-plugin=libffmpeg_omx.so \
226 media.sf.extractor-plugin=libffmpeg_extractor.so
Steve Kondik7c968692015-07-08 09:53:12 -0700227
Joey Rizzoli73a39652016-11-23 21:19:00 +0100228# Storage manager
Rashed Abdel-Tawab6255f032017-12-26 02:58:23 +0200229PRODUCT_GENERIC_PROPERTIES += \
Joey Rizzoli73a39652016-11-23 21:19:00 +0100230 ro.storage_manager.enabled=true
231
Luca Stefani5c91b612018-01-24 16:35:11 +0100232# Media
Rashed Abdel-Tawab6255f032017-12-26 02:58:23 +0200233PRODUCT_GENERIC_PROPERTIES += \
Luca Stefani5c91b612018-01-24 16:35:11 +0100234 media.recorder.show_manufacturer_and_model=true
235
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100236# These packages are excluded from user builds
237ifneq ($(TARGET_BUILD_VARIANT),user)
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100238PRODUCT_PACKAGES += \
Steve Kondik275701b2013-11-06 12:41:34 -0800239 procmem \
Abhisek Devkota6af9acb2016-12-27 22:30:35 -0800240 procrank
241
242# Conditionally build in su
243ifeq ($(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
Dan Pasanen91f76202017-07-06 08:21:30 -0500249DEVICE_PACKAGE_OVERLAYS += vendor/lineage/overlay/common
Koushik Duttac6f7a492011-11-28 07:44:23 -0800250
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200251PRODUCT_VERSION_MAJOR = 15
Adrian DC93256e42017-12-07 01:34:33 +0100252PRODUCT_VERSION_MINOR = 1
Dan Pasanen69354102016-08-24 10:19:50 -0500253PRODUCT_VERSION_MAINTENANCE := 0
Adrian DC3e85bf72016-08-06 21:47:23 +0200254
Scott Mertza9950592016-08-05 12:24:19 -0700255ifeq ($(TARGET_VENDOR_SHOW_MAINTENANCE_VERSION),true)
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200256 LINEAGE_VERSION_MAINTENANCE := $(PRODUCT_VERSION_MAINTENANCE)
Scott Mertza9950592016-08-05 12:24:19 -0700257else
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200258 LINEAGE_VERSION_MAINTENANCE := 0
Scott Mertza9950592016-08-05 12:24:19 -0700259endif
Koushik Duttac6f7a492011-11-28 07:44:23 -0800260
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200261# Set LINEAGE_BUILDTYPE from the env RELEASE_TYPE, for jenkins compat
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100262
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200263ifndef LINEAGE_BUILDTYPE
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100264 ifdef RELEASE_TYPE
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200265 # Starting with "LINEAGE_" is optional
266 RELEASE_TYPE := $(shell echo $(RELEASE_TYPE) | sed -e 's|^LINEAGE_||g')
267 LINEAGE_BUILDTYPE := $(RELEASE_TYPE)
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100268 endif
Warren Togami2128e2f2012-05-06 19:49:33 -1000269endif
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100270
271# Filter out random types, so it'll reset to UNOFFICIAL
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200272ifeq ($(filter RELEASE NIGHTLY SNAPSHOT EXPERIMENTAL,$(LINEAGE_BUILDTYPE)),)
273 LINEAGE_BUILDTYPE :=
Warren Togami2128e2f2012-05-06 19:49:33 -1000274endif
275
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200276ifdef LINEAGE_BUILDTYPE
277 ifneq ($(LINEAGE_BUILDTYPE), SNAPSHOT)
278 ifdef LINEAGE_EXTRAVERSION
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100279 # Force build type to EXPERIMENTAL
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200280 LINEAGE_BUILDTYPE := EXPERIMENTAL
281 # Remove leading dash from LINEAGE_EXTRAVERSION
282 LINEAGE_EXTRAVERSION := $(shell echo $(LINEAGE_EXTRAVERSION) | sed 's/-//')
283 # Add leading dash to LINEAGE_EXTRAVERSION
284 LINEAGE_EXTRAVERSION := -$(LINEAGE_EXTRAVERSION)
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100285 endif
286 else
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200287 ifndef LINEAGE_EXTRAVERSION
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100288 # Force build type to EXPERIMENTAL, SNAPSHOT mandates a tag
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200289 LINEAGE_BUILDTYPE := EXPERIMENTAL
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100290 else
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200291 # Remove leading dash from LINEAGE_EXTRAVERSION
292 LINEAGE_EXTRAVERSION := $(shell echo $(LINEAGE_EXTRAVERSION) | sed 's/-//')
293 # Add leading dash to LINEAGE_EXTRAVERSION
294 LINEAGE_EXTRAVERSION := -$(LINEAGE_EXTRAVERSION)
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100295 endif
Ricardo Cerqueirad8e76662012-06-08 11:08:15 +0100296 endif
297else
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200298 # If LINEAGE_BUILDTYPE is not defined, set to UNOFFICIAL
299 LINEAGE_BUILDTYPE := UNOFFICIAL
300 LINEAGE_EXTRAVERSION :=
Warren Togami2128e2f2012-05-06 19:49:33 -1000301endif
302
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200303ifeq ($(LINEAGE_BUILDTYPE), UNOFFICIAL)
Matt Mowerf4168392013-12-13 11:04:14 -0600304 ifneq ($(TARGET_UNOFFICIAL_BUILD_ID),)
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200305 LINEAGE_EXTRAVERSION := -$(TARGET_UNOFFICIAL_BUILD_ID)
Matt Mowerf4168392013-12-13 11:04:14 -0600306 endif
307endif
308
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200309ifeq ($(LINEAGE_BUILDTYPE), RELEASE)
Ricardo Cerqueiraae71f042013-11-11 00:55:51 +0000310 ifndef TARGET_VENDOR_RELEASE_BUILD_ID
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200311 LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(LINEAGE_BUILD)
Ricardo Cerqueiraae71f042013-11-11 00:55:51 +0000312 else
313 ifeq ($(TARGET_BUILD_VARIANT),user)
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200314 ifeq ($(LINEAGE_VERSION_MAINTENANCE),0)
315 LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(LINEAGE_BUILD)
Jessica Wagantall79204e62016-07-14 15:42:08 -0700316 else
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200317 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 -0700318 endif
Ricardo Cerqueiraae71f042013-11-11 00:55:51 +0000319 else
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200320 LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(LINEAGE_BUILD)
Ricardo Cerqueiraae71f042013-11-11 00:55:51 +0000321 endif
322 endif
Koushik Duttac6f7a492011-11-28 07:44:23 -0800323else
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200324 ifeq ($(LINEAGE_VERSION_MAINTENANCE),0)
Michael Bestas24807ea2017-12-24 04:08:07 +0200325 ifeq ($(LINEAGE_VERSION_APPEND_TIME_OF_DAY),true)
Kevin F. Haggertya2440d02017-10-21 04:41:20 +0200326 LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(shell date -u +%Y%m%d_%H%M%S)-$(LINEAGE_BUILDTYPE)$(LINEAGE_EXTRAVERSION)-$(LINEAGE_BUILD)
327 else
328 LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(shell date -u +%Y%m%d)-$(LINEAGE_BUILDTYPE)$(LINEAGE_EXTRAVERSION)-$(LINEAGE_BUILD)
329 endif
Jessica Wagantall79204e62016-07-14 15:42:08 -0700330 else
Michael Bestas24807ea2017-12-24 04:08:07 +0200331 ifeq ($(LINEAGE_VERSION_APPEND_TIME_OF_DAY),true)
Kevin F. Haggertya2440d02017-10-21 04:41:20 +0200332 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)
333 else
334 LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(LINEAGE_VERSION_MAINTENANCE)-$(shell date -u +%Y%m%d)-$(LINEAGE_BUILDTYPE)$(LINEAGE_EXTRAVERSION)-$(LINEAGE_BUILD)
335 endif
Jessica Wagantall79204e62016-07-14 15:42:08 -0700336 endif
Koushik Duttac6f7a492011-11-28 07:44:23 -0800337endif
Koushik Duttad69b2922012-02-23 14:07:44 -0800338
Rashed Abdel-Tawab6255f032017-12-26 02:58:23 +0200339PRODUCT_GENERIC_PROPERTIES += \
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200340 ro.lineage.version=$(LINEAGE_VERSION) \
341 ro.lineage.releasetype=$(LINEAGE_BUILDTYPE) \
Gabriele Mafbbe4b2017-07-02 17:50:27 +0200342 ro.lineage.build.version=$(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR) \
Zhao Wei Liew046484f2017-01-07 15:55:35 +0800343 ro.modversion=$(LINEAGE_VERSION) \
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200344 ro.lineagelegal.url=https://lineageos.org/legal
Ricardo Cerqueirad5422742012-11-13 10:42:11 +0000345
Tom Powelle4c8c822017-01-06 22:29:06 -0800346PRODUCT_EXTRA_RECOVERY_KEYS += \
Dan Pasanen91f76202017-07-06 08:21:30 -0500347 vendor/lineage/build/target/product/security/lineage
Tom Powelle4c8c822017-01-06 22:29:06 -0800348
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200349-include vendor/lineage-priv/keys/keys.mk
Ricardo Cerqueira178dbd62013-10-23 20:56:56 +0100350
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200351LINEAGE_DISPLAY_VERSION := $(LINEAGE_VERSION)
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000352
Brint E. Kriebelac948f52014-01-24 09:58:36 -0800353ifneq ($(PRODUCT_DEFAULT_DEV_CERTIFICATE),)
354ifneq ($(PRODUCT_DEFAULT_DEV_CERTIFICATE),build/target/product/security/testkey)
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200355 ifneq ($(LINEAGE_BUILDTYPE), UNOFFICIAL)
Zhao Wei Liew046484f2017-01-07 15:55:35 +0800356 ifndef TARGET_VENDOR_RELEASE_BUILD_ID
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200357 ifneq ($(LINEAGE_EXTRAVERSION),)
358 # Remove leading dash from LINEAGE_EXTRAVERSION
359 LINEAGE_EXTRAVERSION := $(shell echo $(LINEAGE_EXTRAVERSION) | sed 's/-//')
360 TARGET_VENDOR_RELEASE_BUILD_ID := $(LINEAGE_EXTRAVERSION)
Zhao Wei Liew046484f2017-01-07 15:55:35 +0800361 else
362 TARGET_VENDOR_RELEASE_BUILD_ID := $(shell date -u +%Y%m%d)
363 endif
364 else
365 TARGET_VENDOR_RELEASE_BUILD_ID := $(TARGET_VENDOR_RELEASE_BUILD_ID)
366 endif
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200367 ifeq ($(LINEAGE_VERSION_MAINTENANCE),0)
368 LINEAGE_DISPLAY_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(LINEAGE_BUILD)
Zhao Wei Liew046484f2017-01-07 15:55:35 +0800369 else
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200370 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 +0800371 endif
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000372 endif
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000373endif
Ricardo Cerqueira74b4f9b2014-01-11 16:00:16 +0000374endif
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000375
Rashed Abdel-Tawab6255f032017-12-26 02:58:23 +0200376PRODUCT_GENERIC_PROPERTIES += \
Luca Stefani5c60e4f2017-08-17 19:28:48 +0200377 ro.lineage.display.version=$(LINEAGE_DISPLAY_VERSION)
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000378
Brint E. Kriebela1e49122014-01-31 11:59:56 -0800379-include $(WORKSPACE)/build_env/image-auto-bits.mk
Dan Pasanen91f76202017-07-06 08:21:30 -0500380-include vendor/lineage/config/partner_gms.mk
Koushik Dutta41fd0aa2013-12-07 22:04:17 -0800381-include vendor/cyngn/product.mk
Steve Kondikb9dd4002014-09-10 15:41:43 -0700382
Chris Sarbora39b9aa82014-12-17 14:41:28 -0800383$(call prepend-product-if-exists, vendor/extra/product.mk)