blob: c34abcd9e96b642d65c47db97a5c982ec2c886ea [file] [log] [blame]
Dark Eyes43450542015-12-11 22:15:28 -05001PRODUCT_BRAND ?= bliss
Ricardo Cerqueira6ed03ff2011-11-28 16:37:47 +00002
Steve Kondikba1ca332012-08-21 02:18:40 -07003ifneq ($(TARGET_SCREEN_WIDTH) $(TARGET_SCREEN_HEIGHT),$(space))
Steve Kondikba1ca332012-08-21 02:18:40 -07004# determine the smaller dimension
5TARGET_BOOTANIMATION_SIZE := $(shell \
6 if [ $(TARGET_SCREEN_WIDTH) -lt $(TARGET_SCREEN_HEIGHT) ]; then \
7 echo $(TARGET_SCREEN_WIDTH); \
8 else \
9 echo $(TARGET_SCREEN_HEIGHT); \
10 fi )
11
12# get a sorted list of the sizes
Dark Eyes43450542015-12-11 22:15:28 -050013bootanimation_sizes := $(subst .zip,, $(shell ls vendor/bliss/prebuilt/common/bootanimation))
Steve Kondikba1ca332012-08-21 02:18:40 -070014bootanimation_sizes := $(shell echo -e $(subst $(space),'\n',$(bootanimation_sizes)) | sort -rn)
15
16# find the appropriate size and set
17define check_and_set_bootanimation
18$(eval TARGET_BOOTANIMATION_NAME := $(shell \
19 if [ -z "$(TARGET_BOOTANIMATION_NAME)" ]; then
20 if [ $(1) -le $(TARGET_BOOTANIMATION_SIZE) ]; then \
21 echo $(1); \
22 exit 0; \
23 fi;
24 fi;
25 echo $(TARGET_BOOTANIMATION_NAME); ))
26endef
27$(foreach size,$(bootanimation_sizes), $(call check_and_set_bootanimation,$(size)))
28
Steven Luo367e6482014-01-30 12:51:04 -080029ifeq ($(TARGET_BOOTANIMATION_HALF_RES),true)
Dark Eyes43450542015-12-11 22:15:28 -050030PRODUCT_BOOTANIMATION := vendor/bliss/prebuilt/common/bootanimation/halfres/$(TARGET_BOOTANIMATION_NAME).zip
Steven Luo367e6482014-01-30 12:51:04 -080031else
Dark Eyes43450542015-12-11 22:15:28 -050032PRODUCT_BOOTANIMATION := vendor/bliss/prebuilt/common/bootanimation/$(TARGET_BOOTANIMATION_NAME).zip
Steve Kondika8945752012-03-14 00:10:33 -070033endif
Steven Luo367e6482014-01-30 12:51:04 -080034endif
Steve Kondika8945752012-03-14 00:10:33 -070035
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000036PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0
37
Steve Kondik5a27f632013-11-06 13:55:11 -080038ifeq ($(PRODUCT_GMS_CLIENTID_BASE),)
39PRODUCT_PROPERTY_OVERRIDES += \
40 ro.com.google.clientidbase=android-google
41else
42PRODUCT_PROPERTY_OVERRIDES += \
43 ro.com.google.clientidbase=$(PRODUCT_GMS_CLIENTID_BASE)
44endif
45
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000046PRODUCT_PROPERTY_OVERRIDES += \
47 keyguard.no_require_sim=true \
48 ro.url.legal=http://www.google.com/intl/%s/mobile/android/basic/phone-legal.html \
49 ro.url.legal.android_privacy=http://www.google.com/intl/%s/mobile/android/basic/privacy.html \
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000050 ro.com.android.wifi-watchlist=GoogleGuest \
51 ro.setupwizard.enterprise_mode=1 \
52 ro.com.android.dateformat=MM-dd-yyyy \
53 ro.com.android.dataroaming=false
54
Ricardo Cerqueiraf3835632013-08-04 13:25:00 +010055PRODUCT_PROPERTY_OVERRIDES += \
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +010056 ro.build.selinux=1
Ricardo Cerqueiraf3835632013-08-04 13:25:00 +010057
Ricardo Cerqueiraed634842015-09-12 00:13:01 +010058ifneq ($(TARGET_BUILD_VARIANT),user)
Steve Kondike4f938c2014-02-04 22:59:01 -080059# Thank you, please drive thru!
60PRODUCT_PROPERTY_OVERRIDES += persist.sys.dun.override=0
Ricardo Cerqueiraed634842015-09-12 00:13:01 +010061endif
Steve Kondike4f938c2014-02-04 22:59:01 -080062
Chirayu Desai88401db2013-03-20 16:17:17 +053063ifneq ($(TARGET_BUILD_VARIANT),eng)
Chirayu Desai59df3632013-02-15 21:16:39 +053064# Enable ADB authentication
65ADDITIONAL_DEFAULT_PROPERTIES += ro.adb.secure=1
Chirayu Desai88401db2013-03-20 16:17:17 +053066endif
Chirayu Desai59df3632013-02-15 21:16:39 +053067
Warren Togamib1637c82012-03-03 22:37:42 -100068# Backup Tool
Steve Kondikbc68cf22013-10-06 22:41:52 -070069ifneq ($(WITH_GMS),true)
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000070PRODUCT_COPY_FILES += \
Dark Eyes43450542015-12-11 22:15:28 -050071 vendor/bliss/prebuilt/common/bin/backuptool.sh:install/bin/backuptool.sh \
72 vendor/bliss/prebuilt/common/bin/backuptool.functions:install/bin/backuptool.functions \
73 vendor/bliss/prebuilt/common/bin/50-bliss.sh:system/addon.d/50-bliss.sh \
74 vendor/bliss/prebuilt/common/bin/blacklist:system/addon.d/blacklist
Steve Kondikbc68cf22013-10-06 22:41:52 -070075endif
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +000076
Ricardo Cerqueiraaff5e542014-05-09 22:24:12 +010077# Signature compatibility validation
78PRODUCT_COPY_FILES += \
Dark Eyes43450542015-12-11 22:15:28 -050079 vendor/bliss/prebuilt/common/bin/otasigcheck.sh:install/bin/otasigcheck.sh
Ricardo Cerqueiraaff5e542014-05-09 22:24:12 +010080
Steve Kondik485527d2011-12-20 12:14:24 -080081# init.d support
82PRODUCT_COPY_FILES += \
Dark Eyes43450542015-12-11 22:15:28 -050083 vendor/bliss/prebuilt/common/etc/init.d/00banner:system/etc/init.d/00banner \
84 vendor/bliss/prebuilt/common/bin/sysinit:system/bin/sysinit
Steve Kondik485527d2011-12-20 12:14:24 -080085
Ricardo Cerqueirafd6bfe72015-03-16 12:22:11 +000086ifneq ($(TARGET_BUILD_VARIANT),user)
James Sullinseb7799c2012-04-05 20:18:18 -050087# userinit support
88PRODUCT_COPY_FILES += \
Dark Eyes43450542015-12-11 22:15:28 -050089 vendor/bliss/prebuilt/common/etc/init.d/90userinit:system/etc/init.d/90userinit
Ricardo Cerqueirafd6bfe72015-03-16 12:22:11 +000090endif
James Sullinseb7799c2012-04-05 20:18:18 -050091
Dark Eyes43450542015-12-11 22:15:28 -050092# AdAway App
Ricardo Cerqueira8f412cb2012-10-18 16:38:25 +010093PRODUCT_COPY_FILES += \
Dark Eyes43450542015-12-11 22:15:28 -050094 vendor/bliss/prebuilt/AdAway/AdAway.apk:system/priv-app/AdAway/AdAway.apk
95
96# KernelAdiutor
97PRODUCT_COPY_FILES += \
98 vendor/bliss/prebuilt/KernelAdiutor/KernelAdiutor.apk:system/app/KernelAdiutor/KernelAdiutor.apk
99
100# Bliss-specific init file
101PRODUCT_COPY_FILES += \
102 vendor/bliss/prebuilt/common/etc/init.local.rc:root/init.bliss.rc
Ricardo Cerqueira8f412cb2012-10-18 16:38:25 +0100103
herriojr5d2c9982015-10-01 11:20:26 -0700104# Copy over added mimetype supported in libcore.net.MimeUtils
105PRODUCT_COPY_FILES += \
Dark Eyes43450542015-12-11 22:15:28 -0500106 vendor/bliss/prebuilt/common/lib/content-types.properties:system/lib/content-types.properties
herriojr5d2c9982015-10-01 11:20:26 -0700107
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000108# Enable SIP+VoIP on all targets
109PRODUCT_COPY_FILES += \
Ricardo Cerqueira3ff9b6f2012-07-11 11:21:50 +0100110 frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000111
sleeplessninja918a7ea2013-01-30 14:45:20 -0600112# Enable wireless Xbox 360 controller support
113PRODUCT_COPY_FILES += \
114 frameworks/base/data/keyboards/Vendor_045e_Product_028e.kl:system/usr/keylayout/Vendor_045e_Product_0719.kl
115
Dark Eyes43450542015-12-11 22:15:28 -0500116# This is Bliss!
Steve Kondike0c12da2012-03-25 17:21:32 -0700117PRODUCT_COPY_FILES += \
Dark Eyes43450542015-12-11 22:15:28 -0500118 vendor/bliss/config/permissions/com.bliss.android.xml:system/etc/permissions/com.bliss.android.xml
Steve Kondike0c12da2012-03-25 17:21:32 -0700119
Michael Bestasc37028d2015-11-03 21:39:04 +0200120# Theme engine
Dark Eyes43450542015-12-11 22:15:28 -0500121include vendor/bliss/config/themes_common.mk
122
123# Bliss Audio Mods
124-include vendor/bliss/config/bliss_audio_mod.mk
Ricardo Cerqueira9f75d842012-05-04 10:15:56 +0100125
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000126# Required CM packages
127PRODUCT_PACKAGES += \
Steve Kondike0c297d2011-12-20 16:16:01 -0800128 Development \
Roman Birg52f92f02015-04-20 18:20:59 -0700129 BluetoothExt \
130 Profiles
Ricardo Cerqueirae1f37382011-11-27 19:56:54 +0000131
132# Optional CM packages
133PRODUCT_PACKAGES += \
Ricardo Cerqueira117984f2015-01-04 01:55:24 +0000134 libemoji \
135 Terminal
Koushik Dutta8387c322011-11-26 17:31:19 -0800136
Steve Kondikdac37852015-12-01 13:31:45 -0800137# Include librsjni explicitly to workaround GMS issue
138PRODUCT_PACKAGES += \
139 librsjni
140
Steve Kondik04a49412011-12-14 14:02:19 -0800141# Custom CM packages
142PRODUCT_PACKAGES += \
Ricardo Cerqueira50dda4c2013-11-05 15:26:20 +0000143 Launcher3 \
Michael Bestas8deec442013-12-13 04:54:49 +0200144 Trebuchet \
DvTonderf0074032012-12-30 13:37:40 -0500145 CMFileManager \
Steve Kondikfd3b0e52014-12-09 13:01:09 -0800146 Eleven \
Giulio Cerverab6f18ff2013-08-20 12:53:56 +0200147 LockClock \
Dark Eyes43450542015-12-11 22:15:28 -0500148 CMSettingsProvider
Steve Kondik04a49412011-12-14 14:02:19 -0800149
Adnan Begovicb53c5032015-04-27 16:29:56 -0700150# CM Platform Library
151PRODUCT_PACKAGES += \
Adnan Begovicaaac1322015-05-05 18:29:29 -0700152 org.cyanogenmod.platform-res \
Adnan Begovicb53c5032015-04-27 16:29:56 -0700153 org.cyanogenmod.platform \
154 org.cyanogenmod.platform.xml
Adnan Begovicb53c5032015-04-27 16:29:56 -0700155
Ricardo Cerqueira17809562013-08-08 00:49:44 +0100156# CM Hardware Abstraction Framework
157PRODUCT_PACKAGES += \
158 org.cyanogenmod.hardware \
159 org.cyanogenmod.hardware.xml
160
Dark Eyes43450542015-12-11 22:15:28 -0500161# Other packages
162PRODUCT_PACKAGES += \
163 BlissOTA \
blueyes27baf67912015-12-23 21:48:05 -0800164 OmniSwitch
Dark Eyes15956a02015-12-26 23:23:20 -0500165
Dark Eyes43450542015-12-11 22:15:28 -0500166# Extra tools in Bliss
Sebastian Schmidt7d5de0c2012-04-15 11:39:25 +0200167PRODUCT_PACKAGES += \
Tanguy Pruvotac602b42013-11-24 13:05:59 +0100168 libsepol \
Steve Kondik08980282012-07-05 01:20:47 -0700169 mke2fs \
Steve Kondik1949eb52012-09-20 17:09:07 -0700170 tune2fs \
Steve Kondik1949eb52012-09-20 17:09:07 -0700171 nano \
172 htop \
Steve Kondik49852a72015-11-10 15:05:18 +0100173 mkfs.ntfs \
174 fsck.ntfs \
175 mount.ntfs \
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100176 gdbserver \
177 micro_bench \
178 oprofiled \
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100179 sqlite3 \
Steve Kondik243e70b2015-11-14 21:04:48 +0100180 strace \
181 pigz
Sebastian Schmidt7d5de0c2012-04-15 11:39:25 +0200182
Scott Mertz2911a0e2015-11-09 11:35:41 -0800183WITH_EXFAT ?= true
184ifeq ($(WITH_EXFAT),true)
185TARGET_USES_EXFAT := true
186PRODUCT_PACKAGES += \
187 mount.exfat \
188 fsck.exfat \
189 mkfs.exfat
190endif
191
Chirayu Desai8636d672012-07-19 16:04:25 +0530192# Openssh
193PRODUCT_PACKAGES += \
194 scp \
195 sftp \
196 ssh \
197 sshd \
198 sshd_config \
199 ssh-keygen \
Chirayu Desai4bacf672012-08-19 17:30:04 +0530200 start-ssh
201
202# rsync
203PRODUCT_PACKAGES += \
204 rsync
Chirayu Desai8636d672012-07-19 16:04:25 +0530205
Michael Bestas7d5d16d2014-06-10 20:06:48 +0300206# Stagefright FFMPEG plugin
207PRODUCT_PACKAGES += \
Steve Kondik7c968692015-07-08 09:53:12 -0700208 libffmpeg_extractor \
209 libffmpeg_omx \
Steve Kondik59702502015-06-18 02:22:35 -0700210 media_codecs_ffmpeg.xml
Michael Bestas7d5d16d2014-06-10 20:06:48 +0300211
Steve Kondik7c968692015-07-08 09:53:12 -0700212PRODUCT_PROPERTY_OVERRIDES += \
213 media.sf.omx-plugin=libffmpeg_omx.so \
214 media.sf.extractor-plugin=libffmpeg_extractor.so
215
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100216# These packages are excluded from user builds
217ifneq ($(TARGET_BUILD_VARIANT),user)
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100218PRODUCT_PACKAGES += \
Steve Kondik275701b2013-11-06 12:41:34 -0800219 procmem \
220 procrank \
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100221 su
repo Shareef Ali4bcfc312014-12-29 17:52:04 -0600222endif
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100223
Ricardo Cerqueiraa21887e2013-09-25 17:13:25 +0100224PRODUCT_PROPERTY_OVERRIDES += \
225 persist.sys.root_access=0
226
Dark Eyes43450542015-12-11 22:15:28 -0500227PRODUCT_PACKAGE_OVERLAYS += vendor/bliss/overlay/common
Ricardo Cerqueira46161372014-01-09 10:25:31 +0000228
Brint E. Kriebele0e8c272014-05-21 23:37:52 -0700229# by default, do not update the recovery with system updates
230PRODUCT_PROPERTY_OVERRIDES += persist.sys.recovery_update=false
231
Dark Eyes43450542015-12-11 22:15:28 -0500232# BLISS Versioning System
233-include vendor/bliss/config/versions.mk
234
235PRODUCT_PROPERTY_OVERRIDES += \
236 BUILD_DISPLAY_ID=$(BUILD_ID) \
237 ro.bliss.version=$(BLISS_VERSION)
238
239# Team Bliss OTA Updater
240ifeq ($(BLISS_DONATE),)
241 BLISS_DONATE =: http://goo.gl/31q5YL
242endif
243BLISS_OTA_BUILDDIR := Official
244ifeq ($(BLISS_BUILDTYPE),NIGHTLY)
245 BLISS_OTA_BUILDDIR := Nightlies
246endif
247BLISS_BASE_URL := http://downloads.blissroms.com/Bliss
248ifeq ($(BLISS_DEVICE_URL),)
249 BLISS_DEVICE_URL := $(BLISS_BASE_URL)/$(BLISS_OTA_BUILDDIR)/$(TARGET_DEVICE)
250endif
251BLISS_OTA_VERSION := $(shell date +%Y%m%d%H)
252BLISS_ROM_NAME := Bliss
253
254PRODUCT_PROPERTY_OVERRIDES += \
255 ro.ota.systemname=$(BLISS_ROM_NAME) \
256 ro.ota.version=$(BLISS_OTA_VERSION) \
257 ro.ota.device=$(TARGET_DEVICE) \
258 ro.ota.manifest=$(BLISS_DEVICE_URL)/ota$(BLISS_OTA_XMLVER).xml
259
260export BLISS_OTA_ROM=$(BLISS_ROM_NAME)
261export BLISS_OTA_VERNAME=$(BLISS_VERSION)
262export BLISS_OTA_VER=$(BLISS_OTA_VERSION)
263export BLISS_OTA_URL=$(BLISS_DEVICE_URL)/$(BLISS_VERSION).zip
264
Dark Eyes996981b2015-12-19 14:38:01 -0500265ifeq ($(OTA_64),true)
266TARGET_ARCH_ABI := arm64-v8a
267TARGET_LIB_DIR := lib64
268else
269TARGET_ARCH_ABI := armeabi-v7a
270TARGET_LIB_DIR := lib
271endif
272
273PRODUCT_COPY_FILES += \
274 vendor/bliss/prebuilt/$(TARGET_LIB_DIR)/$(TARGET_ARCH_ABI)/libbypass.so:system/$(TARGET_LIB_DIR)/libbypass.so
275
Akhil Narang1fd578a2015-11-23 00:23:38 +0530276# SuperSU
277PRODUCT_COPY_FILES += \
278 vendor/bliss/prebuilt/common/UPDATE-SuperSU.zip:system/addon.d/UPDATE-SuperSU.zip \
279 vendor/bliss/prebuilt/common/etc/init.d/99SuperSUDaemon:system/etc/init.d/99SuperSUDaemon
280
Adnan Begovicb2bd3212015-06-04 19:23:35 -0700281ifndef CM_PLATFORM_SDK_VERSION
282 # This is the canonical definition of the SDK version, which defines
283 # the set of APIs and functionality available in the platform. It
284 # is a single integer that increases monotonically as updates to
285 # the SDK are released. It should only be incremented when the APIs for
286 # the new release are frozen (so that developers don't write apps against
287 # intermediate builds).
Michael Bestaseb83dba2015-10-07 18:38:03 +0300288 CM_PLATFORM_SDK_VERSION := 4
Adnan Begovicb2bd3212015-06-04 19:23:35 -0700289endif
290
Adnan Begovic4534c7a2015-08-11 15:51:54 -0700291ifndef CM_PLATFORM_REV
292 # For internal SDK revisions that are hotfixed/patched
293 # Reset after each CM_PLATFORM_SDK_VERSION release
294 # If you are doing a release and this is NOT 0, you are almost certainly doing it wrong
295 CM_PLATFORM_REV := 0
296endif
297
Adnan Begovicb2bd3212015-06-04 19:23:35 -0700298# CyanogenMod Platform SDK Version
299PRODUCT_PROPERTY_OVERRIDES += \
300 ro.cm.build.version.plat.sdk=$(CM_PLATFORM_SDK_VERSION)
301
Adnan Begovic4534c7a2015-08-11 15:51:54 -0700302# CyanogenMod Platform Internal
303PRODUCT_PROPERTY_OVERRIDES += \
304 ro.cm.build.version.plat.rev=$(CM_PLATFORM_REV)
305
Brint E. Kriebela1e49122014-01-31 11:59:56 -0800306-include $(WORKSPACE)/build_env/image-auto-bits.mk
Koushik Dutta41fd0aa2013-12-07 22:04:17 -0800307
Chris Sarbora39b9aa82014-12-17 14:41:28 -0800308$(call prepend-product-if-exists, vendor/extra/product.mk)