blob: 96f0ceb8c4d11a627ebbeed87f4dba4ea2b70965 [file] [log] [blame]
Ricardo Cerqueira6ed03ff2011-11-28 16:37:47 +00001PRODUCT_BRAND ?= cyanogenmod
2
Ricardo Cerqueira5ab6b932013-07-02 10:42:12 +01003-include vendor/cm-priv/keys.mk
Koushik Dutta82d0fda2013-02-28 10:33:25 -08004SUPERUSER_EMBEDDED := true
Koushik Dutta9d15c7a2013-03-04 00:37:02 -08005SUPERUSER_PACKAGE_PREFIX := com.android.settings.cyanogenmod.superuser
Koushik Dutta82d0fda2013-02-28 10:33:25 -08006
Steve Kondikba1ca332012-08-21 02:18:40 -07007# To deal with CM9 specifications
8# TODO: remove once all devices have been switched
Steve Kondika8945752012-03-14 00:10:33 -07009ifneq ($(TARGET_BOOTANIMATION_NAME),)
Steve Kondikba1ca332012-08-21 02:18:40 -070010TARGET_SCREEN_DIMENSIONS := $(subst -, $(space), $(subst x, $(space), $(TARGET_BOOTANIMATION_NAME)))
11ifeq ($(TARGET_SCREEN_WIDTH),)
12TARGET_SCREEN_WIDTH := $(word 2, $(TARGET_SCREEN_DIMENSIONS))
13endif
14ifeq ($(TARGET_SCREEN_HEIGHT),)
15TARGET_SCREEN_HEIGHT := $(word 3, $(TARGET_SCREEN_DIMENSIONS))
16endif
17endif
18
19ifneq ($(TARGET_SCREEN_WIDTH) $(TARGET_SCREEN_HEIGHT),$(space))
20
21# clear TARGET_BOOTANIMATION_NAME in case it was set for CM9 purposes
22TARGET_BOOTANIMATION_NAME :=
23
24# determine the smaller dimension
25TARGET_BOOTANIMATION_SIZE := $(shell \
26 if [ $(TARGET_SCREEN_WIDTH) -lt $(TARGET_SCREEN_HEIGHT) ]; then \
27 echo $(TARGET_SCREEN_WIDTH); \
28 else \
29 echo $(TARGET_SCREEN_HEIGHT); \
30 fi )
31
32# get a sorted list of the sizes
33bootanimation_sizes := $(subst .zip,, $(shell ls vendor/cm/prebuilt/common/bootanimation))
34bootanimation_sizes := $(shell echo -e $(subst $(space),'\n',$(bootanimation_sizes)) | sort -rn)
35
36# find the appropriate size and set
37define check_and_set_bootanimation
38$(eval TARGET_BOOTANIMATION_NAME := $(shell \
39 if [ -z "$(TARGET_BOOTANIMATION_NAME)" ]; then
40 if [ $(1) -le $(TARGET_BOOTANIMATION_SIZE) ]; then \
41 echo $(1); \
42 exit 0; \
43 fi;
44 fi;
45 echo $(TARGET_BOOTANIMATION_NAME); ))
46endef
47$(foreach size,$(bootanimation_sizes), $(call check_and_set_bootanimation,$(size)))
48
49PRODUCT_COPY_FILES += \
50 vendor/cm/prebuilt/common/bootanimation/$(TARGET_BOOTANIMATION_NAME).zip:system/media/bootanimation.zip
Steve Kondika8945752012-03-14 00:10:33 -070051endif
52
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000053ifdef CM_NIGHTLY
54PRODUCT_PROPERTY_OVERRIDES += \
55 ro.rommanager.developerid=cyanogenmodnightly
56else
57PRODUCT_PROPERTY_OVERRIDES += \
58 ro.rommanager.developerid=cyanogenmod
59endif
60
61PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0
62
63PRODUCT_PROPERTY_OVERRIDES += \
64 keyguard.no_require_sim=true \
65 ro.url.legal=http://www.google.com/intl/%s/mobile/android/basic/phone-legal.html \
66 ro.url.legal.android_privacy=http://www.google.com/intl/%s/mobile/android/basic/privacy.html \
67 ro.com.google.clientidbase=android-google \
68 ro.com.android.wifi-watchlist=GoogleGuest \
69 ro.setupwizard.enterprise_mode=1 \
70 ro.com.android.dateformat=MM-dd-yyyy \
71 ro.com.android.dataroaming=false
72
Ricardo Cerqueiraf3835632013-08-04 13:25:00 +010073PRODUCT_PROPERTY_OVERRIDES += \
Ricardo Cerqueira127ac8a2013-08-15 00:15:07 +010074 ro.build.selinux=1 \
75 persist.sys.root_access=1
Ricardo Cerqueiraf3835632013-08-04 13:25:00 +010076
Chirayu Desai88401db2013-03-20 16:17:17 +053077ifneq ($(TARGET_BUILD_VARIANT),eng)
Chirayu Desai59df3632013-02-15 21:16:39 +053078# Enable ADB authentication
79ADDITIONAL_DEFAULT_PROPERTIES += ro.adb.secure=1
Chirayu Desai88401db2013-03-20 16:17:17 +053080endif
Chirayu Desai59df3632013-02-15 21:16:39 +053081
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000082# Copy over the changelog to the device
83PRODUCT_COPY_FILES += \
84 vendor/cm/CHANGELOG.mkdn:system/etc/CHANGELOG-CM.txt
85
Warren Togamib1637c82012-03-03 22:37:42 -100086# Backup Tool
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000087PRODUCT_COPY_FILES += \
Warren Togamib1637c82012-03-03 22:37:42 -100088 vendor/cm/prebuilt/common/bin/backuptool.sh:system/bin/backuptool.sh \
89 vendor/cm/prebuilt/common/bin/backuptool.functions:system/bin/backuptool.functions \
Ricardo Cerqueira129989b2012-12-19 01:11:21 +000090 vendor/cm/prebuilt/common/bin/50-cm.sh:system/addon.d/50-cm.sh \
91 vendor/cm/prebuilt/common/bin/blacklist:system/addon.d/blacklist
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000092
Steve Kondik485527d2011-12-20 12:14:24 -080093# init.d support
94PRODUCT_COPY_FILES += \
95 vendor/cm/prebuilt/common/etc/init.d/00banner:system/etc/init.d/00banner \
96 vendor/cm/prebuilt/common/bin/sysinit:system/bin/sysinit
97
James Sullinseb7799c2012-04-05 20:18:18 -050098# userinit support
99PRODUCT_COPY_FILES += \
100 vendor/cm/prebuilt/common/etc/init.d/90userinit:system/etc/init.d/90userinit
101
Ricardo Cerqueirad2d1a7f2013-07-17 16:45:20 +0100102# SELinux filesystem labels
103PRODUCT_COPY_FILES += \
104 vendor/cm/prebuilt/common/etc/init.d/50selinuxrelabel:system/etc/init.d/50selinuxrelabel
105
Ricardo Cerqueira8f412cb2012-10-18 16:38:25 +0100106# CM-specific init file
107PRODUCT_COPY_FILES += \
108 vendor/cm/prebuilt/common/etc/init.local.rc:root/init.cm.rc
109
Steve Kondik485527d2011-12-20 12:14:24 -0800110# Compcache/Zram support
111PRODUCT_COPY_FILES += \
Steve Kondik485527d2011-12-20 12:14:24 -0800112 vendor/cm/prebuilt/common/bin/compcache:system/bin/compcache \
113 vendor/cm/prebuilt/common/bin/handle_compcache:system/bin/handle_compcache
114
Ricardo Cerqueiraea14a882013-08-27 22:15:26 +0100115# block stock OTAs
116PRODUCT_COPY_FILES += \
117 vendor/cm/prebuilt/common/bin/otablock:system/bin/otablock
118
jt1134e59a4162013-01-11 22:24:47 -0600119# Terminal Emulator
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000120PRODUCT_COPY_FILES += \
Robert Burns7ce9d9e2013-01-02 10:06:52 -0500121 vendor/cm/proprietary/Term.apk:system/app/Term.apk \
Steve Kondikabfc0792012-09-20 10:26:25 -0700122 vendor/cm/proprietary/lib/armeabi/libjackpal-androidterm4.so:system/lib/libjackpal-androidterm4.so
fitsnugly407b3992012-01-14 18:50:25 -0500123
Adam Fardendb2438b2012-03-07 14:34:38 +0100124# Bring in camera effects
fitsnugly407b3992012-01-14 18:50:25 -0500125PRODUCT_COPY_FILES += \
fitsnuglyc1c6ce22012-01-12 01:10:39 -0500126 vendor/cm/prebuilt/common/media/LMprec_508.emd:system/media/LMprec_508.emd \
127 vendor/cm/prebuilt/common/media/PFFprec_600.emd:system/media/PFFprec_600.emd
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000128
129# Enable SIP+VoIP on all targets
130PRODUCT_COPY_FILES += \
Ricardo Cerqueira3ff9b6f2012-07-11 11:21:50 +0100131 frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000132
sleeplessninja918a7ea2013-01-30 14:45:20 -0600133# Enable wireless Xbox 360 controller support
134PRODUCT_COPY_FILES += \
135 frameworks/base/data/keyboards/Vendor_045e_Product_028e.kl:system/usr/keylayout/Vendor_045e_Product_0719.kl
136
Steve Kondike0c12da2012-03-25 17:21:32 -0700137# This is CM!
138PRODUCT_COPY_FILES += \
139 vendor/cm/config/permissions/com.cyanogenmod.android.xml:system/etc/permissions/com.cyanogenmod.android.xml
140
Mike Kasick511d6092012-01-26 17:54:31 -0500141# Don't export PS1 in /system/etc/mkshrc.
142PRODUCT_COPY_FILES += \
143 vendor/cm/prebuilt/common/etc/mkshrc:system/etc/mkshrc
144
Ricardo Cerqueira9f75d842012-05-04 10:15:56 +0100145# T-Mobile theme engine
146include vendor/cm/config/themes_common.mk
147
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000148# Required CM packages
149PRODUCT_PACKAGES += \
Chirayu Desaif6183162013-07-29 20:59:11 +0530150 Focal \
Steve Kondike0c297d2011-12-20 16:16:01 -0800151 Development \
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000152 LatinIME \
Koushik Dutta05dc42e2011-11-25 18:02:09 -0800153 Superuser \
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000154 su
155
156# Optional CM packages
157PRODUCT_PACKAGES += \
Koushik Dutta8475d722013-07-21 09:34:19 -0700158 VoicePlus \
Koushik Dutta74d3bad2011-11-27 13:00:30 -0800159 VoiceDialer \
Warren Togami5960a702012-02-22 09:22:42 -1000160 SoundRecorder \
Andreas Schneidera69dc022012-08-28 12:21:46 +0200161 Basic
Koushik Dutta8387c322011-11-26 17:31:19 -0800162
Steve Kondik04a49412011-12-14 14:02:19 -0800163# Custom CM packages
164PRODUCT_PACKAGES += \
nebkat0acffd52011-12-22 16:47:22 +0000165 Trebuchet \
Steve Kondik04a49412011-12-14 14:02:19 -0800166 DSPManager \
Steve Kondika25e4e02011-12-14 22:27:07 -0800167 libcyanogen-dsp \
Steve Kondikfcc16102012-05-05 16:23:24 -0700168 audio_effects.conf \
Ricardo Cerqueira3dc43542012-05-25 04:31:26 +0400169 CMWallpapers \
Ricardo Cerqueira2526fef2012-09-29 17:17:45 +0100170 Apollo \
Steve Kondik7bd61212012-10-31 22:40:46 -0700171 CMUpdater \
DvTonderf0074032012-12-30 13:37:40 -0500172 CMFileManager \
Giulio Cerverab6f18ff2013-08-20 12:53:56 +0200173 LockClock \
174 CMAccount
Steve Kondik04a49412011-12-14 14:02:19 -0800175
Ricardo Cerqueira17809562013-08-08 00:49:44 +0100176# CM Hardware Abstraction Framework
177PRODUCT_PACKAGES += \
178 org.cyanogenmod.hardware \
179 org.cyanogenmod.hardware.xml
180
Chirayu Desai7a7185b2013-03-28 11:44:05 +0530181PRODUCT_PACKAGES += \
182 CellBroadcastReceiver
183
Sebastian Schmidt7d5de0c2012-04-15 11:39:25 +0200184# Extra tools in CM
185PRODUCT_PACKAGES += \
Steve Kondik08980282012-07-05 01:20:47 -0700186 openvpn \
187 e2fsck \
188 mke2fs \
Steve Kondik1949eb52012-09-20 17:09:07 -0700189 tune2fs \
190 bash \
191 vim \
192 nano \
193 htop \
194 powertop \
Steve Kondik2978e202013-07-06 04:07:56 -0700195 lsof \
196 mount.exfat \
197 fsck.exfat \
198 mkfs.exfat \
199 ntfsfix \
200 ntfs-3g
Sebastian Schmidt7d5de0c2012-04-15 11:39:25 +0200201
Chirayu Desai8636d672012-07-19 16:04:25 +0530202# Openssh
203PRODUCT_PACKAGES += \
204 scp \
205 sftp \
206 ssh \
207 sshd \
208 sshd_config \
209 ssh-keygen \
Chirayu Desai4bacf672012-08-19 17:30:04 +0530210 start-ssh
211
212# rsync
213PRODUCT_PACKAGES += \
214 rsync
Chirayu Desai8636d672012-07-19 16:04:25 +0530215
Koushik Dutta45e65982013-08-12 15:41:14 -0700216# easy way to extend to add more packages
217-include vendor/extra/product.mk
218
Koushik Duttac6f7a492011-11-28 07:44:23 -0800219PRODUCT_PACKAGE_OVERLAYS += vendor/cm/overlay/dictionaries
Steve Kondik254db262011-12-20 15:02:07 -0800220PRODUCT_PACKAGE_OVERLAYS += vendor/cm/overlay/common
Koushik Duttac6f7a492011-11-28 07:44:23 -0800221
Ricardo Cerqueiraed3e91e2012-07-11 16:05:12 +0100222PRODUCT_VERSION_MAJOR = 10
Ricardo Cerqueira154d0292013-07-25 01:12:16 +0100223PRODUCT_VERSION_MINOR = 2
224PRODUCT_VERSION_MAINTENANCE = 0-RC0
Koushik Duttac6f7a492011-11-28 07:44:23 -0800225
Warren Togami2128e2f2012-05-06 19:49:33 -1000226# Set CM_BUILDTYPE
Koushik Duttac6f7a492011-11-28 07:44:23 -0800227ifdef CM_NIGHTLY
Warren Togami2128e2f2012-05-06 19:49:33 -1000228 CM_BUILDTYPE := NIGHTLY
229endif
230ifdef CM_EXPERIMENTAL
231 CM_BUILDTYPE := EXPERIMENTAL
232endif
233ifdef CM_RELEASE
234 CM_BUILDTYPE := RELEASE
235endif
236
Ricardo Cerqueirad8e76662012-06-08 11:08:15 +0100237ifdef CM_BUILDTYPE
238 ifdef CM_EXTRAVERSION
239 # Force build type to EXPERIMENTAL
240 CM_BUILDTYPE := EXPERIMENTAL
Chirayu Desai19425dd2013-06-25 19:48:55 +0530241 # Remove leading dash from CM_EXTRAVERSION
242 CM_EXTRAVERSION := $(shell echo $(CM_EXTRAVERSION) | sed 's/-//')
Ricardo Cerqueirad8e76662012-06-08 11:08:15 +0100243 # Add leading dash to CM_EXTRAVERSION
244 CM_EXTRAVERSION := -$(CM_EXTRAVERSION)
245 endif
246else
247 # If CM_BUILDTYPE is not defined, set to UNOFFICIAL
Warren Togami2128e2f2012-05-06 19:49:33 -1000248 CM_BUILDTYPE := UNOFFICIAL
Ricardo Cerqueirad8e76662012-06-08 11:08:15 +0100249 CM_EXTRAVERSION :=
Warren Togami2128e2f2012-05-06 19:49:33 -1000250endif
251
252ifdef CM_RELEASE
253 CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR).$(PRODUCT_VERSION_MAINTENANCE)$(PRODUCT_VERSION_DEVICE_SPECIFIC)-$(CM_BUILD)
Koushik Duttac6f7a492011-11-28 07:44:23 -0800254else
Chirayu Desaie6e61632012-12-04 19:16:48 +0530255 ifeq ($(PRODUCT_VERSION_MINOR),0)
256 CM_VERSION := $(PRODUCT_VERSION_MAJOR)-$(shell date -u +%Y%m%d)-$(CM_BUILDTYPE)-$(CM_BUILD)$(CM_EXTRAVERSION)
257 else
258 CM_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(shell date -u +%Y%m%d)-$(CM_BUILDTYPE)-$(CM_BUILD)$(CM_EXTRAVERSION)
259 endif
Koushik Duttac6f7a492011-11-28 07:44:23 -0800260endif
Koushik Duttad69b2922012-02-23 14:07:44 -0800261
262PRODUCT_PROPERTY_OVERRIDES += \
263 ro.cm.version=$(CM_VERSION) \
Warren Togamib1637c82012-03-03 22:37:42 -1000264 ro.modversion=$(CM_VERSION)
Ricardo Cerqueirad5422742012-11-13 10:42:11 +0000265
William Roberts9642d1d2013-08-15 13:08:41 -0700266-include vendor/cm/sepolicy/sepolicy.mk
Ricardo Cerqueirad5422742012-11-13 10:42:11 +0000267-include $(WORKSPACE)/hudson/image-auto-bits.mk