blob: 3dc5cac2fdf4dd35d199949ca7fcca6e33ae921d [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
William Roberts4256e662013-08-21 13:43:54 -070032PRODUCT_BOOTANIMATION := vendor/cm/prebuilt/common/bootanimation/$(TARGET_BOOTANIMATION_NAME).zip
Steve Kondika8945752012-03-14 00:10:33 -070033endif
34
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000035ifdef CM_NIGHTLY
36PRODUCT_PROPERTY_OVERRIDES += \
37 ro.rommanager.developerid=cyanogenmodnightly
38else
39PRODUCT_PROPERTY_OVERRIDES += \
40 ro.rommanager.developerid=cyanogenmod
41endif
42
43PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0
44
Steve Kondik5a27f632013-11-06 13:55:11 -080045ifeq ($(PRODUCT_GMS_CLIENTID_BASE),)
46PRODUCT_PROPERTY_OVERRIDES += \
47 ro.com.google.clientidbase=android-google
48else
49PRODUCT_PROPERTY_OVERRIDES += \
50 ro.com.google.clientidbase=$(PRODUCT_GMS_CLIENTID_BASE)
51endif
52
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000053PRODUCT_PROPERTY_OVERRIDES += \
54 keyguard.no_require_sim=true \
55 ro.url.legal=http://www.google.com/intl/%s/mobile/android/basic/phone-legal.html \
56 ro.url.legal.android_privacy=http://www.google.com/intl/%s/mobile/android/basic/privacy.html \
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000057 ro.com.android.wifi-watchlist=GoogleGuest \
58 ro.setupwizard.enterprise_mode=1 \
59 ro.com.android.dateformat=MM-dd-yyyy \
60 ro.com.android.dataroaming=false
61
Ricardo Cerqueiraf3835632013-08-04 13:25:00 +010062PRODUCT_PROPERTY_OVERRIDES += \
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +010063 ro.build.selinux=1
Ricardo Cerqueiraf3835632013-08-04 13:25:00 +010064
Chirayu Desai88401db2013-03-20 16:17:17 +053065ifneq ($(TARGET_BUILD_VARIANT),eng)
Chirayu Desai59df3632013-02-15 21:16:39 +053066# Enable ADB authentication
67ADDITIONAL_DEFAULT_PROPERTIES += ro.adb.secure=1
Chirayu Desai88401db2013-03-20 16:17:17 +053068endif
Chirayu Desai59df3632013-02-15 21:16:39 +053069
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000070# Copy over the changelog to the device
71PRODUCT_COPY_FILES += \
72 vendor/cm/CHANGELOG.mkdn:system/etc/CHANGELOG-CM.txt
73
Warren Togamib1637c82012-03-03 22:37:42 -100074# Backup Tool
Steve Kondikbc68cf22013-10-06 22:41:52 -070075ifneq ($(WITH_GMS),true)
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000076PRODUCT_COPY_FILES += \
Warren Togamib1637c82012-03-03 22:37:42 -100077 vendor/cm/prebuilt/common/bin/backuptool.sh:system/bin/backuptool.sh \
78 vendor/cm/prebuilt/common/bin/backuptool.functions:system/bin/backuptool.functions \
Ricardo Cerqueira129989b2012-12-19 01:11:21 +000079 vendor/cm/prebuilt/common/bin/50-cm.sh:system/addon.d/50-cm.sh \
80 vendor/cm/prebuilt/common/bin/blacklist:system/addon.d/blacklist
Steve Kondikbc68cf22013-10-06 22:41:52 -070081endif
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000082
Steve Kondik485527d2011-12-20 12:14:24 -080083# init.d support
84PRODUCT_COPY_FILES += \
85 vendor/cm/prebuilt/common/etc/init.d/00banner:system/etc/init.d/00banner \
86 vendor/cm/prebuilt/common/bin/sysinit:system/bin/sysinit
87
James Sullinseb7799c2012-04-05 20:18:18 -050088# userinit support
89PRODUCT_COPY_FILES += \
90 vendor/cm/prebuilt/common/etc/init.d/90userinit:system/etc/init.d/90userinit
91
Ricardo Cerqueirad2d1a7f2013-07-17 16:45:20 +010092# SELinux filesystem labels
93PRODUCT_COPY_FILES += \
94 vendor/cm/prebuilt/common/etc/init.d/50selinuxrelabel:system/etc/init.d/50selinuxrelabel
95
Ricardo Cerqueira8f412cb2012-10-18 16:38:25 +010096# CM-specific init file
97PRODUCT_COPY_FILES += \
98 vendor/cm/prebuilt/common/etc/init.local.rc:root/init.cm.rc
99
Adam Fardendb2438b2012-03-07 14:34:38 +0100100# Bring in camera effects
fitsnugly407b3992012-01-14 18:50:25 -0500101PRODUCT_COPY_FILES += \
fitsnuglyc1c6ce22012-01-12 01:10:39 -0500102 vendor/cm/prebuilt/common/media/LMprec_508.emd:system/media/LMprec_508.emd \
103 vendor/cm/prebuilt/common/media/PFFprec_600.emd:system/media/PFFprec_600.emd
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000104
105# Enable SIP+VoIP on all targets
106PRODUCT_COPY_FILES += \
Ricardo Cerqueira3ff9b6f2012-07-11 11:21:50 +0100107 frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000108
sleeplessninja918a7ea2013-01-30 14:45:20 -0600109# Enable wireless Xbox 360 controller support
110PRODUCT_COPY_FILES += \
111 frameworks/base/data/keyboards/Vendor_045e_Product_028e.kl:system/usr/keylayout/Vendor_045e_Product_0719.kl
112
Steve Kondike0c12da2012-03-25 17:21:32 -0700113# This is CM!
114PRODUCT_COPY_FILES += \
115 vendor/cm/config/permissions/com.cyanogenmod.android.xml:system/etc/permissions/com.cyanogenmod.android.xml
116
Ricardo Cerqueira9f75d842012-05-04 10:15:56 +0100117# T-Mobile theme engine
118include vendor/cm/config/themes_common.mk
119
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000120# Required CM packages
121PRODUCT_PACKAGES += \
Steve Kondike0c297d2011-12-20 16:16:01 -0800122 Development \
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000123 LatinIME \
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100124 BluetoothExt
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000125
126# Optional CM packages
127PRODUCT_PACKAGES += \
Koushik Dutta8475d722013-07-21 09:34:19 -0700128 VoicePlus \
Koushik Dutta74d3bad2011-11-27 13:00:30 -0800129 VoiceDialer \
Warren Togami5960a702012-02-22 09:22:42 -1000130 SoundRecorder \
David Fergusonf474b122013-11-10 19:39:36 -0500131 Basic \
132 libemoji
Koushik Dutta8387c322011-11-26 17:31:19 -0800133
Steve Kondik04a49412011-12-14 14:02:19 -0800134# Custom CM packages
Ricardo Cerqueira50dda4c2013-11-05 15:26:20 +0000135 #Trebuchet \
136
Steve Kondik04a49412011-12-14 14:02:19 -0800137PRODUCT_PACKAGES += \
Ricardo Cerqueira50dda4c2013-11-05 15:26:20 +0000138 Launcher3 \
Steve Kondik04a49412011-12-14 14:02:19 -0800139 DSPManager \
Steve Kondika25e4e02011-12-14 22:27:07 -0800140 libcyanogen-dsp \
Steve Kondikfcc16102012-05-05 16:23:24 -0700141 audio_effects.conf \
Ricardo Cerqueira3dc43542012-05-25 04:31:26 +0400142 CMWallpapers \
Ricardo Cerqueira2526fef2012-09-29 17:17:45 +0100143 Apollo \
DvTonderf0074032012-12-30 13:37:40 -0500144 CMFileManager \
Giulio Cerverab6f18ff2013-08-20 12:53:56 +0200145 LockClock \
Ricardo Cerqueira178ca722013-11-13 21:16:33 +0000146 CMUpdater \
147 CMFota \
Pawit Pornkitprasana082e902013-12-13 18:17:08 +0700148 CMAccount
Steve Kondik04a49412011-12-14 14:02:19 -0800149
Ricardo Cerqueira17809562013-08-08 00:49:44 +0100150# CM Hardware Abstraction Framework
151PRODUCT_PACKAGES += \
152 org.cyanogenmod.hardware \
153 org.cyanogenmod.hardware.xml
154
Sebastian Schmidt7d5de0c2012-04-15 11:39:25 +0200155# Extra tools in CM
156PRODUCT_PACKAGES += \
Steve Kondik08980282012-07-05 01:20:47 -0700157 openvpn \
158 e2fsck \
159 mke2fs \
Steve Kondik1949eb52012-09-20 17:09:07 -0700160 tune2fs \
161 bash \
162 vim \
163 nano \
164 htop \
165 powertop \
Steve Kondik2978e202013-07-06 04:07:56 -0700166 lsof \
167 mount.exfat \
168 fsck.exfat \
169 mkfs.exfat \
170 ntfsfix \
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100171 ntfs-3g \
172 gdbserver \
173 micro_bench \
174 oprofiled \
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100175 sqlite3 \
176 strace
Sebastian Schmidt7d5de0c2012-04-15 11:39:25 +0200177
Chirayu Desai8636d672012-07-19 16:04:25 +0530178# Openssh
179PRODUCT_PACKAGES += \
180 scp \
181 sftp \
182 ssh \
183 sshd \
184 sshd_config \
185 ssh-keygen \
Chirayu Desai4bacf672012-08-19 17:30:04 +0530186 start-ssh
187
188# rsync
189PRODUCT_PACKAGES += \
190 rsync
Chirayu Desai8636d672012-07-19 16:04:25 +0530191
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100192# These packages are excluded from user builds
193ifneq ($(TARGET_BUILD_VARIANT),user)
194
195PRODUCT_PACKAGES += \
Steve Kondik275701b2013-11-06 12:41:34 -0800196 procmem \
197 procrank \
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100198 Superuser \
199 su
200
201# Terminal Emulator
202PRODUCT_COPY_FILES += \
203 vendor/cm/proprietary/Term.apk:system/app/Term.apk \
204 vendor/cm/proprietary/lib/armeabi/libjackpal-androidterm4.so:system/lib/libjackpal-androidterm4.so
205
206PRODUCT_PROPERTY_OVERRIDES += \
207 persist.sys.root_access=1
208else
209
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100210PRODUCT_PROPERTY_OVERRIDES += \
211 persist.sys.root_access=0
212
213endif
214
Koushik Dutta45e65982013-08-12 15:41:14 -0700215# easy way to extend to add more packages
216-include vendor/extra/product.mk
217
Koushik Duttac6f7a492011-11-28 07:44:23 -0800218PRODUCT_PACKAGE_OVERLAYS += vendor/cm/overlay/dictionaries
Steve Kondik254db262011-12-20 15:02:07 -0800219PRODUCT_PACKAGE_OVERLAYS += vendor/cm/overlay/common
Koushik Duttac6f7a492011-11-28 07:44:23 -0800220
Ricardo Cerqueira50dda4c2013-11-05 15:26:20 +0000221PRODUCT_VERSION_MAJOR = 11
222PRODUCT_VERSION_MINOR = 0
Ricardo Cerqueira154d0292013-07-25 01:12:16 +0100223PRODUCT_VERSION_MAINTENANCE = 0-RC0
Koushik Duttac6f7a492011-11-28 07:44:23 -0800224
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100225# Set CM_BUILDTYPE from the env RELEASE_TYPE, for jenkins compat
226
227ifndef CM_BUILDTYPE
228 ifdef RELEASE_TYPE
229 # Starting with "CM_" is optional
230 RELEASE_TYPE := $(shell echo $(RELEASE_TYPE) | sed -e 's|^CM_||g')
231 CM_BUILDTYPE := $(RELEASE_TYPE)
232 endif
Warren Togami2128e2f2012-05-06 19:49:33 -1000233endif
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100234
235# Filter out random types, so it'll reset to UNOFFICIAL
236ifeq ($(filter RELEASE NIGHTLY SNAPSHOT EXPERIMENTAL,$(CM_BUILDTYPE)),)
237 CM_BUILDTYPE :=
Warren Togami2128e2f2012-05-06 19:49:33 -1000238endif
239
Ricardo Cerqueirad8e76662012-06-08 11:08:15 +0100240ifdef CM_BUILDTYPE
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100241 ifneq ($(CM_BUILDTYPE), SNAPSHOT)
242 ifdef CM_EXTRAVERSION
243 # Force build type to EXPERIMENTAL
244 CM_BUILDTYPE := EXPERIMENTAL
245 # Remove leading dash from CM_EXTRAVERSION
246 CM_EXTRAVERSION := $(shell echo $(CM_EXTRAVERSION) | sed 's/-//')
247 # Add leading dash to CM_EXTRAVERSION
248 CM_EXTRAVERSION := -$(CM_EXTRAVERSION)
249 endif
250 else
251 ifndef CM_EXTRAVERSION
252 # Force build type to EXPERIMENTAL, SNAPSHOT mandates a tag
253 CM_BUILDTYPE := EXPERIMENTAL
254 else
255 # Remove leading dash from CM_EXTRAVERSION
256 CM_EXTRAVERSION := $(shell echo $(CM_EXTRAVERSION) | sed 's/-//')
257 # Add leading dash to CM_EXTRAVERSION
258 CM_EXTRAVERSION := -$(CM_EXTRAVERSION)
259 endif
Ricardo Cerqueirad8e76662012-06-08 11:08:15 +0100260 endif
261else
262 # If CM_BUILDTYPE is not defined, set to UNOFFICIAL
Warren Togami2128e2f2012-05-06 19:49:33 -1000263 CM_BUILDTYPE := UNOFFICIAL
Ricardo Cerqueirad8e76662012-06-08 11:08:15 +0100264 CM_EXTRAVERSION :=
Warren Togami2128e2f2012-05-06 19:49:33 -1000265endif
266
Matt Mowerf4168392013-12-13 11:04:14 -0600267ifeq ($(CM_BUILDTYPE), UNOFFICIAL)
268 ifneq ($(TARGET_UNOFFICIAL_BUILD_ID),)
Michael Bestas3bf9ba82013-12-18 00:22:58 +0200269 CM_EXTRAVERSION := -$(TARGET_UNOFFICIAL_BUILD_ID)
Matt Mowerf4168392013-12-13 11:04:14 -0600270 endif
271endif
272
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100273ifeq ($(CM_BUILDTYPE), RELEASE)
Ricardo Cerqueiraae71f042013-11-11 00:55:51 +0000274 ifndef TARGET_VENDOR_RELEASE_BUILD_ID
275 CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(CM_BUILD)
276 else
277 ifeq ($(TARGET_BUILD_VARIANT),user)
278 CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(TARGET_VENDOR_RELEASE_BUILD_ID)-$(CM_BUILD)
279 else
280 CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(CM_BUILD)
281 endif
282 endif
Koushik Duttac6f7a492011-11-28 07:44:23 -0800283else
Chirayu Desaie6e61632012-12-04 19:16:48 +0530284 ifeq ($(PRODUCT_VERSION_MINOR),0)
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100285 CM_VERSION := $(PRODUCT_VERSION_MAJOR)-$(shell date -u +%Y%m%d)-$(CM_BUILDTYPE)$(CM_EXTRAVERSION)-$(CM_BUILD)
Chirayu Desaie6e61632012-12-04 19:16:48 +0530286 else
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100287 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 +0530288 endif
Koushik Duttac6f7a492011-11-28 07:44:23 -0800289endif
Koushik Duttad69b2922012-02-23 14:07:44 -0800290
291PRODUCT_PROPERTY_OVERRIDES += \
292 ro.cm.version=$(CM_VERSION) \
Abhisek Devkota381a3052013-12-10 04:35:08 -0800293 ro.modversion=$(CM_VERSION) \
294 ro.cmlegal.url=http://www.cyanogenmod.org/docs/privacy
Ricardo Cerqueirad5422742012-11-13 10:42:11 +0000295
Ricardo Cerqueira178dbd62013-10-23 20:56:56 +0100296-include vendor/cm-priv/keys/keys.mk
297
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000298CM_DISPLAY_VERSION := $(CM_VERSION)
299
Ricardo Cerqueira74b4f9b2014-01-11 16:00:16 +0000300ifneq ($(DEFAULT_SYSTEM_DEV_CERTIFICATE),)
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000301ifneq ($(DEFAULT_SYSTEM_DEV_CERTIFICATE),build/target/product/security/testkey)
302 ifneq ($(CM_BUILDTYPE), UNOFFICIAL)
303 ifndef TARGET_VENDOR_RELEASE_BUILD_ID
304 ifneq ($(CM_EXTRAVERSION),)
305 TARGET_VENDOR_RELEASE_BUILD_ID := $(CM_EXTRAVERSION)
306 else
307 TARGET_VENDOR_RELEASE_BUILD_ID := -$(shell date -u +%Y%m%d)
308 endif
309 else
310 TARGET_VENDOR_RELEASE_BUILD_ID := -$(TARGET_VENDOR_RELEASE_BUILD_ID)
311 endif
312 CM_DISPLAY_VERSION=$(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)$(TARGET_VENDOR_RELEASE_BUILD_ID)
313 endif
314endif
Ricardo Cerqueira74b4f9b2014-01-11 16:00:16 +0000315endif
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000316
317PRODUCT_PROPERTY_OVERRIDES += \
318 ro.cm.display.version=$(CM_DISPLAY_VERSION)
319
Ricardo Cerqueirad5422742012-11-13 10:42:11 +0000320-include $(WORKSPACE)/hudson/image-auto-bits.mk
Koushik Dutta41fd0aa2013-12-07 22:04:17 -0800321
322-include vendor/cyngn/product.mk