blob: 9ccd63cfe46f775c891be2f1a73fa29ce9cd9d1d [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 -07006# To deal with CM9 specifications
7# TODO: remove once all devices have been switched
Steve Kondika8945752012-03-14 00:10:33 -07008ifneq ($(TARGET_BOOTANIMATION_NAME),)
Steve Kondikba1ca332012-08-21 02:18:40 -07009TARGET_SCREEN_DIMENSIONS := $(subst -, $(space), $(subst x, $(space), $(TARGET_BOOTANIMATION_NAME)))
10ifeq ($(TARGET_SCREEN_WIDTH),)
11TARGET_SCREEN_WIDTH := $(word 2, $(TARGET_SCREEN_DIMENSIONS))
12endif
13ifeq ($(TARGET_SCREEN_HEIGHT),)
14TARGET_SCREEN_HEIGHT := $(word 3, $(TARGET_SCREEN_DIMENSIONS))
15endif
16endif
17
18ifneq ($(TARGET_SCREEN_WIDTH) $(TARGET_SCREEN_HEIGHT),$(space))
19
20# clear TARGET_BOOTANIMATION_NAME in case it was set for CM9 purposes
21TARGET_BOOTANIMATION_NAME :=
22
23# determine the smaller dimension
24TARGET_BOOTANIMATION_SIZE := $(shell \
25 if [ $(TARGET_SCREEN_WIDTH) -lt $(TARGET_SCREEN_HEIGHT) ]; then \
26 echo $(TARGET_SCREEN_WIDTH); \
27 else \
28 echo $(TARGET_SCREEN_HEIGHT); \
29 fi )
30
31# get a sorted list of the sizes
32bootanimation_sizes := $(subst .zip,, $(shell ls vendor/cm/prebuilt/common/bootanimation))
33bootanimation_sizes := $(shell echo -e $(subst $(space),'\n',$(bootanimation_sizes)) | sort -rn)
34
35# find the appropriate size and set
36define check_and_set_bootanimation
37$(eval TARGET_BOOTANIMATION_NAME := $(shell \
38 if [ -z "$(TARGET_BOOTANIMATION_NAME)" ]; then
39 if [ $(1) -le $(TARGET_BOOTANIMATION_SIZE) ]; then \
40 echo $(1); \
41 exit 0; \
42 fi;
43 fi;
44 echo $(TARGET_BOOTANIMATION_NAME); ))
45endef
46$(foreach size,$(bootanimation_sizes), $(call check_and_set_bootanimation,$(size)))
47
William Roberts4256e662013-08-21 13:43:54 -070048PRODUCT_BOOTANIMATION := vendor/cm/prebuilt/common/bootanimation/$(TARGET_BOOTANIMATION_NAME).zip
Steve Kondika8945752012-03-14 00:10:33 -070049endif
50
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000051ifdef CM_NIGHTLY
52PRODUCT_PROPERTY_OVERRIDES += \
53 ro.rommanager.developerid=cyanogenmodnightly
54else
55PRODUCT_PROPERTY_OVERRIDES += \
56 ro.rommanager.developerid=cyanogenmod
57endif
58
59PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0
60
61PRODUCT_PROPERTY_OVERRIDES += \
62 keyguard.no_require_sim=true \
63 ro.url.legal=http://www.google.com/intl/%s/mobile/android/basic/phone-legal.html \
64 ro.url.legal.android_privacy=http://www.google.com/intl/%s/mobile/android/basic/privacy.html \
65 ro.com.google.clientidbase=android-google \
66 ro.com.android.wifi-watchlist=GoogleGuest \
67 ro.setupwizard.enterprise_mode=1 \
68 ro.com.android.dateformat=MM-dd-yyyy \
69 ro.com.android.dataroaming=false
70
Ricardo Cerqueiraf3835632013-08-04 13:25:00 +010071PRODUCT_PROPERTY_OVERRIDES += \
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +010072 ro.build.selinux=1
Ricardo Cerqueiraf3835632013-08-04 13:25:00 +010073
Chirayu Desai88401db2013-03-20 16:17:17 +053074ifneq ($(TARGET_BUILD_VARIANT),eng)
Chirayu Desai59df3632013-02-15 21:16:39 +053075# Enable ADB authentication
76ADDITIONAL_DEFAULT_PROPERTIES += ro.adb.secure=1
Chirayu Desai88401db2013-03-20 16:17:17 +053077endif
Chirayu Desai59df3632013-02-15 21:16:39 +053078
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000079# Copy over the changelog to the device
80PRODUCT_COPY_FILES += \
81 vendor/cm/CHANGELOG.mkdn:system/etc/CHANGELOG-CM.txt
82
Warren Togamib1637c82012-03-03 22:37:42 -100083# Backup Tool
Steve Kondikbc68cf22013-10-06 22:41:52 -070084ifneq ($(WITH_GMS),true)
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000085PRODUCT_COPY_FILES += \
Warren Togamib1637c82012-03-03 22:37:42 -100086 vendor/cm/prebuilt/common/bin/backuptool.sh:system/bin/backuptool.sh \
87 vendor/cm/prebuilt/common/bin/backuptool.functions:system/bin/backuptool.functions \
Ricardo Cerqueira129989b2012-12-19 01:11:21 +000088 vendor/cm/prebuilt/common/bin/50-cm.sh:system/addon.d/50-cm.sh \
89 vendor/cm/prebuilt/common/bin/blacklist:system/addon.d/blacklist
Steve Kondikbc68cf22013-10-06 22:41:52 -070090endif
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000091
Steve Kondik485527d2011-12-20 12:14:24 -080092# init.d support
93PRODUCT_COPY_FILES += \
94 vendor/cm/prebuilt/common/etc/init.d/00banner:system/etc/init.d/00banner \
95 vendor/cm/prebuilt/common/bin/sysinit:system/bin/sysinit
96
James Sullinseb7799c2012-04-05 20:18:18 -050097# userinit support
98PRODUCT_COPY_FILES += \
99 vendor/cm/prebuilt/common/etc/init.d/90userinit:system/etc/init.d/90userinit
100
Ricardo Cerqueirad2d1a7f2013-07-17 16:45:20 +0100101# SELinux filesystem labels
102PRODUCT_COPY_FILES += \
103 vendor/cm/prebuilt/common/etc/init.d/50selinuxrelabel:system/etc/init.d/50selinuxrelabel
104
Ricardo Cerqueira8f412cb2012-10-18 16:38:25 +0100105# CM-specific init file
106PRODUCT_COPY_FILES += \
107 vendor/cm/prebuilt/common/etc/init.local.rc:root/init.cm.rc
108
Steve Kondik485527d2011-12-20 12:14:24 -0800109# Compcache/Zram support
110PRODUCT_COPY_FILES += \
Steve Kondik485527d2011-12-20 12:14:24 -0800111 vendor/cm/prebuilt/common/bin/compcache:system/bin/compcache \
112 vendor/cm/prebuilt/common/bin/handle_compcache:system/bin/handle_compcache
113
Adam Fardendb2438b2012-03-07 14:34:38 +0100114# Bring in camera effects
fitsnugly407b3992012-01-14 18:50:25 -0500115PRODUCT_COPY_FILES += \
fitsnuglyc1c6ce22012-01-12 01:10:39 -0500116 vendor/cm/prebuilt/common/media/LMprec_508.emd:system/media/LMprec_508.emd \
117 vendor/cm/prebuilt/common/media/PFFprec_600.emd:system/media/PFFprec_600.emd
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000118
119# Enable SIP+VoIP on all targets
120PRODUCT_COPY_FILES += \
Ricardo Cerqueira3ff9b6f2012-07-11 11:21:50 +0100121 frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000122
sleeplessninja918a7ea2013-01-30 14:45:20 -0600123# Enable wireless Xbox 360 controller support
124PRODUCT_COPY_FILES += \
125 frameworks/base/data/keyboards/Vendor_045e_Product_028e.kl:system/usr/keylayout/Vendor_045e_Product_0719.kl
126
Steve Kondike0c12da2012-03-25 17:21:32 -0700127# This is CM!
128PRODUCT_COPY_FILES += \
129 vendor/cm/config/permissions/com.cyanogenmod.android.xml:system/etc/permissions/com.cyanogenmod.android.xml
130
Ricardo Cerqueira9f75d842012-05-04 10:15:56 +0100131# T-Mobile theme engine
132include vendor/cm/config/themes_common.mk
133
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000134# Required CM packages
135PRODUCT_PACKAGES += \
Steve Kondike0c297d2011-12-20 16:16:01 -0800136 Development \
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000137 LatinIME \
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100138 BluetoothExt
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000139
140# Optional CM packages
141PRODUCT_PACKAGES += \
Koushik Dutta8475d722013-07-21 09:34:19 -0700142 VoicePlus \
Koushik Dutta74d3bad2011-11-27 13:00:30 -0800143 VoiceDialer \
Warren Togami5960a702012-02-22 09:22:42 -1000144 SoundRecorder \
David Fergusonf474b122013-11-10 19:39:36 -0500145 Basic \
146 libemoji
Koushik Dutta8387c322011-11-26 17:31:19 -0800147
Steve Kondik04a49412011-12-14 14:02:19 -0800148# Custom CM packages
Ricardo Cerqueira50dda4c2013-11-05 15:26:20 +0000149 #Trebuchet \
150
Steve Kondik04a49412011-12-14 14:02:19 -0800151PRODUCT_PACKAGES += \
Ricardo Cerqueira50dda4c2013-11-05 15:26:20 +0000152 Launcher3 \
Steve Kondik04a49412011-12-14 14:02:19 -0800153 DSPManager \
Steve Kondika25e4e02011-12-14 22:27:07 -0800154 libcyanogen-dsp \
Steve Kondikfcc16102012-05-05 16:23:24 -0700155 audio_effects.conf \
Ricardo Cerqueira3dc43542012-05-25 04:31:26 +0400156 CMWallpapers \
Ricardo Cerqueira2526fef2012-09-29 17:17:45 +0100157 Apollo \
DvTonderf0074032012-12-30 13:37:40 -0500158 CMFileManager \
Giulio Cerverab6f18ff2013-08-20 12:53:56 +0200159 LockClock \
160 CMAccount
Steve Kondik04a49412011-12-14 14:02:19 -0800161
Ricardo Cerqueira17809562013-08-08 00:49:44 +0100162# CM Hardware Abstraction Framework
163PRODUCT_PACKAGES += \
164 org.cyanogenmod.hardware \
165 org.cyanogenmod.hardware.xml
166
Chirayu Desai7a7185b2013-03-28 11:44:05 +0530167PRODUCT_PACKAGES += \
168 CellBroadcastReceiver
169
Sebastian Schmidt7d5de0c2012-04-15 11:39:25 +0200170# Extra tools in CM
171PRODUCT_PACKAGES += \
Steve Kondik08980282012-07-05 01:20:47 -0700172 openvpn \
173 e2fsck \
174 mke2fs \
Steve Kondik1949eb52012-09-20 17:09:07 -0700175 tune2fs \
176 bash \
177 vim \
178 nano \
179 htop \
180 powertop \
Steve Kondik2978e202013-07-06 04:07:56 -0700181 lsof \
182 mount.exfat \
183 fsck.exfat \
184 mkfs.exfat \
185 ntfsfix \
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100186 ntfs-3g \
187 gdbserver \
188 micro_bench \
189 oprofiled \
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100190 sqlite3 \
191 strace
Sebastian Schmidt7d5de0c2012-04-15 11:39:25 +0200192
Chirayu Desai8636d672012-07-19 16:04:25 +0530193# Openssh
194PRODUCT_PACKAGES += \
195 scp \
196 sftp \
197 ssh \
198 sshd \
199 sshd_config \
200 ssh-keygen \
Chirayu Desai4bacf672012-08-19 17:30:04 +0530201 start-ssh
202
203# rsync
204PRODUCT_PACKAGES += \
205 rsync
Chirayu Desai8636d672012-07-19 16:04:25 +0530206
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100207# These packages are excluded from user builds
208ifneq ($(TARGET_BUILD_VARIANT),user)
209
210PRODUCT_PACKAGES += \
Steve Kondik275701b2013-11-06 12:41:34 -0800211 procmem \
212 procrank \
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100213 CMUpdater \
214 Superuser \
215 su
216
217# Terminal Emulator
218PRODUCT_COPY_FILES += \
219 vendor/cm/proprietary/Term.apk:system/app/Term.apk \
220 vendor/cm/proprietary/lib/armeabi/libjackpal-androidterm4.so:system/lib/libjackpal-androidterm4.so
221
222PRODUCT_PROPERTY_OVERRIDES += \
223 persist.sys.root_access=1
224else
225
226PRODUCT_PACKAGES += \
227 CMFota
228
229PRODUCT_PROPERTY_OVERRIDES += \
230 persist.sys.root_access=0
231
232endif
233
Koushik Dutta45e65982013-08-12 15:41:14 -0700234# easy way to extend to add more packages
235-include vendor/extra/product.mk
236
Koushik Duttac6f7a492011-11-28 07:44:23 -0800237PRODUCT_PACKAGE_OVERLAYS += vendor/cm/overlay/dictionaries
Steve Kondik254db262011-12-20 15:02:07 -0800238PRODUCT_PACKAGE_OVERLAYS += vendor/cm/overlay/common
Koushik Duttac6f7a492011-11-28 07:44:23 -0800239
Ricardo Cerqueira50dda4c2013-11-05 15:26:20 +0000240PRODUCT_VERSION_MAJOR = 11
241PRODUCT_VERSION_MINOR = 0
Ricardo Cerqueira154d0292013-07-25 01:12:16 +0100242PRODUCT_VERSION_MAINTENANCE = 0-RC0
Koushik Duttac6f7a492011-11-28 07:44:23 -0800243
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100244# Set CM_BUILDTYPE from the env RELEASE_TYPE, for jenkins compat
245
246ifndef CM_BUILDTYPE
247 ifdef RELEASE_TYPE
248 # Starting with "CM_" is optional
249 RELEASE_TYPE := $(shell echo $(RELEASE_TYPE) | sed -e 's|^CM_||g')
250 CM_BUILDTYPE := $(RELEASE_TYPE)
251 endif
Warren Togami2128e2f2012-05-06 19:49:33 -1000252endif
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100253
254# Filter out random types, so it'll reset to UNOFFICIAL
255ifeq ($(filter RELEASE NIGHTLY SNAPSHOT EXPERIMENTAL,$(CM_BUILDTYPE)),)
256 CM_BUILDTYPE :=
Warren Togami2128e2f2012-05-06 19:49:33 -1000257endif
258
Ricardo Cerqueirad8e76662012-06-08 11:08:15 +0100259ifdef CM_BUILDTYPE
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100260 ifneq ($(CM_BUILDTYPE), SNAPSHOT)
261 ifdef CM_EXTRAVERSION
262 # Force build type to EXPERIMENTAL
263 CM_BUILDTYPE := EXPERIMENTAL
264 # Remove leading dash from CM_EXTRAVERSION
265 CM_EXTRAVERSION := $(shell echo $(CM_EXTRAVERSION) | sed 's/-//')
266 # Add leading dash to CM_EXTRAVERSION
267 CM_EXTRAVERSION := -$(CM_EXTRAVERSION)
268 endif
269 else
270 ifndef CM_EXTRAVERSION
271 # Force build type to EXPERIMENTAL, SNAPSHOT mandates a tag
272 CM_BUILDTYPE := EXPERIMENTAL
273 else
274 # Remove leading dash from CM_EXTRAVERSION
275 CM_EXTRAVERSION := $(shell echo $(CM_EXTRAVERSION) | sed 's/-//')
276 # Add leading dash to CM_EXTRAVERSION
277 CM_EXTRAVERSION := -$(CM_EXTRAVERSION)
278 endif
Ricardo Cerqueirad8e76662012-06-08 11:08:15 +0100279 endif
280else
281 # If CM_BUILDTYPE is not defined, set to UNOFFICIAL
Warren Togami2128e2f2012-05-06 19:49:33 -1000282 CM_BUILDTYPE := UNOFFICIAL
Ricardo Cerqueirad8e76662012-06-08 11:08:15 +0100283 CM_EXTRAVERSION :=
Warren Togami2128e2f2012-05-06 19:49:33 -1000284endif
285
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100286ifeq ($(CM_BUILDTYPE), RELEASE)
Warren Togami2128e2f2012-05-06 19:49:33 -1000287 CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(CM_BUILD)
Koushik Duttac6f7a492011-11-28 07:44:23 -0800288else
Chirayu Desaie6e61632012-12-04 19:16:48 +0530289 ifeq ($(PRODUCT_VERSION_MINOR),0)
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100290 CM_VERSION := $(PRODUCT_VERSION_MAJOR)-$(shell date -u +%Y%m%d)-$(CM_BUILDTYPE)$(CM_EXTRAVERSION)-$(CM_BUILD)
Chirayu Desaie6e61632012-12-04 19:16:48 +0530291 else
Ricardo Cerqueira554f3702013-09-24 17:58:56 +0100292 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 +0530293 endif
Koushik Duttac6f7a492011-11-28 07:44:23 -0800294endif
Koushik Duttad69b2922012-02-23 14:07:44 -0800295
296PRODUCT_PROPERTY_OVERRIDES += \
297 ro.cm.version=$(CM_VERSION) \
Warren Togamib1637c82012-03-03 22:37:42 -1000298 ro.modversion=$(CM_VERSION)
Ricardo Cerqueirad5422742012-11-13 10:42:11 +0000299
Ricardo Cerqueira178dbd62013-10-23 20:56:56 +0100300-include vendor/cm-priv/keys/keys.mk
301
Ricardo Cerqueirad5422742012-11-13 10:42:11 +0000302-include $(WORKSPACE)/hudson/image-auto-bits.mk