You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

358 lines
10 KiB

PRODUCT_BRAND ?= LineageOS
PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0
ifeq ($(PRODUCT_GMS_CLIENTID_BASE),)
PRODUCT_PROPERTY_OVERRIDES += \
ro.com.google.clientidbase=android-google
else
PRODUCT_PROPERTY_OVERRIDES += \
ro.com.google.clientidbase=$(PRODUCT_GMS_CLIENTID_BASE)
endif
PRODUCT_PROPERTY_OVERRIDES += \
keyguard.no_require_sim=true
PRODUCT_PROPERTY_OVERRIDES += \
ro.build.selinux=1
# Default notification/alarm sounds
PRODUCT_PROPERTY_OVERRIDES += \
ro.config.notification_sound=Argon.ogg \
ro.config.alarm_alert=Hassium.ogg
ifneq ($(TARGET_BUILD_VARIANT),user)
# Thank you, please drive thru!
PRODUCT_PROPERTY_OVERRIDES += persist.sys.dun.override=0
endif
ifneq ($(TARGET_BUILD_VARIANT),eng)
# Enable ADB authentication
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.adb.secure=1
endif
ifeq ($(BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE),)
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
ro.device.cache_dir=/data/cache
else
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
ro.device.cache_dir=/cache
endif
Modular backuptool.sh. Executes backup and restore methods defined in arbitrary /system/addon.d/*.sh scripts. Tips & Tricks ============= * 50-cm.sh contains only a reference implementation. You may customize the methods however you wish. For example, 20-foobar.sh pre-backup can use a loop with conditionals to generate a dynamic backup list in /tmp/foobar_file_list which is later printed by list_files() so the backup method will act on those files. * Optional methods pre-backup, post-backup, pre-restore, or post-restore may be defined for special purposes. * Inject new files into /tmp/addon.d/ prior to backuptool.sh backup if you want to act during the current CM upgrade. * Delete files from /tmp/addon.d/ during post-restore if you want to permanently remove files from /system/addon.d/ Addons may use this approach to run a script only once. * Scripts run in sort -n order. Prefix with numbers 00 through 99 if want to run in a particular order. * You can have two separate scripts, implementing only backup in one, and only restore in the other with a different number prefix of each. This allows even greater control the backup/restore order even further. * You could use pre-backup to generate a one-time use backup script in /tmp/addon.d/ that deletes itself in post-restore. Patch Series ============ http://review.cyanogenmod.com/#change,13265 CyanogenMod/android_build * edify generator http://review.cyanogenmod.com/#change,13266 CyanogenMod/android_system_core * permissions on /system/addon.d http://review.cyanogenmod.com/#change,13267 CyanogenMod/android_vendor_cm * 50-cm.sh reference backup script * modular backuptool.sh * support backuptool.functions used by /system/addon.d/*.sh scripts Change-Id: Ifd5eaf9dcfd68d92e5043c21d1bae1dc0ad54860
12 years ago
# 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:system/addon.d/50-lineage.sh \
vendor/lineage/prebuilt/common/bin/blacklist:system/addon.d/blacklist
# Backup Services whitelist
PRODUCT_COPY_FILES += \
vendor/lineage/config/permissions/backup.xml:system/etc/sysconfig/backup.xml
# Signature compatibility validation
PRODUCT_COPY_FILES += \
vendor/lineage/prebuilt/common/bin/otasigcheck.sh:install/bin/otasigcheck.sh
# init.d support
PRODUCT_COPY_FILES += \
vendor/lineage/prebuilt/common/etc/init.d/00banner:system/etc/init.d/00banner \
vendor/lineage/prebuilt/common/bin/sysinit:system/bin/sysinit
ifneq ($(TARGET_BUILD_VARIANT),user)
# userinit support
PRODUCT_COPY_FILES += \
vendor/lineage/prebuilt/common/etc/init.d/90userinit:system/etc/init.d/90userinit
endif
# Copy all Lineage-specific init rc files
$(foreach f,$(wildcard vendor/lineage/prebuilt/common/etc/init/*.rc),\
$(eval PRODUCT_COPY_FILES += $(f):system/etc/init/$(notdir $f)))
# Copy over added mimetype supported in libcore.net.MimeUtils
PRODUCT_COPY_FILES += \
vendor/lineage/prebuilt/common/lib/content-types.properties:system/lib/content-types.properties
# Enable SIP+VoIP on all targets
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.software.sip.voip.xml: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:system/usr/keylayout/Vendor_045e_Product_0719.kl
# This is Lineage!
PRODUCT_COPY_FILES += \
vendor/lineage/config/permissions/org.lineageos.android.xml:system/etc/permissions/org.lineageos.android.xml
# 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
# Bootanimation
PRODUCT_PACKAGES += \
bootanimation.zip
# Required Lineage packages
PRODUCT_PACKAGES += \
BluetoothExt \
CMAudioService \
LineageParts \
Development \
Profiles \
WeatherManagerService
# Optional packages
PRODUCT_PACKAGES += \
libemoji \
LiveWallpapersPicker \
PhotoTable \
Terminal
# Include explicitly to work around GMS issues
PRODUCT_PACKAGES += \
libprotobuf-cpp-full \
librsjni
# Custom Lineage packages
PRODUCT_PACKAGES += \
AudioFX \
LineageSettingsProvider \
LineageSetupWizard \
Eleven \
ExactCalculator \
Jelly \
LockClock \
Trebuchet \
Updater \
WallpaperPicker \
WeatherProvider
# Exchange support
PRODUCT_PACKAGES += \
Exchange2
# Extra tools in Lineage
PRODUCT_PACKAGES += \
7z \
bash \
bzip2 \
curl \
fsck.ntfs \
gdbserver \
htop \
lib7z \
libsepol \
micro_bench \
mke2fs \
mkfs.ntfs \
mount.ntfs \
oprofiled \
pigz \
powertop \
sqlite3 \
strace \
tune2fs \
unrar \
unzip \
vim \
wget \
zip
# Custom off-mode charger
ifneq ($(WITH_LINEAGE_CHARGER),false)
PRODUCT_PACKAGES += \
charger_res_images \
lineage_charger_res_images \
font_log.png \
libhealthd.lineage
endif
# ExFAT support
WITH_EXFAT ?= true
ifeq ($(WITH_EXFAT),true)
TARGET_USES_EXFAT := true
PRODUCT_PACKAGES += \
mount.exfat \
fsck.exfat \
mkfs.exfat
endif
# Openssh
PRODUCT_PACKAGES += \
scp \
sftp \
ssh \
sshd \
sshd_config \
ssh-keygen \
start-ssh
# rsync
PRODUCT_PACKAGES += \
rsync
# Stagefright FFMPEG plugin
PRODUCT_PACKAGES += \
libffmpeg_extractor \
libffmpeg_omx \
media_codecs_ffmpeg.xml
PRODUCT_PROPERTY_OVERRIDES += \
media.sf.omx-plugin=libffmpeg_omx.so \
media.sf.extractor-plugin=libffmpeg_extractor.so
# Storage manager
PRODUCT_PROPERTY_OVERRIDES += \
ro.storage_manager.enabled=true
# These packages are excluded from user builds
ifneq ($(TARGET_BUILD_VARIANT),user)
PRODUCT_PACKAGES += \
procmem \
procrank
# Conditionally build in su
ifeq ($(WITH_SU),true)
PRODUCT_PACKAGES += \
su
endif
endif
DEVICE_PACKAGE_OVERLAYS += vendor/lineage/overlay/common
PRODUCT_VERSION_MAJOR = 15
PRODUCT_VERSION_MINOR = 0
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)
LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(shell date -u +%Y%m%d)-$(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
PRODUCT_PROPERTY_OVERRIDES += \
ro.lineage.version=$(LINEAGE_VERSION) \
ro.lineage.releasetype=$(LINEAGE_BUILDTYPE) \
ro.lineage.build.version=$(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR) \
ro.modversion=$(LINEAGE_VERSION) \
ro.lineagelegal.url=https://lineageos.org/legal
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
PRODUCT_PROPERTY_OVERRIDES += \
ro.lineage.display.version=$(LINEAGE_DISPLAY_VERSION)
-include $(WORKSPACE)/build_env/image-auto-bits.mk
-include vendor/lineage/config/partner_gms.mk
-include vendor/cyngn/product.mk
$(call prepend-product-if-exists, vendor/extra/product.mk)