diff --git a/common.mk b/common.mk
index d67d5935..9ef9a1a0 100644
--- a/common.mk
+++ b/common.mk
@@ -35,6 +35,7 @@ ALSA_HARDWARE := alsa.msm8960
ALSA_HARDWARE += alsa.msm8974
ALSA_HARDWARE += alsa.msm8226
ALSA_HARDWARE += alsa.msm8610
+ALSA_HARDWARE += alsa.apq8084
ALSA_UCM := snd_soc_msm
ALSA_UCM += snd_soc_msm_2x
@@ -65,6 +66,7 @@ ALSA_UCM += snd_soc_msm_samarium_Tapan
ANGLE := libangle
AUDIO_HARDWARE := audio.primary.mpq8064
+AUDIO_HARDWARE += audio.primary.apq8084
AUDIO_HARDWARE += audio.primary.msm8960
AUDIO_HARDWARE += audio.primary.msm8974
AUDIO_HARDWARE += audio.primary.msm8226
@@ -79,6 +81,7 @@ AUDIO_HARDWARE += audio.a2dp.default
AUDIO_HARDWARE += audio.usb.default
#
AUDIO_POLICY := audio_policy.mpq8064
+AUDIO_POLICY += audio_policy.apq8084
AUDIO_POLICY += audio_policy.msm8960
AUDIO_POLICY += audio_policy.msm8974
AUDIO_POLICY += audio_policy.msm8226
@@ -130,6 +133,10 @@ CURL += curl
DASH := libdashplayer
DASH += qcmediaplayer
+#DATA_OS
+DATA_OS := librmnetctl
+DATA_OS += rmnetcli
+
#E2FSPROGS
E2FSPROGS := e2fsck
@@ -203,6 +210,7 @@ INIT += ueventd.qcom.rc
INIT += init.ath3k.bt.sh
INIT += init.qcom.audio.sh
INIT += init.qcom.ssr.sh
+INIT += init.mdm.sh
#IPROUTE2
IPROUTE2 := ip
@@ -556,6 +564,7 @@ PRODUCT_PACKAGES += $(CONNECTIVITY)
PRODUCT_PACKAGES += $(CHARGER)
PRODUCT_PACKAGES += $(CURL)
PRODUCT_PACKAGES += $(DASH)
+PRODUCT_PACKAGES += $(DATA_OS)
PRODUCT_PACKAGES += $(E2FSPROGS)
PRODUCT_PACKAGES += $(EBTABLES)
PRODUCT_PACKAGES += $(FASTPOWERON)
@@ -644,6 +653,7 @@ PRODUCT_COPY_FILES := \
frameworks/native/data/etc/android.hardware.wifi.direct.xml:system/etc/permissions/android.hardware.wifi.direct.xml \
frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml \
frameworks/native/data/etc/handheld_core_hardware.xml:system/etc/permissions/handheld_core_hardware.xml \
+ frameworks/native/data/etc/android.hardware.sensor.proximity.xml:system/etc/permissions/android.hardware.sensor.proximity.xml \
frameworks/native/data/etc/android.hardware.sensor.light.xml:system/etc/permissions/android.hardware.sensor.light.xml \
frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:system/etc/permissions/android.hardware.sensor.gyroscope.xml \
frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml \
@@ -651,12 +661,6 @@ PRODUCT_COPY_FILES := \
packages/wallpapers/LivePicker/android.software.live_wallpaper.xml:system/etc/permissions/android.software.live_wallpaper.xml \
frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml \
-# copy proximity sensor files
-ifneq ($(TARGET_USES_QCOM_SENSOR_PROXIMITY),false)
-PRODUCT_COPY_FILES += \
- frameworks/native/data/etc/android.hardware.sensor.proximity.xml:system/etc/permissions/android.hardware.sensor.proximity.xml
-endif
-
# Bluetooth configuration files
PRODUCT_COPY_FILES += \
system/bluetooth/data/audio.conf:system/etc/bluetooth/audio.conf \
@@ -701,7 +705,8 @@ PRODUCT_LOCALES := en_US es_US de_DE zh_CN
PRODUCT_LOCALES += hdpi mdpi
PRODUCT_PROPERTY_OVERRIDES += \
- ro.vendor.extension_library=/vendor/lib/libqc-opt.so
+ ro.vendor.extension_library=/vendor/lib/libqc-opt.so \
+ persist.radio.apm_sim_not_pwdn=1
PRODUCT_PRIVATE_KEY := device/qcom/common/qcom.key
diff --git a/generate_extra_images.mk b/generate_extra_images.mk
index 3327f487..cb84efbd 100644
--- a/generate_extra_images.mk
+++ b/generate_extra_images.mk
@@ -7,6 +7,7 @@
# and gets parsed before build/core/Makefile, which has these
# variables defined. build/core/Makefile will overwrite these
# variables again.
+ifneq ($(strip $(TARGET_NO_KERNEL)),true)
INSTALLED_BOOTIMAGE_TARGET := $(PRODUCT_OUT)/boot.img
INSTALLED_RAMDISK_TARGET := $(PRODUCT_OUT)/ramdisk.img
INSTALLED_SYSTEMIMAGE := $(PRODUCT_OUT)/system.img
@@ -14,6 +15,7 @@ INSTALLED_USERDATAIMAGE_TARGET := $(PRODUCT_OUT)/userdata.img
INSTALLED_RECOVERYIMAGE_TARGET := $(PRODUCT_OUT)/recovery.img
recovery_ramdisk := $(PRODUCT_OUT)/ramdisk-recovery.img
INSTALLED_USBIMAGE_TARGET := $(PRODUCT_OUT)/usbdisk.img
+endif
#----------------------------------------------------------------------
# Generate secure boot image
@@ -51,6 +53,8 @@ endif
#----------------------------------------------------------------------
# Generate persist image (persist.img)
#----------------------------------------------------------------------
+ifneq ($(strip $(TARGET_NO_KERNEL)),true)
+
TARGET_OUT_PERSIST := $(PRODUCT_OUT)/persist
INTERNAL_PERSISTIMAGE_FILES := \
@@ -72,6 +76,7 @@ $(INSTALLED_PERSISTIMAGE_TARGET): $(MKEXTUSERIMG) $(MAKE_EXT4FS) $(INTERNAL_PERS
ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_PERSISTIMAGE_TARGET)
ALL_MODULES.$(LOCAL_MODULE).INSTALLED += $(INSTALLED_PERSISTIMAGE_TARGET)
+endif
#----------------------------------------------------------------------
# Generate device tree image (dt.img)
@@ -121,9 +126,9 @@ endif
#----------------------------------------------------------------------
# Generate CDROM image
#----------------------------------------------------------------------
+CDROM_RES_FILE = $(TARGET_DEVICE_DIR)/cdrom_res
ifneq ($(wildcard $(CDROM_RES_FILE)),)
CDROM_ISO_TARGET := $(PRODUCT_OUT)/system/etc/cdrom_install.iso
-CDROM_RES_FILE = $(TARGET_DEVICE_DIR)/cdrom_res
define build-cdrom-target
$(hide) mkisofs -o $(CDROM_ISO_TARGET) $(CDROM_RES_FILE)
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 6e594985..1479a798 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -176,4 +176,6 @@
- 255
+
+ true
diff --git a/releasetools.py b/releasetools.py
index a49c10ed..4c7373c2 100755
--- a/releasetools.py
+++ b/releasetools.py
@@ -139,12 +139,18 @@ def OTA_VerifyEnd(info, api_version, target_zip, source_zip=None):
if src_files is not None:
sf = src_files.get(fn, None)
- full = sf is None or fn.endswith('.enc') or tf.sha1 == sf.sha1
+ full = sf is None or fn.endswith('.enc')
if not full:
+ # no difference - skip this file
+ if tf.sha1 == sf.sha1:
+ continue
d = common.Difference(tf, sf)
_, _, d = d.ComputePatch()
+ # no difference - skip this file
+ if d is None:
+ continue
# if patch is almost as big as the file - don't bother patching
- full = d is None or len(d) > tf.size * common.OPTIONS.patch_threshold
+ full = len(d) > tf.size * common.OPTIONS.patch_threshold
if not full:
f = "patch/firmware-update/" + fn + ".p"
common.ZipWriteStr(info.output_zip, f, d)
diff --git a/rootdir/Android.mk b/rootdir/Android.mk
index b37c2cfc..5f924c12 100644
--- a/rootdir/Android.mk
+++ b/rootdir/Android.mk
@@ -182,3 +182,11 @@ LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := etc/init.qcom.ssr.sh
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.mdm.sh
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := etc/init.mdm.sh
+LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
+include $(BUILD_PREBUILT)
diff --git a/rootdir/etc/init.mdm.sh b/rootdir/etc/init.mdm.sh
new file mode 100644
index 00000000..451e5880
--- /dev/null
+++ b/rootdir/etc/init.mdm.sh
@@ -0,0 +1,33 @@
+#!/system/bin/sh
+# Copyright (c) 2013, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+baseband=`getprop ro.baseband`
+if [ "$baseband" = "mdm" ]; then
+ start mdm_helper
+fi
+
diff --git a/rootdir/etc/init.qcom.early_boot.sh b/rootdir/etc/init.qcom.early_boot.sh
index d2c4716f..7df3ddbb 100755
--- a/rootdir/etc/init.qcom.early_boot.sh
+++ b/rootdir/etc/init.qcom.early_boot.sh
@@ -140,13 +140,26 @@ case "$1" in
esac
;;
- "msm8610" | "apq8084")
+ "msm8610")
case "$soc_hwplatform" in
*)
setprop ro.sf.lcd_density 240
;;
esac
;;
+ "apq8084")
+ case "$soc_hwplatform" in
+ "Liquid")
+ setprop ro.sf.lcd_density 293
+ # Liquid do not have hardware navigation keys, so enable
+ # Android sw navigation bar
+ setprop ro.hw.nav_keys 0
+ ;;
+ *)
+ setprop ro.sf.lcd_density 440
+ ;;
+ esac
+ ;;
esac
# Setup HDMI related nodes & permissions
@@ -155,11 +168,11 @@ esac
# the HDMI(dtv panel)
for fb_cnt in 0 1 2
do
-sys_file=/sys/class/graphics/fb$fb_cnt
+file=/sys/class/graphics/fb$fb_cnt
dev_file=/dev/graphics/fb$fb_cnt
- if [ -d "$sys_file" ]
+ if [ -d "$file" ]
then
- value=`cat $sys_file/msm_fb_type`
+ value=`cat $file/msm_fb_type`
case "$value" in
"dtv panel")
chown system.graphics $file/hpd
diff --git a/rootdir/etc/init.qcom.post_boot.sh b/rootdir/etc/init.qcom.post_boot.sh
index 3491487c..f9b4440d 100755
--- a/rootdir/etc/init.qcom.post_boot.sh
+++ b/rootdir/etc/init.qcom.post_boot.sh
@@ -399,6 +399,56 @@ case "$target" in
;;
esac
+case "$target" in
+ "apq8084")
+ echo 3 > /sys/module/lpm_levels/enable_low_power/l2
+ echo 1 > /sys/module/pm_8x60/modes/cpu0/power_collapse/suspend_enabled
+ echo 1 > /sys/module/pm_8x60/modes/cpu1/power_collapse/suspend_enabled
+ echo 1 > /sys/module/pm_8x60/modes/cpu2/power_collapse/suspend_enabled
+ echo 1 > /sys/module/pm_8x60/modes/cpu3/power_collapse/suspend_enabled
+ echo 1 > /sys/module/pm_8x60/modes/cpu0/power_collapse/idle_enabled
+ echo 1 > /sys/module/pm_8x60/modes/cpu0/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/pm_8x60/modes/cpu1/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/pm_8x60/modes/cpu2/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/pm_8x60/modes/cpu3/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/pm_8x60/modes/cpu0/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/pm_8x60/modes/cpu1/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/pm_8x60/modes/cpu2/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/pm_8x60/modes/cpu3/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/pm_8x60/modes/cpu0/retention/idle_enabled
+ echo 1 > /sys/module/pm_8x60/modes/cpu1/retention/idle_enabled
+ echo 1 > /sys/module/pm_8x60/modes/cpu2/retention/idle_enabled
+ echo 1 > /sys/module/pm_8x60/modes/cpu3/retention/idle_enabled
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
+ echo "ondemand" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
+ echo "ondemand" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
+ echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
+ echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
+ echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
+ echo 2 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
+ echo 300000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 300000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
+ echo 300000 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
+ echo 300000 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+ chown system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ chown system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ chown root.system /sys/devices/system/cpu/mfreq
+ chmod 220 /sys/devices/system/cpu/mfreq
+ chown root.system /sys/devices/system/cpu/cpu1/online
+ chown root.system /sys/devices/system/cpu/cpu2/online
+ chown root.system /sys/devices/system/cpu/cpu3/online
+ chmod 664 /sys/devices/system/cpu/cpu1/online
+ chmod 664 /sys/devices/system/cpu/cpu2/online
+ chmod 664 /sys/devices/system/cpu/cpu3/online
+ ;;
+esac
+
case "$target" in
"msm7627_ffa" | "msm7627_surf" | "msm7627_6x")
echo 25000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
@@ -449,6 +499,19 @@ case "$target" in
start mpdecision
echo 512 > /sys/block/mmcblk0/bdi/read_ahead_kb
;;
+ "apq8084")
+ rm /data/system/default_values
+ start mpdecision
+ echo 512 > /sys/block/mmcblk0/bdi/read_ahead_kb
+ echo 512 > /sys/block/sda/bdi/read_ahead_kb
+ echo 512 > /sys/block/sdb/bdi/read_ahead_kb
+ echo 512 > /sys/block/sdc/bdi/read_ahead_kb
+ echo 512 > /sys/block/sdd/bdi/read_ahead_kb
+ echo 512 > /sys/block/sde/bdi/read_ahead_kb
+ echo 512 > /sys/block/sdf/bdi/read_ahead_kb
+ echo 512 > /sys/block/sdg/bdi/read_ahead_kb
+ echo 512 > /sys/block/sdh/bdi/read_ahead_kb
+ ;;
"msm7627a")
if [ -f /sys/devices/soc0/soc_id ]; then
soc_id=`cat /sys/devices/soc0/soc_id`
diff --git a/rootdir/etc/init.qcom.wifi.sh b/rootdir/etc/init.qcom.wifi.sh
index f95f65f9..5262849a 100644
--- a/rootdir/etc/init.qcom.wifi.sh
+++ b/rootdir/etc/init.qcom.wifi.sh
@@ -274,6 +274,17 @@ case "$target" in
esac
;;
+ apq8084*)
+ echo "*** Use the CNSS CLD driver.**"
+ setprop wlan.driver.ath 0
+
+ # Use different wpa_supplicant.conf template between wcn driver
+ # and ath6kl driver
+ rm /system/etc/wifi/wpa_supplicant.conf
+ ln -s /system/etc/wifi/wpa_supplicant_wcn.conf \
+ /system/etc/wifi/wpa_supplicant.conf
+ ;;
+
msm8960*)
# Move cfg80211.ko to prima directory, the default cfg80211.ko is