21e586ae9b
Change-Id: Ib052fba60e12497f79913c8030f59af40b6bc32f
315 lines
10 KiB
Makefile
315 lines
10 KiB
Makefile
# Allow vendor/extra to override any property by setting it first
|
|
$(call inherit-product-if-exists, vendor/extra/product.mk)
|
|
|
|
PRODUCT_BRAND ?= LineageOS
|
|
|
|
PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0
|
|
|
|
ifeq ($(PRODUCT_GMS_CLIENTID_BASE),)
|
|
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
|
|
ro.com.google.clientidbase=android-google
|
|
else
|
|
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
|
|
ro.com.google.clientidbase=$(PRODUCT_GMS_CLIENTID_BASE)
|
|
endif
|
|
|
|
ifeq ($(TARGET_BUILD_VARIANT),eng)
|
|
# Disable ADB authentication
|
|
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += ro.adb.secure=0
|
|
|
|
# Disable extra StrictMode features on all non-engineering builds
|
|
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += persist.sys.strictmode.disable=true
|
|
else
|
|
# Enable ADB authentication
|
|
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += ro.adb.secure=1
|
|
endif
|
|
|
|
# Backup Tool
|
|
PRODUCT_COPY_FILES += \
|
|
vendor/lineage/prebuilt/common/bin/backuptool.sh:install/bin/backuptool.sh \
|
|
vendor/lineage/prebuilt/common/bin/backuptool.functions:install/bin/backuptool.functions \
|
|
vendor/lineage/prebuilt/common/bin/50-lineage.sh:$(TARGET_COPY_OUT_SYSTEM)/addon.d/50-lineage.sh
|
|
|
|
ifneq ($(strip $(AB_OTA_PARTITIONS) $(AB_OTA_POSTINSTALL_CONFIG)),)
|
|
PRODUCT_COPY_FILES += \
|
|
vendor/lineage/prebuilt/common/bin/backuptool_ab.sh:$(TARGET_COPY_OUT_SYSTEM)/bin/backuptool_ab.sh \
|
|
vendor/lineage/prebuilt/common/bin/backuptool_ab.functions:$(TARGET_COPY_OUT_SYSTEM)/bin/backuptool_ab.functions \
|
|
vendor/lineage/prebuilt/common/bin/backuptool_postinstall.sh:$(TARGET_COPY_OUT_SYSTEM)/bin/backuptool_postinstall.sh
|
|
ifneq ($(TARGET_BUILD_VARIANT),user)
|
|
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
|
|
ro.ota.allow_downgrade=true
|
|
endif
|
|
endif
|
|
|
|
# Backup Services whitelist
|
|
PRODUCT_COPY_FILES += \
|
|
vendor/lineage/config/permissions/backup.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysconfig/backup.xml
|
|
|
|
# Lineage-specific broadcast actions whitelist
|
|
PRODUCT_COPY_FILES += \
|
|
vendor/lineage/config/permissions/lineage-sysconfig.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysconfig/lineage-sysconfig.xml
|
|
|
|
# Copy all Lineage-specific init rc files
|
|
$(foreach f,$(wildcard vendor/lineage/prebuilt/common/etc/init/*.rc),\
|
|
$(eval PRODUCT_COPY_FILES += $(f):$(TARGET_COPY_OUT_SYSTEM)/etc/init/$(notdir $f)))
|
|
|
|
# Enable Android Beam on all targets
|
|
PRODUCT_COPY_FILES += \
|
|
vendor/lineage/config/permissions/android.software.nfc.beam.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/android.software.nfc.beam.xml
|
|
|
|
# Enable SIP+VoIP on all targets
|
|
PRODUCT_COPY_FILES += \
|
|
frameworks/native/data/etc/android.software.sip.voip.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/android.software.sip.voip.xml
|
|
|
|
# Enable wireless Xbox 360 controller support
|
|
PRODUCT_COPY_FILES += \
|
|
frameworks/base/data/keyboards/Vendor_045e_Product_028e.kl:$(TARGET_COPY_OUT_SYSTEM)/usr/keylayout/Vendor_045e_Product_0719.kl
|
|
|
|
# This is Lineage!
|
|
PRODUCT_COPY_FILES += \
|
|
vendor/lineage/config/permissions/org.lineageos.android.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/org.lineageos.android.xml
|
|
|
|
# Enforce privapp-permissions whitelist
|
|
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
|
|
ro.control_privapp_permissions=enforce
|
|
|
|
# Include AOSP audio files
|
|
include vendor/lineage/config/aosp_audio.mk
|
|
|
|
# Include Lineage audio files
|
|
include vendor/lineage/config/lineage_audio.mk
|
|
|
|
ifneq ($(TARGET_DISABLE_LINEAGE_SDK), true)
|
|
# Lineage SDK
|
|
include vendor/lineage/config/lineage_sdk_common.mk
|
|
endif
|
|
|
|
# TWRP
|
|
ifeq ($(WITH_TWRP),true)
|
|
include vendor/lineage/config/twrp.mk
|
|
endif
|
|
|
|
# Do not include art debug targets
|
|
PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD := false
|
|
|
|
# Strip the local variable table and the local variable type table to reduce
|
|
# the size of the system image. This has no bearing on stack traces, but will
|
|
# leave less information available via JDWP.
|
|
PRODUCT_MINIMIZE_JAVA_DEBUG_INFO := true
|
|
|
|
# Disable vendor restrictions
|
|
PRODUCT_RESTRICT_VENDOR_FILES := false
|
|
|
|
# Bootanimation
|
|
TARGET_SCREEN_WIDTH ?= 1080
|
|
TARGET_SCREEN_HEIGHT ?= 1920
|
|
PRODUCT_PACKAGES += \
|
|
bootanimation.zip
|
|
|
|
# AOSP packages
|
|
PRODUCT_PACKAGES += \
|
|
Terminal
|
|
|
|
# Lineage packages
|
|
PRODUCT_PACKAGES += \
|
|
LineageParts \
|
|
LineageSettingsProvider \
|
|
LineageSetupWizard \
|
|
Updater
|
|
|
|
# Themes
|
|
PRODUCT_PACKAGES += \
|
|
LineageThemesStub \
|
|
ThemePicker
|
|
|
|
# Config
|
|
PRODUCT_PACKAGES += \
|
|
SimpleDeviceConfig
|
|
|
|
# Extra tools in Lineage
|
|
PRODUCT_PACKAGES += \
|
|
7z \
|
|
awk \
|
|
bash \
|
|
bzip2 \
|
|
curl \
|
|
getcap \
|
|
htop \
|
|
lib7z \
|
|
libsepol \
|
|
nano \
|
|
pigz \
|
|
setcap \
|
|
unrar \
|
|
vim \
|
|
wget \
|
|
zip
|
|
|
|
# Filesystems tools
|
|
PRODUCT_PACKAGES += \
|
|
fsck.exfat \
|
|
fsck.ntfs \
|
|
mke2fs \
|
|
mkfs.exfat \
|
|
mkfs.ntfs \
|
|
mount.ntfs
|
|
|
|
# Openssh
|
|
PRODUCT_PACKAGES += \
|
|
scp \
|
|
sftp \
|
|
ssh \
|
|
sshd \
|
|
sshd_config \
|
|
ssh-keygen \
|
|
start-ssh
|
|
|
|
# rsync
|
|
PRODUCT_PACKAGES += \
|
|
rsync
|
|
|
|
# Storage manager
|
|
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
|
|
ro.storage_manager.enabled=true
|
|
|
|
# These packages are excluded from user builds
|
|
PRODUCT_PACKAGES_DEBUG += \
|
|
procmem
|
|
|
|
# Root
|
|
PRODUCT_PACKAGES += \
|
|
adb_root
|
|
ifneq ($(TARGET_BUILD_VARIANT),user)
|
|
ifeq ($(WITH_SU),true)
|
|
PRODUCT_PACKAGES += \
|
|
su
|
|
endif
|
|
endif
|
|
|
|
# Dex preopt
|
|
PRODUCT_DEXPREOPT_SPEED_APPS += \
|
|
SystemUI
|
|
|
|
PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS += vendor/lineage/overlay
|
|
DEVICE_PACKAGE_OVERLAYS += vendor/lineage/overlay/common
|
|
|
|
PRODUCT_VERSION_MAJOR = 18
|
|
PRODUCT_VERSION_MINOR = 1
|
|
PRODUCT_VERSION_MAINTENANCE := 0
|
|
|
|
ifeq ($(TARGET_VENDOR_SHOW_MAINTENANCE_VERSION),true)
|
|
LINEAGE_VERSION_MAINTENANCE := $(PRODUCT_VERSION_MAINTENANCE)
|
|
else
|
|
LINEAGE_VERSION_MAINTENANCE := 0
|
|
endif
|
|
|
|
# Set LINEAGE_BUILDTYPE from the env RELEASE_TYPE, for jenkins compat
|
|
|
|
ifndef LINEAGE_BUILDTYPE
|
|
ifdef RELEASE_TYPE
|
|
# Starting with "LINEAGE_" is optional
|
|
RELEASE_TYPE := $(shell echo $(RELEASE_TYPE) | sed -e 's|^LINEAGE_||g')
|
|
LINEAGE_BUILDTYPE := $(RELEASE_TYPE)
|
|
endif
|
|
endif
|
|
|
|
# Filter out random types, so it'll reset to UNOFFICIAL
|
|
ifeq ($(filter RELEASE NIGHTLY SNAPSHOT EXPERIMENTAL,$(LINEAGE_BUILDTYPE)),)
|
|
LINEAGE_BUILDTYPE :=
|
|
endif
|
|
|
|
ifdef LINEAGE_BUILDTYPE
|
|
ifneq ($(LINEAGE_BUILDTYPE), SNAPSHOT)
|
|
ifdef LINEAGE_EXTRAVERSION
|
|
# Force build type to EXPERIMENTAL
|
|
LINEAGE_BUILDTYPE := EXPERIMENTAL
|
|
# Remove leading dash from LINEAGE_EXTRAVERSION
|
|
LINEAGE_EXTRAVERSION := $(shell echo $(LINEAGE_EXTRAVERSION) | sed 's/-//')
|
|
# Add leading dash to LINEAGE_EXTRAVERSION
|
|
LINEAGE_EXTRAVERSION := -$(LINEAGE_EXTRAVERSION)
|
|
endif
|
|
else
|
|
ifndef LINEAGE_EXTRAVERSION
|
|
# Force build type to EXPERIMENTAL, SNAPSHOT mandates a tag
|
|
LINEAGE_BUILDTYPE := EXPERIMENTAL
|
|
else
|
|
# Remove leading dash from LINEAGE_EXTRAVERSION
|
|
LINEAGE_EXTRAVERSION := $(shell echo $(LINEAGE_EXTRAVERSION) | sed 's/-//')
|
|
# Add leading dash to LINEAGE_EXTRAVERSION
|
|
LINEAGE_EXTRAVERSION := -$(LINEAGE_EXTRAVERSION)
|
|
endif
|
|
endif
|
|
else
|
|
# If LINEAGE_BUILDTYPE is not defined, set to UNOFFICIAL
|
|
LINEAGE_BUILDTYPE := UNOFFICIAL
|
|
LINEAGE_EXTRAVERSION :=
|
|
endif
|
|
|
|
ifeq ($(LINEAGE_BUILDTYPE), UNOFFICIAL)
|
|
ifneq ($(TARGET_UNOFFICIAL_BUILD_ID),)
|
|
LINEAGE_EXTRAVERSION := -$(TARGET_UNOFFICIAL_BUILD_ID)
|
|
endif
|
|
endif
|
|
|
|
ifeq ($(LINEAGE_BUILDTYPE), RELEASE)
|
|
ifndef TARGET_VENDOR_RELEASE_BUILD_ID
|
|
LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(LINEAGE_BUILD)
|
|
else
|
|
ifeq ($(TARGET_BUILD_VARIANT),user)
|
|
ifeq ($(LINEAGE_VERSION_MAINTENANCE),0)
|
|
LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(LINEAGE_BUILD)
|
|
else
|
|
LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(LINEAGE_VERSION_MAINTENANCE)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(LINEAGE_BUILD)
|
|
endif
|
|
else
|
|
LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(LINEAGE_BUILD)
|
|
endif
|
|
endif
|
|
else
|
|
ifeq ($(LINEAGE_VERSION_MAINTENANCE),0)
|
|
ifeq ($(LINEAGE_VERSION_APPEND_TIME_OF_DAY),true)
|
|
LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(shell date -u +%Y%m%d_%H%M%S)-$(LINEAGE_BUILDTYPE)$(LINEAGE_EXTRAVERSION)-$(LINEAGE_BUILD)
|
|
else
|
|
LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(shell date -u +%Y%m%d)-$(LINEAGE_BUILDTYPE)$(LINEAGE_EXTRAVERSION)-$(LINEAGE_BUILD)
|
|
endif
|
|
else
|
|
ifeq ($(LINEAGE_VERSION_APPEND_TIME_OF_DAY),true)
|
|
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)
|
|
else
|
|
LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(LINEAGE_VERSION_MAINTENANCE)-$(shell date -u +%Y%m%d)-$(LINEAGE_BUILDTYPE)$(LINEAGE_EXTRAVERSION)-$(LINEAGE_BUILD)
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
PRODUCT_EXTRA_RECOVERY_KEYS += \
|
|
vendor/lineage/build/target/product/security/lineage
|
|
|
|
-include vendor/lineage-priv/keys/keys.mk
|
|
|
|
LINEAGE_DISPLAY_VERSION := $(LINEAGE_VERSION)
|
|
|
|
ifneq ($(PRODUCT_DEFAULT_DEV_CERTIFICATE),)
|
|
ifneq ($(PRODUCT_DEFAULT_DEV_CERTIFICATE),build/target/product/security/testkey)
|
|
ifneq ($(LINEAGE_BUILDTYPE), UNOFFICIAL)
|
|
ifndef TARGET_VENDOR_RELEASE_BUILD_ID
|
|
ifneq ($(LINEAGE_EXTRAVERSION),)
|
|
# Remove leading dash from LINEAGE_EXTRAVERSION
|
|
LINEAGE_EXTRAVERSION := $(shell echo $(LINEAGE_EXTRAVERSION) | sed 's/-//')
|
|
TARGET_VENDOR_RELEASE_BUILD_ID := $(LINEAGE_EXTRAVERSION)
|
|
else
|
|
TARGET_VENDOR_RELEASE_BUILD_ID := $(shell date -u +%Y%m%d)
|
|
endif
|
|
else
|
|
TARGET_VENDOR_RELEASE_BUILD_ID := $(TARGET_VENDOR_RELEASE_BUILD_ID)
|
|
endif
|
|
ifeq ($(LINEAGE_VERSION_MAINTENANCE),0)
|
|
LINEAGE_DISPLAY_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(LINEAGE_BUILD)
|
|
else
|
|
LINEAGE_DISPLAY_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(LINEAGE_VERSION_MAINTENANCE)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(LINEAGE_BUILD)
|
|
endif
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
-include $(WORKSPACE)/build_env/image-auto-bits.mk
|
|
-include vendor/lineage/config/partner_gms.mk
|