blob: e77c93d51248d594fecd486197d4835be54de586 [file] [log] [blame]
Ricardo Cerqueira6ed03ff2011-11-28 16:37:47 +00001PRODUCT_BRAND ?= cyanogenmod
2
Koushik Dutta82d0fda2013-02-28 10:33:25 -08003SUPERUSER_EMBEDDED := true
Koushik Dutta9d15c7a2013-03-04 00:37:02 -08004SUPERUSER_PACKAGE_PREFIX := com.android.settings.cyanogenmod.superuser
Koushik Dutta82d0fda2013-02-28 10:33:25 -08005
Steve Kondikba1ca332012-08-21 02:18:40 -07006ifneq ($(TARGET_SCREEN_WIDTH) $(TARGET_SCREEN_HEIGHT),$(space))
Steve Kondikba1ca332012-08-21 02:18:40 -07007# determine the smaller dimension
8TARGET_BOOTANIMATION_SIZE := $(shell \
9 if [ $(TARGET_SCREEN_WIDTH) -lt $(TARGET_SCREEN_HEIGHT) ]; then \
10 echo $(TARGET_SCREEN_WIDTH); \
11 else \
12 echo $(TARGET_SCREEN_HEIGHT); \
13 fi )
14
15# get a sorted list of the sizes
16bootanimation_sizes := $(subst .zip,, $(shell ls vendor/cm/prebuilt/common/bootanimation))
17bootanimation_sizes := $(shell echo -e $(subst $(space),'\n',$(bootanimation_sizes)) | sort -rn)
18
19# find the appropriate size and set
20define check_and_set_bootanimation
21$(eval TARGET_BOOTANIMATION_NAME := $(shell \
22 if [ -z "$(TARGET_BOOTANIMATION_NAME)" ]; then
23 if [ $(1) -le $(TARGET_BOOTANIMATION_SIZE) ]; then \
24 echo $(1); \
25 exit 0; \
26 fi;
27 fi;
28 echo $(TARGET_BOOTANIMATION_NAME); ))
29endef
30$(foreach size,$(bootanimation_sizes), $(call check_and_set_bootanimation,$(size)))
31
Steven Luo367e6482014-01-30 12:51:04 -080032ifeq ($(TARGET_BOOTANIMATION_HALF_RES),true)
33PRODUCT_BOOTANIMATION := vendor/cm/prebuilt/common/bootanimation/halfres/$(TARGET_BOOTANIMATION_NAME).zip
34else
William Roberts4256e662013-08-21 13:43:54 -070035PRODUCT_BOOTANIMATION := vendor/cm/prebuilt/common/bootanimation/$(TARGET_BOOTANIMATION_NAME).zip
Steve Kondika8945752012-03-14 00:10:33 -070036endif
Steven Luo367e6482014-01-30 12:51:04 -080037endif
Steve Kondika8945752012-03-14 00:10:33 -070038
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000039ifdef CM_NIGHTLY
40PRODUCT_PROPERTY_OVERRIDES += \
41 ro.rommanager.developerid=cyanogenmodnightly
42else
43PRODUCT_PROPERTY_OVERRIDES += \
44 ro.rommanager.developerid=cyanogenmod
45endif
46
47PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0
48
Steve Kondik5a27f632013-11-06 13:55:11 -080049ifeq ($(PRODUCT_GMS_CLIENTID_BASE),)
50PRODUCT_PROPERTY_OVERRIDES += \
51 ro.com.google.clientidbase=android-google
52else
53PRODUCT_PROPERTY_OVERRIDES += \
54 ro.com.google.clientidbase=$(PRODUCT_GMS_CLIENTID_BASE)
55endif
56
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000057PRODUCT_PROPERTY_OVERRIDES += \
58 keyguard.no_require_sim=true \
59 ro.url.legal=http://www.google.com/intl/%s/mobile/android/basic/phone-legal.html \
60 ro.url.legal.android_privacy=http://www.google.com/intl/%s/mobile/android/basic/privacy.html \
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000061 ro.com.android.wifi-watchlist=GoogleGuest \
62 ro.setupwizard.enterprise_mode=1 \
63 ro.com.android.dateformat=MM-dd-yyyy \
64 ro.com.android.dataroaming=false
65
Ricardo Cerqueiraf3835632013-08-04 13:25:00 +010066PRODUCT_PROPERTY_OVERRIDES += \
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +010067 ro.build.selinux=1
Ricardo Cerqueiraf3835632013-08-04 13:25:00 +010068
Steve Kondike4f938c2014-02-04 22:59:01 -080069# Thank you, please drive thru!
70PRODUCT_PROPERTY_OVERRIDES += persist.sys.dun.override=0
71
Chirayu Desai88401db2013-03-20 16:17:17 +053072ifneq ($(TARGET_BUILD_VARIANT),eng)
Chirayu Desai59df3632013-02-15 21:16:39 +053073# Enable ADB authentication
74ADDITIONAL_DEFAULT_PROPERTIES += ro.adb.secure=1
Chirayu Desai88401db2013-03-20 16:17:17 +053075endif
Chirayu Desai59df3632013-02-15 21:16:39 +053076
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000077# Copy over the changelog to the device
78PRODUCT_COPY_FILES += \
79 vendor/cm/CHANGELOG.mkdn:system/etc/CHANGELOG-CM.txt
80
Warren Togamib1637c82012-03-03 22:37:42 -100081# Backup Tool
Steve Kondikbc68cf22013-10-06 22:41:52 -070082ifneq ($(WITH_GMS),true)
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000083PRODUCT_COPY_FILES += \
Warren Togamib1637c82012-03-03 22:37:42 -100084 vendor/cm/prebuilt/common/bin/backuptool.sh:system/bin/backuptool.sh \
85 vendor/cm/prebuilt/common/bin/backuptool.functions:system/bin/backuptool.functions \
Ricardo Cerqueira129989b2012-12-19 01:11:21 +000086 vendor/cm/prebuilt/common/bin/50-cm.sh:system/addon.d/50-cm.sh \
87 vendor/cm/prebuilt/common/bin/blacklist:system/addon.d/blacklist
Steve Kondikbc68cf22013-10-06 22:41:52 -070088endif
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000089
Ricardo Cerqueiraaff5e542014-05-09 22:24:12 +010090# Signature compatibility validation
91PRODUCT_COPY_FILES += \
92 vendor/cm/prebuilt/common/bin/otasigcheck.sh:system/bin/otasigcheck.sh
93
Steve Kondik485527d2011-12-20 12:14:24 -080094# init.d support
95PRODUCT_COPY_FILES += \
96 vendor/cm/prebuilt/common/etc/init.d/00banner:system/etc/init.d/00banner \
97 vendor/cm/prebuilt/common/bin/sysinit:system/bin/sysinit
98
James Sullinseb7799c2012-04-05 20:18:18 -050099# userinit support
100PRODUCT_COPY_FILES += \
101 vendor/cm/prebuilt/common/etc/init.d/90userinit:system/etc/init.d/90userinit
102
Ricardo Cerqueira8f412cb2012-10-18 16:38:25 +0100103# CM-specific init file
104PRODUCT_COPY_FILES += \
105 vendor/cm/prebuilt/common/etc/init.local.rc:root/init.cm.rc
106
Adam Fardendb2438b2012-03-07 14:34:38 +0100107# Bring in camera effects
fitsnugly407b3992012-01-14 18:50:25 -0500108PRODUCT_COPY_FILES += \
fitsnuglyc1c6ce22012-01-12 01:10:39 -0500109 vendor/cm/prebuilt/common/media/LMprec_508.emd:system/media/LMprec_508.emd \
110 vendor/cm/prebuilt/common/media/PFFprec_600.emd:system/media/PFFprec_600.emd
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000111
112# Enable SIP+VoIP on all targets
113PRODUCT_COPY_FILES += \
Ricardo Cerqueira3ff9b6f2012-07-11 11:21:50 +0100114 frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000115
sleeplessninja918a7ea2013-01-30 14:45:20 -0600116# Enable wireless Xbox 360 controller support
117PRODUCT_COPY_FILES += \
118 frameworks/base/data/keyboards/Vendor_045e_Product_028e.kl:system/usr/keylayout/Vendor_045e_Product_0719.kl
119
Steve Kondike0c12da2012-03-25 17:21:32 -0700120# This is CM!
121PRODUCT_COPY_FILES += \
122 vendor/cm/config/permissions/com.cyanogenmod.android.xml:system/etc/permissions/com.cyanogenmod.android.xml
123
Ricardo Cerqueira9f75d842012-05-04 10:15:56 +0100124# T-Mobile theme engine
125include vendor/cm/config/themes_common.mk
126
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000127# Required CM packages
128PRODUCT_PACKAGES += \
Steve Kondike0c297d2011-12-20 16:16:01 -0800129 Development \
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000130 LatinIME \
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100131 BluetoothExt
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000132
133# Optional CM packages
134PRODUCT_PACKAGES += \
Koushik Dutta8475d722013-07-21 09:34:19 -0700135 VoicePlus \
David Fergusonf474b122013-11-10 19:39:36 -0500136 Basic \
Ricardo Cerqueira117984f2015-01-04 01:55:24 +0000137 libemoji \
138 Terminal
Koushik Dutta8387c322011-11-26 17:31:19 -0800139
Steve Kondik04a49412011-12-14 14:02:19 -0800140# Custom CM packages
141PRODUCT_PACKAGES += \
Ricardo Cerqueira50dda4c2013-11-05 15:26:20 +0000142 Launcher3 \
Michael Bestas8deec442013-12-13 04:54:49 +0200143 Trebuchet \
Steve Kondikc4f6b972014-12-09 13:29:29 -0800144 AudioFX \
Ricardo Cerqueira3dc43542012-05-25 04:31:26 +0400145 CMWallpapers \
DvTonderf0074032012-12-30 13:37:40 -0500146 CMFileManager \
Steve Kondikfd3b0e52014-12-09 13:01:09 -0800147 Eleven \
Giulio Cerverab6f18ff2013-08-20 12:53:56 +0200148 LockClock \
Ricardo Cerqueira178ca722013-11-13 21:16:33 +0000149 CMUpdater \
Matt Garnese7b6b8c2014-06-16 19:03:23 -0700150 CMAccount \
151 CMHome
Steve Kondik04a49412011-12-14 14:02:19 -0800152
Ricardo Cerqueira17809562013-08-08 00:49:44 +0100153# CM Hardware Abstraction Framework
154PRODUCT_PACKAGES += \
155 org.cyanogenmod.hardware \
156 org.cyanogenmod.hardware.xml
157
Sebastian Schmidt7d5de0c2012-04-15 11:39:25 +0200158# Extra tools in CM
159PRODUCT_PACKAGES += \
Tanguy Pruvotac602b42013-11-24 13:05:59 +0100160 libsepol \
Steve Kondik08980282012-07-05 01:20:47 -0700161 openvpn \
162 e2fsck \
163 mke2fs \
Steve Kondik1949eb52012-09-20 17:09:07 -0700164 tune2fs \
165 bash \
Steve Kondik1949eb52012-09-20 17:09:07 -0700166 nano \
167 htop \
168 powertop \
Steve Kondik2978e202013-07-06 04:07:56 -0700169 lsof \
170 mount.exfat \
171 fsck.exfat \
172 mkfs.exfat \
Dan Pasanenc1e852e2014-07-20 23:34:19 -0500173 mkfs.f2fs \
174 fsck.f2fs \
175 fibmap.f2fs \
Steve Kondik2978e202013-07-06 04:07:56 -0700176 ntfsfix \
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100177 ntfs-3g \
178 gdbserver \
179 micro_bench \
180 oprofiled \
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100181 sqlite3 \
182 strace
Sebastian Schmidt7d5de0c2012-04-15 11:39:25 +0200183
Chirayu Desai8636d672012-07-19 16:04:25 +0530184# Openssh
185PRODUCT_PACKAGES += \
186 scp \
187 sftp \
188 ssh \
189 sshd \
190 sshd_config \
191 ssh-keygen \
Chirayu Desai4bacf672012-08-19 17:30:04 +0530192 start-ssh
193
194# rsync
195PRODUCT_PACKAGES += \
196 rsync
Chirayu Desai8636d672012-07-19 16:04:25 +0530197
Michael Bestas7d5d16d2014-06-10 20:06:48 +0300198# Stagefright FFMPEG plugin
199PRODUCT_PACKAGES += \
200 libstagefright_soft_ffmpegadec \
201 libstagefright_soft_ffmpegvdec \
202 libFFmpegExtractor \
203 libnamparser
204
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100205# These packages are excluded from user builds
206ifneq ($(TARGET_BUILD_VARIANT),user)
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100207PRODUCT_PACKAGES += \
Steve Kondik275701b2013-11-06 12:41:34 -0800208 procmem \
209 procrank \
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100210 su
repo Shareef Ali4bcfc312014-12-29 17:52:04 -0600211endif
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100212
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100213PRODUCT_PROPERTY_OVERRIDES += \
214 persist.sys.root_access=0
215
Steve Kondik254db262011-12-20 15:02:07 -0800216PRODUCT_PACKAGE_OVERLAYS += vendor/cm/overlay/common
Koushik Duttac6f7a492011-11-28 07:44:23 -0800217
Ricardo Cerqueira49a30e72014-11-05 18:22:50 +0000218PRODUCT_VERSION_MAJOR = 12
Ricardo Cerqueira50dda4c2013-11-05 15:26:20 +0000219PRODUCT_VERSION_MINOR = 0
Ricardo Cerqueira154d0292013-07-25 01:12:16 +0100220PRODUCT_VERSION_MAINTENANCE = 0-RC0
Koushik Duttac6f7a492011-11-28 07:44:23 -0800221
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100222# Set CM_BUILDTYPE from the env RELEASE_TYPE, for jenkins compat
223
224ifndef CM_BUILDTYPE
225 ifdef RELEASE_TYPE
226 # Starting with "CM_" is optional
227 RELEASE_TYPE := $(shell echo $(RELEASE_TYPE) | sed -e 's|^CM_||g')
228 CM_BUILDTYPE := $(RELEASE_TYPE)
229 endif
Warren Togami2128e2f2012-05-06 19:49:33 -1000230endif
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100231
232# Filter out random types, so it'll reset to UNOFFICIAL
233ifeq ($(filter RELEASE NIGHTLY SNAPSHOT EXPERIMENTAL,$(CM_BUILDTYPE)),)
234 CM_BUILDTYPE :=
Warren Togami2128e2f2012-05-06 19:49:33 -1000235endif
236
Ricardo Cerqueirad8e76662012-06-08 11:08:15 +0100237ifdef CM_BUILDTYPE
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100238 ifneq ($(CM_BUILDTYPE), SNAPSHOT)
239 ifdef CM_EXTRAVERSION
240 # Force build type to EXPERIMENTAL
241 CM_BUILDTYPE := EXPERIMENTAL
242 # Remove leading dash from CM_EXTRAVERSION
243 CM_EXTRAVERSION := $(shell echo $(CM_EXTRAVERSION) | sed 's/-//')
244 # Add leading dash to CM_EXTRAVERSION
245 CM_EXTRAVERSION := -$(CM_EXTRAVERSION)
246 endif
247 else
248 ifndef CM_EXTRAVERSION
249 # Force build type to EXPERIMENTAL, SNAPSHOT mandates a tag
250 CM_BUILDTYPE := EXPERIMENTAL
251 else
252 # Remove leading dash from CM_EXTRAVERSION
253 CM_EXTRAVERSION := $(shell echo $(CM_EXTRAVERSION) | sed 's/-//')
254 # Add leading dash to CM_EXTRAVERSION
255 CM_EXTRAVERSION := -$(CM_EXTRAVERSION)
256 endif
Ricardo Cerqueirad8e76662012-06-08 11:08:15 +0100257 endif
258else
259 # If CM_BUILDTYPE is not defined, set to UNOFFICIAL
Warren Togami2128e2f2012-05-06 19:49:33 -1000260 CM_BUILDTYPE := UNOFFICIAL
Ricardo Cerqueirad8e76662012-06-08 11:08:15 +0100261 CM_EXTRAVERSION :=
Warren Togami2128e2f2012-05-06 19:49:33 -1000262endif
263
Matt Mowerf4168392013-12-13 11:04:14 -0600264ifeq ($(CM_BUILDTYPE), UNOFFICIAL)
265 ifneq ($(TARGET_UNOFFICIAL_BUILD_ID),)
Michael Bestas3bf9ba82013-12-18 00:22:58 +0200266 CM_EXTRAVERSION := -$(TARGET_UNOFFICIAL_BUILD_ID)
Matt Mowerf4168392013-12-13 11:04:14 -0600267 endif
268endif
269
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100270ifeq ($(CM_BUILDTYPE), RELEASE)
Ricardo Cerqueiraae71f042013-11-11 00:55:51 +0000271 ifndef TARGET_VENDOR_RELEASE_BUILD_ID
272 CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(CM_BUILD)
273 else
274 ifeq ($(TARGET_BUILD_VARIANT),user)
275 CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(CM_BUILD)
276 else
277 CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(CM_BUILD)
278 endif
279 endif
Koushik Duttac6f7a492011-11-28 07:44:23 -0800280else
Chirayu Desaie6e61632012-12-04 19:16:48 +0530281 ifeq ($(PRODUCT_VERSION_MINOR),0)
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100282 CM_VERSION := $(PRODUCT_VERSION_MAJOR)-$(shell date -u +%Y%m%d)-$(CM_BUILDTYPE)$(CM_EXTRAVERSION)-$(CM_BUILD)
Chirayu Desaie6e61632012-12-04 19:16:48 +0530283 else
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100284 CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(shell date -u +%Y%m%d)-$(CM_BUILDTYPE)$(CM_EXTRAVERSION)-$(CM_BUILD)
Chirayu Desaie6e61632012-12-04 19:16:48 +0530285 endif
Koushik Duttac6f7a492011-11-28 07:44:23 -0800286endif
Koushik Duttad69b2922012-02-23 14:07:44 -0800287
288PRODUCT_PROPERTY_OVERRIDES += \
289 ro.cm.version=$(CM_VERSION) \
Brint E. Kriebelaf917582014-07-10 10:31:00 -0700290 ro.cm.releasetype=$(CM_BUILDTYPE) \
Abhisek Devkota381a3052013-12-10 04:35:08 -0800291 ro.modversion=$(CM_VERSION) \
292 ro.cmlegal.url=http://www.cyanogenmod.org/docs/privacy
Ricardo Cerqueirad5422742012-11-13 10:42:11 +0000293
Ricardo Cerqueira178dbd62013-10-23 20:56:56 +0100294-include vendor/cm-priv/keys/keys.mk
295
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000296CM_DISPLAY_VERSION := $(CM_VERSION)
297
Brint E. Kriebelac948f52014-01-24 09:58:36 -0800298ifneq ($(PRODUCT_DEFAULT_DEV_CERTIFICATE),)
299ifneq ($(PRODUCT_DEFAULT_DEV_CERTIFICATE),build/target/product/security/testkey)
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000300 ifneq ($(CM_BUILDTYPE), UNOFFICIAL)
301 ifndef TARGET_VENDOR_RELEASE_BUILD_ID
302 ifneq ($(CM_EXTRAVERSION),)
Ricardo Cerqueira17b25872014-02-16 17:15:07 +0000303 # Remove leading dash from CM_EXTRAVERSION
304 CM_EXTRAVERSION := $(shell echo $(CM_EXTRAVERSION) | sed 's/-//')
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000305 TARGET_VENDOR_RELEASE_BUILD_ID := $(CM_EXTRAVERSION)
306 else
Ricardo Cerqueira17b25872014-02-16 17:15:07 +0000307 TARGET_VENDOR_RELEASE_BUILD_ID := $(shell date -u +%Y%m%d)
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000308 endif
309 else
Ricardo Cerqueira17b25872014-02-16 17:15:07 +0000310 TARGET_VENDOR_RELEASE_BUILD_ID := $(TARGET_VENDOR_RELEASE_BUILD_ID)
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000311 endif
Ricardo Cerqueira17b25872014-02-16 17:15:07 +0000312 CM_DISPLAY_VERSION=$(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(TARGET_VENDOR_RELEASE_BUILD_ID)
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000313 endif
314endif
Ricardo Cerqueira74b4f9b2014-01-11 16:00:16 +0000315endif
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000316
Brint E. Kriebele0e8c272014-05-21 23:37:52 -0700317# by default, do not update the recovery with system updates
318PRODUCT_PROPERTY_OVERRIDES += persist.sys.recovery_update=false
319
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000320PRODUCT_PROPERTY_OVERRIDES += \
321 ro.cm.display.version=$(CM_DISPLAY_VERSION)
322
Brint E. Kriebela1e49122014-01-31 11:59:56 -0800323-include $(WORKSPACE)/build_env/image-auto-bits.mk
Koushik Dutta41fd0aa2013-12-07 22:04:17 -0800324
325-include vendor/cyngn/product.mk
Steve Kondikb9dd4002014-09-10 15:41:43 -0700326
327$(call inherit-product-if-exists, vendor/extra/product.mk)