PRODUCT_BRAND ?= cyanogenmod
i f n e q ( $( TARGET_SCREEN_WIDTH ) $( TARGET_SCREEN_HEIGHT ) , $( space ) )
# determine the smaller dimension
TARGET_BOOTANIMATION_SIZE := $( shell \
if [ " $( TARGET_SCREEN_WIDTH) " -lt " $( TARGET_SCREEN_HEIGHT) " ] ; then \
echo $( TARGET_SCREEN_WIDTH) ; \
else \
echo $( TARGET_SCREEN_HEIGHT) ; \
fi )
# get a sorted list of the sizes
bootanimation_sizes := $( subst .zip,, $( shell ls vendor/cm/prebuilt/common/bootanimation) )
bootanimation_sizes := $( shell echo -e $( subst $( space) ,'\n' ,$( bootanimation_sizes) ) | sort -rn)
# find the appropriate size and set
d e f i n e c h e c k _ a n d _ s e t _ b o o t a n i m a t i o n
$(eval TARGET_BOOTANIMATION_NAME : = $( shell \
if [ -z " $( TARGET_BOOTANIMATION_NAME) " ] ; then
if [ " $( 1) " -le " $( TARGET_BOOTANIMATION_SIZE) " ] ; then \
echo $( 1) ; \
exit 0; \
fi ;
fi ;
echo $( TARGET_BOOTANIMATION_NAME) ; ) )
e n d e f
$( foreach size ,$ ( bootanimation_sizes ) , $ ( call check_and_set_bootanimation ,$ ( size ) ) )
i f e q ( $( TARGET_BOOTANIMATION_HALF_RES ) , t r u e )
PRODUCT_BOOTANIMATION := vendor/cm/prebuilt/common/bootanimation/halfres/$( TARGET_BOOTANIMATION_NAME) .zip
e l s e
PRODUCT_BOOTANIMATION := vendor/cm/prebuilt/common/bootanimation/$( TARGET_BOOTANIMATION_NAME) .zip
e n d i f
e n d i f
i f d e f C M _ N I G H T L Y
PRODUCT_PROPERTY_OVERRIDES += \
ro.rommanager.developerid= cyanogenmodnightly
e l s e
PRODUCT_PROPERTY_OVERRIDES += \
ro.rommanager.developerid= cyanogenmod
e n d i f
PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE = 0
i f e q ( $( PRODUCT_GMS_CLIENTID_BASE ) , )
PRODUCT_PROPERTY_OVERRIDES += \
ro.com.google.clientidbase= android-google
e l s e
PRODUCT_PROPERTY_OVERRIDES += \
ro.com.google.clientidbase= $( PRODUCT_GMS_CLIENTID_BASE)
e n d i f
PRODUCT_PROPERTY_OVERRIDES += \
keyguard.no_require_sim= true \
ro.url.legal= http://www.google.com/intl/%s/mobile/android/basic/phone-legal.html \
ro.url.legal.android_privacy= http://www.google.com/intl/%s/mobile/android/basic/privacy.html \
ro.com.android.wifi-watchlist= GoogleGuest \
ro.setupwizard.enterprise_mode= 1 \
ro.com.android.dateformat= MM-dd-yyyy \
ro.com.android.dataroaming= false
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
i f n e q ( $( TARGET_BUILD_VARIANT ) , u s e r )
# Thank you, please drive thru!
PRODUCT_PROPERTY_OVERRIDES += persist.sys.dun.override= 0
e n d i f
i f n e q ( $( TARGET_BUILD_VARIANT ) , e n g )
# Enable ADB authentication
ADDITIONAL_DEFAULT_PROPERTIES += ro.adb.secure= 1
e n d i f
# Copy over the changelog to the device
PRODUCT_COPY_FILES += \
vendor/cm/CHANGELOG.mkdn:system/etc/CHANGELOG-CM.txt
# Backup Tool
PRODUCT_COPY_FILES += \
vendor/cm/prebuilt/common/bin/backuptool.sh:install/bin/backuptool.sh \
vendor/cm/prebuilt/common/bin/backuptool.functions:install/bin/backuptool.functions \
vendor/cm/prebuilt/common/bin/50-cm.sh:system/addon.d/50-cm.sh \
vendor/cm/prebuilt/common/bin/blacklist:system/addon.d/blacklist
# Backup Services whitelist
PRODUCT_COPY_FILES += \
vendor/cm/config/permissions/backup.xml:system/etc/sysconfig/backup.xml
# Signature compatibility validation
PRODUCT_COPY_FILES += \
vendor/cm/prebuilt/common/bin/otasigcheck.sh:install/bin/otasigcheck.sh
# init.d support
PRODUCT_COPY_FILES += \
vendor/cm/prebuilt/common/etc/init.d/00banner:system/etc/init.d/00banner \
vendor/cm/prebuilt/common/bin/sysinit:system/bin/sysinit
i f n e q ( $( TARGET_BUILD_VARIANT ) , u s e r )
# userinit support
PRODUCT_COPY_FILES += \
vendor/cm/prebuilt/common/etc/init.d/90userinit:system/etc/init.d/90userinit
e n d i f
# CM-specific init file
PRODUCT_COPY_FILES += \
vendor/cm/prebuilt/common/etc/init.local.rc:root/init.cm.rc
# Copy over added mimetype supported in libcore.net.MimeUtils
PRODUCT_COPY_FILES += \
vendor/cm/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 CM!
PRODUCT_COPY_FILES += \
vendor/cm/config/permissions/com.cyanogenmod.android.xml:system/etc/permissions/com.cyanogenmod.android.xml
# Include CM audio files
i n c l u d e v e n d o r / c m / c o n f i g / c m _ a u d i o . m k
# Theme engine
i n c l u d e v e n d o r / c m / c o n f i g / t h e m e s _ c o m m o n . m k
i f n e q ( $( TARGET_DISABLE_CMSDK ) , t r u e )
# CMSDK
i n c l u d e v e n d o r / c m / c o n f i g / c m s d k _ c o m m o n . m k
e n d i f
# Required CM packages
PRODUCT_PACKAGES += \
BluetoothExt \
CMAudioService \
CMParts \
Development \
Profiles \
WeatherManagerService
# Optional CM packages
PRODUCT_PACKAGES += \
libemoji \
LiveWallpapersPicker \
PhotoTable \
Terminal
# Include librsjni explicitly to workaround GMS issue
PRODUCT_PACKAGES += \
librsjni
# Custom CM packages
PRODUCT_PACKAGES += \
AudioFX \
CMFileManager \
CMSettingsProvider \
CMUpdater \
CMWallpapers \
CyanogenSetupWizard \
Eleven \
ExactCalculator \
Launcher3 \
LiveLockScreenService \
LockClock \
Screencast \
SoundRecorder \
Trebuchet \
WallpaperPicker \
WeatherProvider
# Exchange support
PRODUCT_PACKAGES += \
Exchange2
# Extra tools in CM
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
i f n e q ( $( WITH_CM_CHARGER ) , f a l s e )
PRODUCT_PACKAGES += \
charger_res_images \
cm_charger_res_images \
font_log.png \
libhealthd.cm
e n d i f
# ExFAT support
WITH_EXFAT ?= true
i f e q ( $( WITH_EXFAT ) , t r u e )
TARGET_USES_EXFAT := true
PRODUCT_PACKAGES += \
mount.exfat \
fsck.exfat \
mkfs.exfat
e n d i f
# 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
# Telephony
PRODUCT_PACKAGES += \
telephony-ext
PRODUCT_BOOT_JARS += \
telephony-ext
# These packages are excluded from user builds
i f n e q ( $( TARGET_BUILD_VARIANT ) , u s e r )
PRODUCT_PACKAGES += \
procmem \
procrank \
su
e n d i f
PRODUCT_PROPERTY_OVERRIDES += \
persist.sys.root_access= 0
DEVICE_PACKAGE_OVERLAYS += vendor/cm/overlay/common
PRODUCT_VERSION_MAJOR = 14
PRODUCT_VERSION_MINOR = 0
PRODUCT_VERSION_MAINTENANCE := 0
i f e q ( $( TARGET_VENDOR_SHOW_MAINTENANCE_VERSION ) , t r u e )
CM_VERSION_MAINTENANCE := $( PRODUCT_VERSION_MAINTENANCE)
e l s e
CM_VERSION_MAINTENANCE := 0
e n d i f
# Set CM_BUILDTYPE from the env RELEASE_TYPE, for jenkins compat
i f n d e f C M _ B U I L D T Y P E
ifdef RELEASE_TYPE
# Starting with "CM_" is optional
RELEASE_TYPE := $( shell echo $( RELEASE_TYPE) | sed -e 's|^CM_||g' )
CM_BUILDTYPE := $( RELEASE_TYPE)
endif
e n d i f
# Filter out random types, so it'll reset to UNOFFICIAL
i f e q ( $( filter RELEASE NIGHTLY SNAPSHOT EXPERIMENTAL ,$ ( CM_BUILDTYPE ) ) , )
CM_BUILDTYPE :=
e n d i f
i f d e f C M _ B U I L D T Y P E
ifneq ( $( CM_BUILDTYPE) , SNAPSHOT)
ifdef CM_EXTRAVERSION
# Force build type to EXPERIMENTAL
CM_BUILDTYPE := EXPERIMENTAL
# Remove leading dash from CM_EXTRAVERSION
CM_EXTRAVERSION := $( shell echo $( CM_EXTRAVERSION) | sed 's/-//' )
# Add leading dash to CM_EXTRAVERSION
CM_EXTRAVERSION := -$( CM_EXTRAVERSION)
endif
else
ifndef CM_EXTRAVERSION
# Force build type to EXPERIMENTAL, SNAPSHOT mandates a tag
CM_BUILDTYPE := EXPERIMENTAL
else
# Remove leading dash from CM_EXTRAVERSION
CM_EXTRAVERSION := $( shell echo $( CM_EXTRAVERSION) | sed 's/-//' )
# Add leading dash to CM_EXTRAVERSION
CM_EXTRAVERSION := -$( CM_EXTRAVERSION)
endif
endif
e l s e
# If CM_BUILDTYPE is not defined, set to UNOFFICIAL
CM_BUILDTYPE := UNOFFICIAL
CM_EXTRAVERSION :=
e n d i f
i f e q ( $( CM_BUILDTYPE ) , U N O F F I C I A L )
ifneq ( $( TARGET_UNOFFICIAL_BUILD_ID) ,)
CM_EXTRAVERSION := -$( TARGET_UNOFFICIAL_BUILD_ID)
endif
e n d i f
i f e q ( $( CM_BUILDTYPE ) , R E L E A S E )
ifndef TARGET_VENDOR_RELEASE_BUILD_ID
CM_VERSION := $( PRODUCT_VERSION_MAJOR) .$( PRODUCT_VERSION_MINOR) .$( PRODUCT_VERSION_MAINTENANCE) $( PRODUCT_VERSION_DEVICE_SPECIFIC) -$( CM_BUILD)
else
ifeq ( $( TARGET_BUILD_VARIANT) ,user)
ifeq ( $( CM_VERSION_MAINTENANCE) ,0)
CM_VERSION := $( PRODUCT_VERSION_MAJOR) .$( PRODUCT_VERSION_MINOR) -$( TARGET_VENDOR_RELEASE_BUILD_ID) -$( CM_BUILD)
else
CM_VERSION := $( PRODUCT_VERSION_MAJOR) .$( PRODUCT_VERSION_MINOR) .$( CM_VERSION_MAINTENANCE) -$( TARGET_VENDOR_RELEASE_BUILD_ID) -$( CM_BUILD)
endif
else
CM_VERSION := $( PRODUCT_VERSION_MAJOR) .$( PRODUCT_VERSION_MINOR) .$( PRODUCT_VERSION_MAINTENANCE) $( PRODUCT_VERSION_DEVICE_SPECIFIC) -$( CM_BUILD)
endif
endif
e l s e
ifeq ( $( CM_VERSION_MAINTENANCE) ,0)
CM_VERSION := $( PRODUCT_VERSION_MAJOR) .$( PRODUCT_VERSION_MINOR) -$( shell date -u +%Y%m%d) -$( CM_BUILDTYPE) $( CM_EXTRAVERSION) -$( CM_BUILD)
else
CM_VERSION := $( PRODUCT_VERSION_MAJOR) .$( PRODUCT_VERSION_MINOR) .$( CM_VERSION_MAINTENANCE) -$( shell date -u +%Y%m%d) -$( CM_BUILDTYPE) $( CM_EXTRAVERSION) -$( CM_BUILD)
endif
e n d i f
PRODUCT_PROPERTY_OVERRIDES += \
ro.cm.version= $( CM_VERSION) \
ro.cm.releasetype= $( CM_BUILDTYPE) \
ro.modversion= $( CM_VERSION) \
ro.cmlegal.url= https://cyngn.com/legal/privacy-policy
i f e q ( $( OTA_PACKAGE_SIGNING_KEY ) , )
PRODUCT_EXTRA_RECOVERY_KEYS += \
vendor/cm/build/target/product/security/cm \
vendor/cm/build/target/product/security/cm-devkey
e n d i f
- i n c l u d e v e n d o r / c m - p r i v / k e y s / k e y s . m k
CM_DISPLAY_VERSION := $( CM_VERSION)
i f n e q ( $( PRODUCT_DEFAULT_DEV_CERTIFICATE ) , )
i f n e q ( $( PRODUCT_DEFAULT_DEV_CERTIFICATE ) , b u i l d / t a r g e t / p r o d u c t / s e c u r i t y / t e s t k e y )
ifneq ( $( CM_BUILDTYPE) , UNOFFICIAL)
ifndef TARGET_VENDOR_RELEASE_BUILD_ID
ifneq ( $( CM_EXTRAVERSION) ,)
# Remove leading dash from CM_EXTRAVERSION
CM_EXTRAVERSION := $( shell echo $( CM_EXTRAVERSION) | sed 's/-//' )
TARGET_VENDOR_RELEASE_BUILD_ID := $( CM_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 ( $( CM_VERSION_MAINTENANCE) ,0)
CM_DISPLAY_VERSION := $( PRODUCT_VERSION_MAJOR) .$( PRODUCT_VERSION_MINOR) -$( TARGET_VENDOR_RELEASE_BUILD_ID) -$( CM_BUILD)
else
CM_DISPLAY_VERSION := $( PRODUCT_VERSION_MAJOR) .$( PRODUCT_VERSION_MINOR) .$( CM_VERSION_MAINTENANCE) -$( TARGET_VENDOR_RELEASE_BUILD_ID) -$( CM_BUILD)
endif
e n d i f
e n d i f
e n d i f
PRODUCT_PROPERTY_OVERRIDES += \
ro.cm.display.version= $( CM_DISPLAY_VERSION)
- i n c l u d e $( WORKSPACE ) / b u i l d _ e n v / i m a g e - a u t o - b i t s . m k
- i n c l u d e v e n d o r / c m / c o n f i g / p a r t n e r _ g m s . m k
- i n c l u d e v e n d o r / c y n g n / p r o d u c t . m k
$( call prepend -product -if -exists , vendor /extra /product .mk )