Christopher N. Hesse | e4a4088 | 2018-09-21 23:00:26 +0200 | [diff] [blame] | 1 | # Allow vendor/extra to override any property by setting it first |
| 2 | $(call inherit-product-if-exists, vendor/extra/product.mk) |
| 3 | |
Dan Pasanen | 0344771 | 2016-12-19 11:22:55 -0600 | [diff] [blame] | 4 | PRODUCT_BRAND ?= LineageOS |
Ricardo Cerqueira | 6ed03ff | 2011-11-28 16:37:47 +0000 | [diff] [blame] | 5 | |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 6 | PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0 |
| 7 | |
Steve Kondik | 5a27f63 | 2013-11-06 13:55:11 -0800 | [diff] [blame] | 8 | ifeq ($(PRODUCT_GMS_CLIENTID_BASE),) |
Rashed Abdel-Tawab | b6fb3e1 | 2018-03-02 10:21:37 -0500 | [diff] [blame] | 9 | PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \ |
Steve Kondik | 5a27f63 | 2013-11-06 13:55:11 -0800 | [diff] [blame] | 10 | ro.com.google.clientidbase=android-google |
| 11 | else |
Rashed Abdel-Tawab | b6fb3e1 | 2018-03-02 10:21:37 -0500 | [diff] [blame] | 12 | PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \ |
Steve Kondik | 5a27f63 | 2013-11-06 13:55:11 -0800 | [diff] [blame] | 13 | ro.com.google.clientidbase=$(PRODUCT_GMS_CLIENTID_BASE) |
| 14 | endif |
| 15 | |
codeworkx | d51aef2 | 2018-09-14 14:35:14 +0200 | [diff] [blame] | 16 | ifeq ($(TARGET_BUILD_VARIANT),eng) |
| 17 | # Disable ADB authentication |
| 18 | PRODUCT_SYSTEM_DEFAULT_PROPERTIES += ro.adb.secure=0 |
| 19 | else |
Chirayu Desai | 59df363 | 2013-02-15 21:16:39 +0530 | [diff] [blame] | 20 | # Enable ADB authentication |
Bruno Martins | e68dd97 | 2018-03-06 09:42:15 -0600 | [diff] [blame] | 21 | PRODUCT_SYSTEM_DEFAULT_PROPERTIES += ro.adb.secure=1 |
Chirayu Desai | 88401db | 2013-03-20 16:17:17 +0530 | [diff] [blame] | 22 | endif |
Chirayu Desai | 59df363 | 2013-02-15 21:16:39 +0530 | [diff] [blame] | 23 | |
Warren Togami | b1637c8 | 2012-03-03 22:37:42 -1000 | [diff] [blame] | 24 | # Backup Tool |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 25 | PRODUCT_COPY_FILES += \ |
Dan Pasanen | 91f7620 | 2017-07-06 08:21:30 -0500 | [diff] [blame] | 26 | vendor/lineage/prebuilt/common/bin/backuptool.sh:install/bin/backuptool.sh \ |
| 27 | vendor/lineage/prebuilt/common/bin/backuptool.functions:install/bin/backuptool.functions \ |
Wang Han | e43d699 | 2020-02-05 16:45:15 +0800 | [diff] [blame] | 28 | vendor/lineage/prebuilt/common/bin/50-lineage.sh:$(TARGET_COPY_OUT_SYSTEM)/addon.d/50-lineage.sh |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 29 | |
Dan Pasanen | 3e7435c | 2019-10-23 08:35:32 -0500 | [diff] [blame] | 30 | ifneq ($(AB_OTA_PARTITIONS),) |
Dan Pasanen | 4a049b5 | 2017-01-16 19:26:50 -0600 | [diff] [blame] | 31 | PRODUCT_COPY_FILES += \ |
Michael Bestas | f4032b8 | 2019-09-15 16:32:33 +0300 | [diff] [blame] | 32 | 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 Stefani | b3bd728 | 2020-03-26 08:15:14 +0100 | [diff] [blame] | 35 | ifneq ($(TARGET_BUILD_VARIANT),user) |
| 36 | PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \ |
| 37 | ro.ota.allow_downgrade=true |
| 38 | endif |
Dan Pasanen | 4a049b5 | 2017-01-16 19:26:50 -0600 | [diff] [blame] | 39 | endif |
| 40 | |
Abhisek Devkota | f1c5ab8 | 2016-07-06 15:18:29 -0700 | [diff] [blame] | 41 | # Backup Services whitelist |
| 42 | PRODUCT_COPY_FILES += \ |
Michael Bestas | f4032b8 | 2019-09-15 16:32:33 +0300 | [diff] [blame] | 43 | vendor/lineage/config/permissions/backup.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysconfig/backup.xml |
Abhisek Devkota | f1c5ab8 | 2016-07-06 15:18:29 -0700 | [diff] [blame] | 44 | |
Bruno Martins | a1b47e3 | 2017-10-16 09:37:03 +0100 | [diff] [blame] | 45 | # Lineage-specific broadcast actions whitelist |
| 46 | PRODUCT_COPY_FILES += \ |
Michael Bestas | f4032b8 | 2019-09-15 16:32:33 +0300 | [diff] [blame] | 47 | vendor/lineage/config/permissions/lineage-sysconfig.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysconfig/lineage-sysconfig.xml |
Bruno Martins | a1b47e3 | 2017-10-16 09:37:03 +0100 | [diff] [blame] | 48 | |
Sam Mortimer | c108852 | 2017-09-21 10:10:49 -0700 | [diff] [blame] | 49 | # Copy all Lineage-specific init rc files |
| 50 | $(foreach f,$(wildcard vendor/lineage/prebuilt/common/etc/init/*.rc),\ |
Michael Bestas | f4032b8 | 2019-09-15 16:32:33 +0300 | [diff] [blame] | 51 | $(eval PRODUCT_COPY_FILES += $(f):$(TARGET_COPY_OUT_SYSTEM)/etc/init/$(notdir $f))) |
Ricardo Cerqueira | 8f412cb | 2012-10-18 16:38:25 +0100 | [diff] [blame] | 52 | |
herriojr | 5d2c998 | 2015-10-01 11:20:26 -0700 | [diff] [blame] | 53 | # Copy over added mimetype supported in libcore.net.MimeUtils |
| 54 | PRODUCT_COPY_FILES += \ |
Michael Bestas | f4032b8 | 2019-09-15 16:32:33 +0300 | [diff] [blame] | 55 | vendor/lineage/prebuilt/common/lib/content-types.properties:$(TARGET_COPY_OUT_SYSTEM)/lib/content-types.properties |
herriojr | 5d2c998 | 2015-10-01 11:20:26 -0700 | [diff] [blame] | 56 | |
LuK1337 | 4f0ad57 | 2019-10-24 02:33:34 +0200 | [diff] [blame] | 57 | # Enable Android Beam on all targets |
| 58 | PRODUCT_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 Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 61 | # Enable SIP+VoIP on all targets |
| 62 | PRODUCT_COPY_FILES += \ |
Michael Bestas | f4032b8 | 2019-09-15 16:32:33 +0300 | [diff] [blame] | 63 | frameworks/native/data/etc/android.software.sip.voip.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/android.software.sip.voip.xml |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 64 | |
sleeplessninja | 918a7ea | 2013-01-30 14:45:20 -0600 | [diff] [blame] | 65 | # Enable wireless Xbox 360 controller support |
| 66 | PRODUCT_COPY_FILES += \ |
Michael Bestas | f4032b8 | 2019-09-15 16:32:33 +0300 | [diff] [blame] | 67 | frameworks/base/data/keyboards/Vendor_045e_Product_028e.kl:$(TARGET_COPY_OUT_SYSTEM)/usr/keylayout/Vendor_045e_Product_0719.kl |
sleeplessninja | 918a7ea | 2013-01-30 14:45:20 -0600 | [diff] [blame] | 68 | |
Luca Stefani | 5c60e4f | 2017-08-17 19:28:48 +0200 | [diff] [blame] | 69 | # This is Lineage! |
Steve Kondik | e0c12da | 2012-03-25 17:21:32 -0700 | [diff] [blame] | 70 | PRODUCT_COPY_FILES += \ |
Michael Bestas | f4032b8 | 2019-09-15 16:32:33 +0300 | [diff] [blame] | 71 | vendor/lineage/config/permissions/org.lineageos.android.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/org.lineageos.android.xml \ |
| 72 | vendor/lineage/config/permissions/privapp-permissions-lineage-system.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/privapp-permissions-lineage.xml \ |
Han Wang | 89521b1 | 2019-09-15 13:36:12 +0200 | [diff] [blame] | 73 | vendor/lineage/config/permissions/privapp-permissions-lineage-product.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/privapp-permissions-lineage.xml \ |
Michael Bestas | f4032b8 | 2019-09-15 16:32:33 +0300 | [diff] [blame] | 74 | vendor/lineage/config/permissions/privapp-permissions-cm-legacy.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/privapp-permissions-cm-legacy.xml |
Steve Kondik | e0c12da | 2012-03-25 17:21:32 -0700 | [diff] [blame] | 75 | |
Luca Stefani | 214dfb9 | 2019-07-25 18:05:40 +0200 | [diff] [blame] | 76 | # Enforce privapp-permissions whitelist |
| 77 | PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \ |
| 78 | ro.control_privapp_permissions=enforce |
| 79 | |
Luca Stefani | dab1569 | 2018-08-30 14:41:32 +0200 | [diff] [blame] | 80 | # Hidden API whitelist |
| 81 | PRODUCT_COPY_FILES += \ |
Michael Bestas | f4032b8 | 2019-09-15 16:32:33 +0300 | [diff] [blame] | 82 | vendor/lineage/config/permissions/lineage-hiddenapi-package-whitelist.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/lineage-hiddenapi-package-whitelist.xml |
Luca Stefani | dab1569 | 2018-08-30 14:41:32 +0200 | [diff] [blame] | 83 | |
Han Wang | bf74b7f | 2019-01-06 06:53:03 +0100 | [diff] [blame] | 84 | # Power whitelist |
| 85 | PRODUCT_COPY_FILES += \ |
Michael Bestas | f4032b8 | 2019-09-15 16:32:33 +0300 | [diff] [blame] | 86 | vendor/lineage/config/permissions/lineage-power-whitelist.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysconfig/lineage-power-whitelist.xml |
Han Wang | bf74b7f | 2019-01-06 06:53:03 +0100 | [diff] [blame] | 87 | |
Arne Coucheron | 95b8fa9 | 2019-12-18 06:34:24 +0100 | [diff] [blame] | 88 | # Pre-granted permissions |
| 89 | PRODUCT_COPY_FILES += \ |
| 90 | vendor/lineage/config/permissions/lineage-default-permissions.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/default-permissions/lineage-default-permissions.xml |
| 91 | |
Michael Bestas | f8b28f1 | 2019-04-12 02:08:21 +0300 | [diff] [blame] | 92 | # Include AOSP audio files |
| 93 | include vendor/lineage/config/aosp_audio.mk |
| 94 | |
Luca Stefani | 5c60e4f | 2017-08-17 19:28:48 +0200 | [diff] [blame] | 95 | # Include Lineage audio files |
| 96 | include vendor/lineage/config/lineage_audio.mk |
Arne Coucheron | 61536d4 | 2016-09-09 00:04:09 +0200 | [diff] [blame] | 97 | |
Sam Mortimer | 19ce2d3 | 2017-09-18 21:05:19 -0700 | [diff] [blame] | 98 | ifneq ($(TARGET_DISABLE_LINEAGE_SDK), true) |
| 99 | # Lineage SDK |
| 100 | include vendor/lineage/config/lineage_sdk_common.mk |
Luca Stefani | 2580197 | 2016-08-27 00:44:50 +0200 | [diff] [blame] | 101 | endif |
Adnan Begovic | f3610f5 | 2016-03-15 14:17:47 -0700 | [diff] [blame] | 102 | |
Michael Bestas | beb05c8 | 2017-07-18 19:57:26 +0300 | [diff] [blame] | 103 | # TWRP |
| 104 | ifeq ($(WITH_TWRP),true) |
Dan Pasanen | 91f7620 | 2017-07-06 08:21:30 -0500 | [diff] [blame] | 105 | include vendor/lineage/config/twrp.mk |
Michael Bestas | beb05c8 | 2017-07-18 19:57:26 +0300 | [diff] [blame] | 106 | endif |
| 107 | |
Luca Stefani | c4d1190 | 2019-01-05 11:46:23 +0100 | [diff] [blame] | 108 | # Do not include art debug targets |
| 109 | PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD := false |
| 110 | |
| 111 | # Strip the local variable table and the local variable type table to reduce |
| 112 | # the size of the system image. This has no bearing on stack traces, but will |
| 113 | # leave less information available via JDWP. |
| 114 | PRODUCT_MINIMIZE_JAVA_DEBUG_INFO := true |
| 115 | |
Luca Stefani | 24ada06 | 2017-08-17 21:43:22 +0200 | [diff] [blame] | 116 | # Disable vendor restrictions |
| 117 | PRODUCT_RESTRICT_VENDOR_FILES := false |
| 118 | |
Dan Pasanen | 24a1cc9 | 2016-12-28 22:59:21 -0600 | [diff] [blame] | 119 | # Bootanimation |
Asher Simonds | e035b9a | 2017-01-16 21:52:24 -0600 | [diff] [blame] | 120 | PRODUCT_PACKAGES += \ |
| 121 | bootanimation.zip |
Dan Pasanen | 24a1cc9 | 2016-12-28 22:59:21 -0600 | [diff] [blame] | 122 | |
Michael Bestas | 85fdce3 | 2019-09-13 20:58:35 +0300 | [diff] [blame] | 123 | # AOSP packages |
Ricardo Cerqueira | e1f3738 | 2011-11-27 19:56:54 +0000 | [diff] [blame] | 124 | PRODUCT_PACKAGES += \ |
Steve Kondik | df96b44 | 2016-10-13 11:37:08 -0700 | [diff] [blame] | 125 | Terminal |
Koushik Dutta | 8387c32 | 2011-11-26 17:31:19 -0800 | [diff] [blame] | 126 | |
Michael Bestas | 85fdce3 | 2019-09-13 20:58:35 +0300 | [diff] [blame] | 127 | # Lineage packages |
Steve Kondik | 04a4941 | 2011-12-14 14:02:19 -0800 | [diff] [blame] | 128 | PRODUCT_PACKAGES += \ |
Michael Bestas | 85fdce3 | 2019-09-13 20:58:35 +0300 | [diff] [blame] | 129 | LineageParts \ |
Sam Mortimer | 19ce2d3 | 2017-09-18 21:05:19 -0700 | [diff] [blame] | 130 | LineageSettingsProvider \ |
cretin45 | 7674e05 | 2017-02-11 11:39:59 -0800 | [diff] [blame] | 131 | LineageSetupWizard \ |
Aaron Kling | 8926990 | 2020-02-22 01:25:46 -0600 | [diff] [blame] | 132 | Updater |
Luca Stefani | 31264cd | 2019-11-01 22:01:21 +0100 | [diff] [blame] | 133 | |
| 134 | # Themes |
| 135 | PRODUCT_PACKAGES += \ |
| 136 | LineageThemesStub \ |
Luca Stefani | 406b4dc | 2019-11-01 21:34:55 +0100 | [diff] [blame] | 137 | ThemePicker |
Joey | 7f9596f | 2018-01-20 14:06:47 +0100 | [diff] [blame] | 138 | |
Luca Stefani | 5c60e4f | 2017-08-17 19:28:48 +0200 | [diff] [blame] | 139 | # Extra tools in Lineage |
Sebastian Schmidt | 7d5de0c | 2012-04-15 11:39:25 +0200 | [diff] [blame] | 140 | PRODUCT_PACKAGES += \ |
Arne Coucheron | 61536d4 | 2016-09-09 00:04:09 +0200 | [diff] [blame] | 141 | 7z \ |
Tom Marshall | e08b021 | 2018-03-06 23:32:20 +0100 | [diff] [blame] | 142 | awk \ |
Arne Coucheron | 61536d4 | 2016-09-09 00:04:09 +0200 | [diff] [blame] | 143 | bash \ |
| 144 | bzip2 \ |
| 145 | curl \ |
LuK1337 | bf5dcb1 | 2019-03-22 10:42:33 +0100 | [diff] [blame] | 146 | getcap \ |
Steve Kondik | df96b44 | 2016-10-13 11:37:08 -0700 | [diff] [blame] | 147 | htop \ |
| 148 | lib7z \ |
| 149 | libsepol \ |
LuK1337 | defae4a | 2019-10-09 01:45:33 +0200 | [diff] [blame] | 150 | nano \ |
Steve Kondik | df96b44 | 2016-10-13 11:37:08 -0700 | [diff] [blame] | 151 | pigz \ |
Arne Coucheron | 61536d4 | 2016-09-09 00:04:09 +0200 | [diff] [blame] | 152 | powertop \ |
LuK1337 | bf5dcb1 | 2019-03-22 10:42:33 +0100 | [diff] [blame] | 153 | setcap \ |
Arne Coucheron | 61536d4 | 2016-09-09 00:04:09 +0200 | [diff] [blame] | 154 | unrar \ |
| 155 | unzip \ |
| 156 | vim \ |
| 157 | wget \ |
| 158 | zip |
Sebastian Schmidt | 7d5de0c | 2012-04-15 11:39:25 +0200 | [diff] [blame] | 159 | |
Bruno Martins | db4aa05 | 2018-07-25 09:40:10 +0100 | [diff] [blame] | 160 | # Filesystems tools |
Scott Mertz | 2911a0e | 2015-11-09 11:35:41 -0800 | [diff] [blame] | 161 | PRODUCT_PACKAGES += \ |
Scott Mertz | 2911a0e | 2015-11-09 11:35:41 -0800 | [diff] [blame] | 162 | fsck.exfat \ |
Bruno Martins | db4aa05 | 2018-07-25 09:40:10 +0100 | [diff] [blame] | 163 | fsck.ntfs \ |
| 164 | mke2fs \ |
| 165 | mkfs.exfat \ |
| 166 | mkfs.ntfs \ |
| 167 | mount.ntfs |
Scott Mertz | 2911a0e | 2015-11-09 11:35:41 -0800 | [diff] [blame] | 168 | |
Chirayu Desai | 8636d67 | 2012-07-19 16:04:25 +0530 | [diff] [blame] | 169 | # Openssh |
| 170 | PRODUCT_PACKAGES += \ |
| 171 | scp \ |
| 172 | sftp \ |
| 173 | ssh \ |
| 174 | sshd \ |
| 175 | sshd_config \ |
| 176 | ssh-keygen \ |
Chirayu Desai | 4bacf67 | 2012-08-19 17:30:04 +0530 | [diff] [blame] | 177 | start-ssh |
| 178 | |
| 179 | # rsync |
| 180 | PRODUCT_PACKAGES += \ |
| 181 | rsync |
Chirayu Desai | 8636d67 | 2012-07-19 16:04:25 +0530 | [diff] [blame] | 182 | |
Joey Rizzoli | 73a3965 | 2016-11-23 21:19:00 +0100 | [diff] [blame] | 183 | # Storage manager |
Rashed Abdel-Tawab | b6fb3e1 | 2018-03-02 10:21:37 -0500 | [diff] [blame] | 184 | PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \ |
Joey Rizzoli | 73a3965 | 2016-11-23 21:19:00 +0100 | [diff] [blame] | 185 | ro.storage_manager.enabled=true |
| 186 | |
Ricardo Cerqueira | a21887e | 2013-09-25 17:13:25 +0100 | [diff] [blame] | 187 | # These packages are excluded from user builds |
Bruno Martins | 8d3ac29 | 2018-07-25 10:11:41 +0100 | [diff] [blame] | 188 | PRODUCT_PACKAGES_DEBUG += \ |
Bruno Martins | 3bf932e | 2019-10-07 12:12:25 +0100 | [diff] [blame] | 189 | procmem |
Abhisek Devkota | 6af9acb | 2016-12-27 22:30:35 -0800 | [diff] [blame] | 190 | |
Luca Stefani | 0e38790 | 2020-03-13 23:15:16 +0100 | [diff] [blame] | 191 | # Root |
Luca Stefani | 06b93c0 | 2019-11-03 00:06:45 +0100 | [diff] [blame] | 192 | PRODUCT_PACKAGES += \ |
| 193 | adb_root |
Luca Stefani | 0e38790 | 2020-03-13 23:15:16 +0100 | [diff] [blame] | 194 | ifneq ($(TARGET_BUILD_VARIANT),user) |
Abhisek Devkota | 6af9acb | 2016-12-27 22:30:35 -0800 | [diff] [blame] | 195 | ifeq ($(WITH_SU),true) |
| 196 | PRODUCT_PACKAGES += \ |
Ricardo Cerqueira | a21887e | 2013-09-25 17:13:25 +0100 | [diff] [blame] | 197 | su |
repo Shareef Ali | 4bcfc31 | 2014-12-29 17:52:04 -0600 | [diff] [blame] | 198 | endif |
Abhisek Devkota | 6af9acb | 2016-12-27 22:30:35 -0800 | [diff] [blame] | 199 | endif |
Ricardo Cerqueira | a21887e | 2013-09-25 17:13:25 +0100 | [diff] [blame] | 200 | |
Wei Wang | 058e5fd | 2018-02-02 13:01:38 -0800 | [diff] [blame] | 201 | # Dex preopt |
| 202 | PRODUCT_DEXPREOPT_SPEED_APPS += \ |
Bruno Martins | 8560cdd | 2020-02-12 00:21:23 +0000 | [diff] [blame] | 203 | SystemUI \ |
| 204 | TrebuchetQuickStep |
Wei Wang | 058e5fd | 2018-02-02 13:01:38 -0800 | [diff] [blame] | 205 | |
Rashed Abdel-Tawab | e4868cc | 2018-08-12 10:51:27 -0700 | [diff] [blame] | 206 | PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS += vendor/lineage/overlay |
Dan Pasanen | 91f7620 | 2017-07-06 08:21:30 -0500 | [diff] [blame] | 207 | DEVICE_PACKAGE_OVERLAYS += vendor/lineage/overlay/common |
Koushik Dutta | c6f7a49 | 2011-11-28 07:44:23 -0800 | [diff] [blame] | 208 | |
Rashed Abdel-Tawab | b6b3421 | 2019-09-04 15:08:51 -0700 | [diff] [blame] | 209 | PRODUCT_VERSION_MAJOR = 17 |
Michael Bestas | 42020e2 | 2020-01-03 02:03:00 +0200 | [diff] [blame] | 210 | PRODUCT_VERSION_MINOR = 1 |
Dan Pasanen | 6935410 | 2016-08-24 10:19:50 -0500 | [diff] [blame] | 211 | PRODUCT_VERSION_MAINTENANCE := 0 |
Adrian DC | 3e85bf7 | 2016-08-06 21:47:23 +0200 | [diff] [blame] | 212 | |
Scott Mertz | a995059 | 2016-08-05 12:24:19 -0700 | [diff] [blame] | 213 | ifeq ($(TARGET_VENDOR_SHOW_MAINTENANCE_VERSION),true) |
Luca Stefani | 5c60e4f | 2017-08-17 19:28:48 +0200 | [diff] [blame] | 214 | LINEAGE_VERSION_MAINTENANCE := $(PRODUCT_VERSION_MAINTENANCE) |
Scott Mertz | a995059 | 2016-08-05 12:24:19 -0700 | [diff] [blame] | 215 | else |
Luca Stefani | 5c60e4f | 2017-08-17 19:28:48 +0200 | [diff] [blame] | 216 | LINEAGE_VERSION_MAINTENANCE := 0 |
Scott Mertz | a995059 | 2016-08-05 12:24:19 -0700 | [diff] [blame] | 217 | endif |
Koushik Dutta | c6f7a49 | 2011-11-28 07:44:23 -0800 | [diff] [blame] | 218 | |
Luca Stefani | 5c60e4f | 2017-08-17 19:28:48 +0200 | [diff] [blame] | 219 | # Set LINEAGE_BUILDTYPE from the env RELEASE_TYPE, for jenkins compat |
Ricardo Cerqueira | 554f370 | 2013-09-24 17:58:56 +0100 | [diff] [blame] | 220 | |
Luca Stefani | 5c60e4f | 2017-08-17 19:28:48 +0200 | [diff] [blame] | 221 | ifndef LINEAGE_BUILDTYPE |
Ricardo Cerqueira | 554f370 | 2013-09-24 17:58:56 +0100 | [diff] [blame] | 222 | ifdef RELEASE_TYPE |
Luca Stefani | 5c60e4f | 2017-08-17 19:28:48 +0200 | [diff] [blame] | 223 | # Starting with "LINEAGE_" is optional |
| 224 | RELEASE_TYPE := $(shell echo $(RELEASE_TYPE) | sed -e 's|^LINEAGE_||g') |
| 225 | LINEAGE_BUILDTYPE := $(RELEASE_TYPE) |
Ricardo Cerqueira | 554f370 | 2013-09-24 17:58:56 +0100 | [diff] [blame] | 226 | endif |
Warren Togami | 2128e2f | 2012-05-06 19:49:33 -1000 | [diff] [blame] | 227 | endif |
Ricardo Cerqueira | 554f370 | 2013-09-24 17:58:56 +0100 | [diff] [blame] | 228 | |
| 229 | # Filter out random types, so it'll reset to UNOFFICIAL |
Luca Stefani | 5c60e4f | 2017-08-17 19:28:48 +0200 | [diff] [blame] | 230 | ifeq ($(filter RELEASE NIGHTLY SNAPSHOT EXPERIMENTAL,$(LINEAGE_BUILDTYPE)),) |
| 231 | LINEAGE_BUILDTYPE := |
Warren Togami | 2128e2f | 2012-05-06 19:49:33 -1000 | [diff] [blame] | 232 | endif |
| 233 | |
Luca Stefani | 5c60e4f | 2017-08-17 19:28:48 +0200 | [diff] [blame] | 234 | ifdef LINEAGE_BUILDTYPE |
| 235 | ifneq ($(LINEAGE_BUILDTYPE), SNAPSHOT) |
| 236 | ifdef LINEAGE_EXTRAVERSION |
Ricardo Cerqueira | 554f370 | 2013-09-24 17:58:56 +0100 | [diff] [blame] | 237 | # Force build type to EXPERIMENTAL |
Luca Stefani | 5c60e4f | 2017-08-17 19:28:48 +0200 | [diff] [blame] | 238 | LINEAGE_BUILDTYPE := EXPERIMENTAL |
| 239 | # Remove leading dash from LINEAGE_EXTRAVERSION |
| 240 | LINEAGE_EXTRAVERSION := $(shell echo $(LINEAGE_EXTRAVERSION) | sed 's/-//') |
| 241 | # Add leading dash to LINEAGE_EXTRAVERSION |
| 242 | LINEAGE_EXTRAVERSION := -$(LINEAGE_EXTRAVERSION) |
Ricardo Cerqueira | 554f370 | 2013-09-24 17:58:56 +0100 | [diff] [blame] | 243 | endif |
| 244 | else |
Luca Stefani | 5c60e4f | 2017-08-17 19:28:48 +0200 | [diff] [blame] | 245 | ifndef LINEAGE_EXTRAVERSION |
Ricardo Cerqueira | 554f370 | 2013-09-24 17:58:56 +0100 | [diff] [blame] | 246 | # Force build type to EXPERIMENTAL, SNAPSHOT mandates a tag |
Luca Stefani | 5c60e4f | 2017-08-17 19:28:48 +0200 | [diff] [blame] | 247 | LINEAGE_BUILDTYPE := EXPERIMENTAL |
Ricardo Cerqueira | 554f370 | 2013-09-24 17:58:56 +0100 | [diff] [blame] | 248 | else |
Luca Stefani | 5c60e4f | 2017-08-17 19:28:48 +0200 | [diff] [blame] | 249 | # Remove leading dash from LINEAGE_EXTRAVERSION |
| 250 | LINEAGE_EXTRAVERSION := $(shell echo $(LINEAGE_EXTRAVERSION) | sed 's/-//') |
| 251 | # Add leading dash to LINEAGE_EXTRAVERSION |
| 252 | LINEAGE_EXTRAVERSION := -$(LINEAGE_EXTRAVERSION) |
Ricardo Cerqueira | 554f370 | 2013-09-24 17:58:56 +0100 | [diff] [blame] | 253 | endif |
Ricardo Cerqueira | d8e7666 | 2012-06-08 11:08:15 +0100 | [diff] [blame] | 254 | endif |
| 255 | else |
Luca Stefani | 5c60e4f | 2017-08-17 19:28:48 +0200 | [diff] [blame] | 256 | # If LINEAGE_BUILDTYPE is not defined, set to UNOFFICIAL |
| 257 | LINEAGE_BUILDTYPE := UNOFFICIAL |
| 258 | LINEAGE_EXTRAVERSION := |
Warren Togami | 2128e2f | 2012-05-06 19:49:33 -1000 | [diff] [blame] | 259 | endif |
| 260 | |
Luca Stefani | 5c60e4f | 2017-08-17 19:28:48 +0200 | [diff] [blame] | 261 | ifeq ($(LINEAGE_BUILDTYPE), UNOFFICIAL) |
Matt Mower | f416839 | 2013-12-13 11:04:14 -0600 | [diff] [blame] | 262 | ifneq ($(TARGET_UNOFFICIAL_BUILD_ID),) |
Luca Stefani | 5c60e4f | 2017-08-17 19:28:48 +0200 | [diff] [blame] | 263 | LINEAGE_EXTRAVERSION := -$(TARGET_UNOFFICIAL_BUILD_ID) |
Matt Mower | f416839 | 2013-12-13 11:04:14 -0600 | [diff] [blame] | 264 | endif |
| 265 | endif |
| 266 | |
Luca Stefani | 5c60e4f | 2017-08-17 19:28:48 +0200 | [diff] [blame] | 267 | ifeq ($(LINEAGE_BUILDTYPE), RELEASE) |
Ricardo Cerqueira | ae71f04 | 2013-11-11 00:55:51 +0000 | [diff] [blame] | 268 | ifndef TARGET_VENDOR_RELEASE_BUILD_ID |
Luca Stefani | 5c60e4f | 2017-08-17 19:28:48 +0200 | [diff] [blame] | 269 | LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(LINEAGE_BUILD) |
Ricardo Cerqueira | ae71f04 | 2013-11-11 00:55:51 +0000 | [diff] [blame] | 270 | else |
| 271 | ifeq ($(TARGET_BUILD_VARIANT),user) |
Luca Stefani | 5c60e4f | 2017-08-17 19:28:48 +0200 | [diff] [blame] | 272 | ifeq ($(LINEAGE_VERSION_MAINTENANCE),0) |
| 273 | LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(LINEAGE_BUILD) |
Jessica Wagantall | 79204e6 | 2016-07-14 15:42:08 -0700 | [diff] [blame] | 274 | else |
Luca Stefani | 5c60e4f | 2017-08-17 19:28:48 +0200 | [diff] [blame] | 275 | LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(LINEAGE_VERSION_MAINTENANCE)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(LINEAGE_BUILD) |
Jessica Wagantall | 79204e6 | 2016-07-14 15:42:08 -0700 | [diff] [blame] | 276 | endif |
Ricardo Cerqueira | ae71f04 | 2013-11-11 00:55:51 +0000 | [diff] [blame] | 277 | else |
Luca Stefani | 5c60e4f | 2017-08-17 19:28:48 +0200 | [diff] [blame] | 278 | LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(LINEAGE_BUILD) |
Ricardo Cerqueira | ae71f04 | 2013-11-11 00:55:51 +0000 | [diff] [blame] | 279 | endif |
| 280 | endif |
Koushik Dutta | c6f7a49 | 2011-11-28 07:44:23 -0800 | [diff] [blame] | 281 | else |
Luca Stefani | 5c60e4f | 2017-08-17 19:28:48 +0200 | [diff] [blame] | 282 | ifeq ($(LINEAGE_VERSION_MAINTENANCE),0) |
Michael Bestas | 24807ea | 2017-12-24 04:08:07 +0200 | [diff] [blame] | 283 | ifeq ($(LINEAGE_VERSION_APPEND_TIME_OF_DAY),true) |
Kevin F. Haggerty | a2440d0 | 2017-10-21 04:41:20 +0200 | [diff] [blame] | 284 | LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(shell date -u +%Y%m%d_%H%M%S)-$(LINEAGE_BUILDTYPE)$(LINEAGE_EXTRAVERSION)-$(LINEAGE_BUILD) |
| 285 | else |
| 286 | LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(shell date -u +%Y%m%d)-$(LINEAGE_BUILDTYPE)$(LINEAGE_EXTRAVERSION)-$(LINEAGE_BUILD) |
| 287 | endif |
Jessica Wagantall | 79204e6 | 2016-07-14 15:42:08 -0700 | [diff] [blame] | 288 | else |
Michael Bestas | 24807ea | 2017-12-24 04:08:07 +0200 | [diff] [blame] | 289 | ifeq ($(LINEAGE_VERSION_APPEND_TIME_OF_DAY),true) |
Kevin F. Haggerty | a2440d0 | 2017-10-21 04:41:20 +0200 | [diff] [blame] | 290 | 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) |
| 291 | else |
| 292 | LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(LINEAGE_VERSION_MAINTENANCE)-$(shell date -u +%Y%m%d)-$(LINEAGE_BUILDTYPE)$(LINEAGE_EXTRAVERSION)-$(LINEAGE_BUILD) |
| 293 | endif |
Jessica Wagantall | 79204e6 | 2016-07-14 15:42:08 -0700 | [diff] [blame] | 294 | endif |
Koushik Dutta | c6f7a49 | 2011-11-28 07:44:23 -0800 | [diff] [blame] | 295 | endif |
Koushik Dutta | d69b292 | 2012-02-23 14:07:44 -0800 | [diff] [blame] | 296 | |
Tom Powell | e4c8c82 | 2017-01-06 22:29:06 -0800 | [diff] [blame] | 297 | PRODUCT_EXTRA_RECOVERY_KEYS += \ |
Dan Pasanen | 91f7620 | 2017-07-06 08:21:30 -0500 | [diff] [blame] | 298 | vendor/lineage/build/target/product/security/lineage |
Tom Powell | e4c8c82 | 2017-01-06 22:29:06 -0800 | [diff] [blame] | 299 | |
Luca Stefani | 5c60e4f | 2017-08-17 19:28:48 +0200 | [diff] [blame] | 300 | -include vendor/lineage-priv/keys/keys.mk |
Ricardo Cerqueira | 178dbd6 | 2013-10-23 20:56:56 +0100 | [diff] [blame] | 301 | |
Luca Stefani | 5c60e4f | 2017-08-17 19:28:48 +0200 | [diff] [blame] | 302 | LINEAGE_DISPLAY_VERSION := $(LINEAGE_VERSION) |
Ricardo Cerqueira | 4616137 | 2014-01-09 10:25:31 +0000 | [diff] [blame] | 303 | |
Brint E. Kriebel | ac948f5 | 2014-01-24 09:58:36 -0800 | [diff] [blame] | 304 | ifneq ($(PRODUCT_DEFAULT_DEV_CERTIFICATE),) |
| 305 | ifneq ($(PRODUCT_DEFAULT_DEV_CERTIFICATE),build/target/product/security/testkey) |
Luca Stefani | 5c60e4f | 2017-08-17 19:28:48 +0200 | [diff] [blame] | 306 | ifneq ($(LINEAGE_BUILDTYPE), UNOFFICIAL) |
Zhao Wei Liew | 046484f | 2017-01-07 15:55:35 +0800 | [diff] [blame] | 307 | ifndef TARGET_VENDOR_RELEASE_BUILD_ID |
Luca Stefani | 5c60e4f | 2017-08-17 19:28:48 +0200 | [diff] [blame] | 308 | ifneq ($(LINEAGE_EXTRAVERSION),) |
| 309 | # Remove leading dash from LINEAGE_EXTRAVERSION |
| 310 | LINEAGE_EXTRAVERSION := $(shell echo $(LINEAGE_EXTRAVERSION) | sed 's/-//') |
| 311 | TARGET_VENDOR_RELEASE_BUILD_ID := $(LINEAGE_EXTRAVERSION) |
Zhao Wei Liew | 046484f | 2017-01-07 15:55:35 +0800 | [diff] [blame] | 312 | else |
| 313 | TARGET_VENDOR_RELEASE_BUILD_ID := $(shell date -u +%Y%m%d) |
| 314 | endif |
| 315 | else |
| 316 | TARGET_VENDOR_RELEASE_BUILD_ID := $(TARGET_VENDOR_RELEASE_BUILD_ID) |
| 317 | endif |
Luca Stefani | 5c60e4f | 2017-08-17 19:28:48 +0200 | [diff] [blame] | 318 | ifeq ($(LINEAGE_VERSION_MAINTENANCE),0) |
| 319 | LINEAGE_DISPLAY_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(LINEAGE_BUILD) |
Zhao Wei Liew | 046484f | 2017-01-07 15:55:35 +0800 | [diff] [blame] | 320 | else |
Luca Stefani | 5c60e4f | 2017-08-17 19:28:48 +0200 | [diff] [blame] | 321 | LINEAGE_DISPLAY_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(LINEAGE_VERSION_MAINTENANCE)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(LINEAGE_BUILD) |
Zhao Wei Liew | 046484f | 2017-01-07 15:55:35 +0800 | [diff] [blame] | 322 | endif |
Ricardo Cerqueira | 4616137 | 2014-01-09 10:25:31 +0000 | [diff] [blame] | 323 | endif |
Ricardo Cerqueira | 4616137 | 2014-01-09 10:25:31 +0000 | [diff] [blame] | 324 | endif |
Ricardo Cerqueira | 74b4f9b | 2014-01-11 16:00:16 +0000 | [diff] [blame] | 325 | endif |
Ricardo Cerqueira | 4616137 | 2014-01-09 10:25:31 +0000 | [diff] [blame] | 326 | |
Brint E. Kriebel | a1e4912 | 2014-01-31 11:59:56 -0800 | [diff] [blame] | 327 | -include $(WORKSPACE)/build_env/image-auto-bits.mk |
Dan Pasanen | 91f7620 | 2017-07-06 08:21:30 -0500 | [diff] [blame] | 328 | -include vendor/lineage/config/partner_gms.mk |