diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk
index 518ca7c5..053f9ac6 100644
--- a/BoardConfigCommon.mk
+++ b/BoardConfigCommon.mk
@@ -14,136 +14,121 @@
# limitations under the License.
#
-# CPU
-TARGET_CPU_ABI := armeabi-v7a
-TARGET_CPU_ABI2 := armeabi
+TARGET_SPECIFIC_HEADER_PATH := device/lge/g2-common/include
+
+# Architecture
TARGET_ARCH := arm
TARGET_ARCH_VARIANT := armv7-a-neon
+TARGET_BOARD_PLATFORM := msm8974
+TARGET_BOARD_PLATFORM_GPU := qcom-adreno330
+TARGET_CPU_ABI := armeabi-v7a
+TARGET_CPU_ABI2 := armeabi
TARGET_CPU_VARIANT := krait
-#TARGET_USE_QCOM_BIONIC_OPTIMIZATION := true
-
-TARGET_NO_RADIOIMAGE := true
-TARGET_NO_BOOTLOADER := true
+TARGET_GCC_VERSION_EXP := 4.9
# Assertions
TARGET_BOARD_INFO_FILE ?= device/lge/g2-common/board-info.txt
+# Bootloader
TARGET_BOOTLOADER_BOARD_NAME := galbi
+TARGET_NO_BOOTLOADER := true
+TARGET_NO_RADIOIMAGE := true
-# Platform
-TARGET_BOARD_PLATFORM := msm8974
-TARGET_BOARD_PLATFORM_GPU := qcom-adreno330
-
-# Kernel information
-BOARD_KERNEL_BASE := 0x00000000
-BOARD_KERNEL_CMDLINE := no_underclock=0 console=none androidboot.hardware=g2 androidboot.bootdevice=msm_sdcc.1 user_debug=31 msm_rtb.filter=0x0 mdss_mdp.panel=1:dsi:0:qcom,mdss_dsi_g2_lgd_cmd
-BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x05000000 --tags_offset 0x04800000
-BOARD_KERNEL_PAGESIZE := 2048
-BOARD_KERNEL_SEPARATED_DT := true
+# Kernel
BOARD_CUSTOM_BOOTIMG := true
BOARD_CUSTOM_BOOTIMG_MK := device/lge/g2-common/releasetools/mkbootimg.mk
+BOARD_KERNEL_BASE := 0x00000000
+BOARD_KERNEL_CMDLINE := no_underclock=0 console=ttyHSL0,115200,n8 androidboot.hardware=g2 androidboot.bootdevice=msm_sdcc.1 user_debug=31 msm_rtb.filter=0x0 mdss_mdp.panel=1:dsi:0:qcom,mdss_dsi_g2_lgd_cmd
+BOARD_KERNEL_PAGESIZE := 2048
+BOARD_KERNEL_SEPARATED_DT := true
+BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x05000000 --tags_offset 0x04800000
TARGET_KERNEL_SOURCE := kernel/lge/msm8974
-TARGET_KERNEL_ARCH := arm
# Audio
-BOARD_USES_ALSA_AUDIO:= true
AUDIO_FEATURE_LOW_LATENCY_PRIMARY := true
+AUDIO_FEATURE_ENABLED_NEW_SAMPLE_RATE := true
+BOARD_USES_ALSA_AUDIO := true
+# Bluetooth
+BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/lge/g2-common/bluetooth
+BOARD_BLUEDROID_VENDOR_CONF := device/lge/g2-common/bluetooth/vnd_g2.txt
+BOARD_HAVE_BLUETOOTH := true
+BOARD_HAVE_BLUETOOTH_BCM := true
-# Wi-Fi
-BOARD_WPA_SUPPLICANT_DRIVER := NL80211
-WPA_SUPPLICANT_VERSION := VER_0_8_X
-BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_bcmdhd
-BOARD_HOSTAPD_DRIVER := NL80211
-BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_bcmdhd
-BOARD_WLAN_DEVICE := bcmdhd
-WIFI_DRIVER_FW_PATH_PARAM := "/sys/module/bcmdhd/parameters/firmware_path"
-WIFI_DRIVER_FW_PATH_STA := "/system/etc/firmware/fw_bcmdhd.bin"
-WIFI_DRIVER_FW_PATH_AP := "/system/etc/firmware/fw_bcmdhd_apsta.bin"
+# Camera
+COMMON_GLOBAL_CFLAGS += -DLG_CAMERA_HARDWARE
+USE_DEVICE_SPECIFIC_CAMERA := true
+
+# Charger
+BOARD_CHARGER_ENABLE_SUSPEND := true
+COMMON_GLOBAL_CFLAGS += \
+ -DBOARD_CHARGING_CMDLINE_NAME='"androidboot.mode"' \
+ -DBOARD_CHARGING_CMDLINE_VALUE='"chargerlogo"'
+
+# CMHW
+BOARD_HARDWARE_CLASS := device/lge/g2-common/cmhw/
# Display
-USE_OPENGL_RENDERER := true
-TARGET_USES_ION := true
-#TARGET_USES_OVERLAY := true
-TARGET_USES_C2D_COMPOSITION := true
HAVE_ADRENO_SOURCE := false
-OVERRIDE_RS_DRIVER := libRSDriver_adreno.so
-NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3
-
-# EGL
MAX_EGL_CACHE_KEY_SIZE := 12*1024
MAX_EGL_CACHE_SIZE := 2048*1024
+NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3
+OVERRIDE_RS_DRIVER := libRSDriver_adreno.so
+TARGET_USES_ION := true
+USE_OPENGL_RENDERER := true
-# Qualcomm HALs
-BOARD_USES_QCOM_HARDWARE := true
-
-# QCOM PowerHAL
-TARGET_POWERHAL_VARIANT := g2
+# Fonts
+EXTENDED_FONT_FOOTPRINT := true
# Lights
TARGET_PROVIDES_LIBLIGHT := true
-# Camera
-USE_DEVICE_SPECIFIC_CAMERA := true
-COMMON_GLOBAL_CFLAGS += -DLG_CAMERA_HARDWARE
-#COMMON_GLOBAL_CFLAGS += -DLPA_DEFAULT_BUFFER_SIZE=512
-
-# Flags
-#TARGET_RELEASE_CPPFLAGS += -DNEEDS_VECTORIMPL_SYMBOLS
-COMMON_GLOBAL_CFLAGS += -DNO_SECURE_DISCARD
-
-RECOVERY_FSTAB_VERSION = 2
-TARGET_RECOVERY_FSTAB = device/lge/g2-common/rootdir/etc/fstab.g2
-BOARD_USE_CUSTOM_RECOVERY_FONT := \"roboto_23x41.h\"
-TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888"
-BOARD_HAS_NO_SELECT_BUTTON := true
-COMMON_GLOBAL_CFLAGS += -DNO_SECURE_DISCARD
-
-TARGET_USERIMAGES_USE_EXT4 := true
-TARGET_USERIMAGES_USE_F2FS := true
+# Partitions
+BOARD_FLASH_BLOCK_SIZE := 131072
BOARD_BOOTIMAGE_PARTITION_SIZE := 23068672 # 22M
+BOARD_CACHEIMAGE_PARTITION_SIZE := 734003200 #700M
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 23068672 # 22M
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2684354560 # 2.5G (actually 2.75, but leave room for model variation)
BOARD_USERDATAIMAGE_PARTITION_SIZE := 13725837312 # 12.8G (its much larger, but this is enough for now)
-BOARD_CACHEIMAGE_PARTITION_SIZE := 734003200 #700M
-BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
-BOARD_FLASH_BLOCK_SIZE := 131072 # (BOARD_KERNEL_PAGESIZE * 64)
-# Bluetooth
-BOARD_HAVE_BLUETOOTH := true
-BOARD_HAVE_BLUETOOTH_BCM := true
-BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/lge/g2-common/bluetooth
-BOARD_BLUEDROID_VENDOR_CONF := device/lge/g2-common/bluetooth/vnd_g2.txt
+# Power
+TARGET_POWERHAL_VARIANT := g2
-# Fonts
-EXTENDED_FONT_FOOTPRINT := true
+# Qualcomm support
+BOARD_USES_QCOM_HARDWARE := true
+BOARD_USES_QC_TIME_SERVICES := true
-# Offmode Charging
-BOARD_CHARGER_ENABLE_SUSPEND := true
-COMMON_GLOBAL_CFLAGS += \
- -DBOARD_CHARGING_CMDLINE_NAME='"androidboot.mode"' \
- -DBOARD_CHARGING_CMDLINE_VALUE='"chargerlogo"'
+# Recovery
+COMMON_GLOBAL_CFLAGS += -DNO_SECURE_DISCARD
+TARGET_RECOVERY_FSTAB = device/lge/g2-common/rootdir/etc/fstab.g2
+TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888"
+TARGET_RECOVERY_UPDATER_LIBS := librecovery_updater_g2
+TARGET_USERIMAGES_USE_EXT4 := true
+TARGET_USERIMAGES_USE_F2FS := true
-# CM Hardware
-BOARD_HARDWARE_CLASS := device/lge/g2-common/cmhw/
+# Releasetools
+TARGET_RELEASETOOLS_EXTENSIONS := device/lge/g2-common/releasetools
+
+# RIL
+BOARD_RIL_CLASS := ../../../device/lge/g2-common/ril/
+TARGET_RELEASE_CPPFLAGS += -DNEEDS_LGE_RIL_SYMBOLS
# SELinux policies
-# QCOM sepolicy
include device/qcom/sepolicy/sepolicy.mk
BOARD_SEPOLICY_DIRS += \
device/lge/g2-common/sepolicy
-# RIL
-BOARD_RIL_CLASS := ../../../device/lge/g2-common/ril/
-TARGET_RELEASE_CPPFLAGS += -DNEEDS_LGE_RIL_SYMBOLS
-
-# Releasetools
-TARGET_RECOVERY_UPDATER_LIBS := librecovery_updater_g2
-TARGET_RELEASETOOLS_EXTENSIONS := device/lge/g2-common/releasetools
-
-# Qualcomm time
-BOARD_USES_QC_TIME_SERVICES := true
+BOARD_SEPOLICY_UNION += \
+ thermanager.te
-# Device headers
-TARGET_SPECIFIC_HEADER_PATH := device/lge/g2-common/include
+# Wi-Fi
+BOARD_WPA_SUPPLICANT_DRIVER := NL80211
+WPA_SUPPLICANT_VERSION := VER_0_8_X
+BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_bcmdhd
+BOARD_HOSTAPD_DRIVER := NL80211
+BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_bcmdhd
+BOARD_WLAN_DEVICE := bcmdhd
+WIFI_DRIVER_FW_PATH_PARAM := "/sys/module/bcmdhd/parameters/firmware_path"
+WIFI_DRIVER_FW_PATH_STA := "/system/etc/firmware/fw_bcmdhd.bin"
+WIFI_DRIVER_FW_PATH_AP := "/system/etc/firmware/fw_bcmdhd_apsta.bin"
diff --git a/bluetooth/vnd_g2.txt b/bluetooth/vnd_g2.txt
index 7e411b5f..56501914 100644
--- a/bluetooth/vnd_g2.txt
+++ b/bluetooth/vnd_g2.txt
@@ -1,13 +1,10 @@
BLUETOOTH_UART_DEVICE_PORT = "/dev/ttyHS99"
FW_PATCHFILE_LOCATION = "/vendor/firmware/"
FW_PRE_PATCH="/vendor/firmware/bcm4335_prepatch.hcd"
+FW_PATCH_SETTLEMENT_DELAY_MS = 100
UART_TARGET_BAUD_RATE = 3000000
LPM_IDLE_TIMEOUT_MULTIPLE = 5
BT_WAKE_VIA_PROC = TRUE
-SCO_USE_I2S_INTERFACE = FALSE
SCO_I2SPCM_IF_ROLE = 0
-BTVND_DBG = FALSE
-BTHW_DBG = FALSE
-VNDUSERIAL_DBG = FALSE
-UPIO_DBG = FALSE
+USE_AXI_BRIDGE_LOCK = TRUE
UART_FORCE_TWO_STOPBITS = TRUE
diff --git a/configs/audio_effects.conf b/configs/audio_effects.conf
index 9ce1535c..91f33cfa 100644
--- a/configs/audio_effects.conf
+++ b/configs/audio_effects.conf
@@ -278,30 +278,3 @@ effects {
#
# TODO: add default audio pre processor configurations after debug and tuning phase
#
-
-# Audio output session configurations.
-# New for L, similar to above but for playback streams
-# Enables FX settings for a given stream type. Valid stream types are:
-# "default", "voice_call", "system", "ring", "music", "alarm", "notification",
-# "bluetooth_sco", "enforced_audible", "dtmf", "tts"
-
-output_session_processing {
- music {
- music_helper { }
- }
- ring {
- ring_helper { }
- }
- alarm {
- ring_helper { }
- }
- voice_call {
- voice_helper { }
- }
- tts {
- tts_helper { }
- }
- notification {
- notification_helper { }
- }
-}
diff --git a/configs/audio_platform_info.xml b/configs/audio_platform_info.xml
deleted file mode 100755
index 84d34db6..00000000
--- a/configs/audio_platform_info.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/configs/audio_policy.conf b/configs/audio_policy.conf
index 37badcd2..3adde77e 100644
--- a/configs/audio_policy.conf
+++ b/configs/audio_policy.conf
@@ -5,7 +5,8 @@
global_configuration {
attached_output_devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER
default_output_device AUDIO_DEVICE_OUT_SPEAKER
- attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_REMOTE_SUBMIX|AUDIO_DEVICE_IN_VOICE_CALL
+ attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BACK_MIC|AUDIO_DEVICE_IN_THIRD_MIC|AUDIO_DEVICE_IN_REMOTE_SUBMIX|AUDIO_DEVICE_IN_VOICE_CALL
+ speaker_drc_enabled TRUE
}
# audio hardware module section: contains descriptors for all audio hw modules present on the
@@ -26,23 +27,30 @@ audio_hw_modules {
sampling_rates 44100|48000
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
- devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_FM|AUDIO_DEVICE_OUT_FM_TX
- flags AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_FAST
+ devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY
+ flags AUDIO_OUTPUT_FLAG_PRIMARY
}
deep_buffer {
- sampling_rates 44100|48000
+ sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
- devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_FM|AUDIO_DEVICE_OUT_FM_TX
+ devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY
flags AUDIO_OUTPUT_FLAG_DEEP_BUFFER
}
- hdmi {
- sampling_rates 44100|48000
+ multichannel {
+ sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000|96000
channel_masks dynamic
formats AUDIO_FORMAT_PCM_16_BIT
- devices AUDIO_DEVICE_OUT_AUX_DIGITAL
+ devices AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY
flags AUDIO_OUTPUT_FLAG_DIRECT
}
+ compress_offload {
+ sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000|64000|88200|96000|176400|192000
+ channel_masks AUDIO_CHANNEL_OUT_MONO|AUDIO_CHANNEL_OUT_STEREO|AUDIO_CHANNEL_OUT_2POINT1|AUDIO_CHANNEL_OUT_QUAD|AUDIO_CHANNEL_OUT_PENTA|AUDIO_CHANNEL_OUT_5POINT1|AUDIO_CHANNEL_OUT_6POINT1|AUDIO_CHANNEL_OUT_7POINT1
+ formats AUDIO_FORMAT_MP3|AUDIO_FORMAT_AAC_LC|AUDIO_FORMAT_AAC_HE_V1|AUDIO_FORMAT_AAC_HE_V2|AUDIO_FORMAT_MP2|AUDIO_FORMAT_PCM_16_BIT_OFFLOAD|AUDIO_FORMAT_PCM_24_BIT_OFFLOAD
+ devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL
+ flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING
+ }
voip_rx {
sampling_rates 8000|16000
channel_masks AUDIO_CHANNEL_OUT_MONO
@@ -54,43 +62,61 @@ audio_hw_modules {
inputs {
primary {
sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000
- channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO|AUDIO_CHANNEL_IN_FRONT_BACK
- formats AUDIO_FORMAT_PCM_16_BIT|AUDIO_FORMAT_AMR_NB|AUDIO_FORMAT_AMR_WB|AUDIO_FORMAT_QCELP|AUDIO_FORMAT_EVRC|AUDIO_FORMAT_EVRCB|AUDIO_FORMAT_EVRCWB|AUDIO_FORMAT_EVRCNW
- devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_WIRED_HEADSET|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_VOICE_CALL
+ channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO|AUDIO_CHANNEL_IN_FRONT_BACK|AUDIO_CHANNEL_IN_VOICE_UPLINK|AUDIO_CHANNEL_IN_VOICE_DNLINK
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_WIRED_HEADSET|AUDIO_DEVICE_IN_WIRED_HEADPHONE|AUDIO_DEVICE_IN_AUX_DIGITAL|AUDIO_DEVICE_IN_VOICE_CALL|AUDIO_DEVICE_IN_BACK_MIC|AUDIO_DEVICE_IN_THIRD_MIC
}
}
}
a2dp {
outputs {
a2dp {
- sampling_rates 44100
+ sampling_rates 44100|48000
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_ALL_A2DP
}
}
- inputs {
- a2dp {
- sampling_rates 44100|48000
- channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO|AUDIO_CHANNEL_IN_5POINT1|AUDIO_CHANNEL_IN_VOICE_CALL_MONO|AUDIO_CHANNEL_IN_VOICE_DNLINK_MONO|AUDIO_CHANNEL_IN_VOICE_UPLINK_MONO
- formats AUDIO_FORMAT_PCM_16_BIT
- devices AUDIO_DEVICE_IN_BLUETOOTH_A2DP
- }
- }
}
usb {
outputs {
usb_accessory {
- sampling_rates 44100
+ sampling_rates 44100|48000
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_USB_ACCESSORY
}
usb_device {
- sampling_rates 44100
+ sampling_rates 44100|48000
+ channel_masks dynamic
+ formats dynamic
+ devices AUDIO_DEVICE_OUT_USB_DEVICE|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET
+ }
+ }
+ inputs {
+ usb_device {
+ sampling_rates 8000|11025|16000|22050|24000|32000|44100|48000
+ channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_IN_DGTL_DOCK_HEADSET
+ }
+ }
+ }
+ tms {
+ outputs {
+ tms {
+ sampling_rates 44100|48000
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
- devices AUDIO_DEVICE_OUT_USB_DEVICE
+ devices AUDIO_DEVICE_OUT_EXTERNAL_TMS
+ }
+ }
+ inputs {
+ tms {
+ sampling_rates 44100|48000
+ channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_IN_EXTERNAL_TMS
}
}
}
diff --git a/configs/media_codecs.xml b/configs/media_codecs.xml
index b04090fa..2b658710 100644
--- a/configs/media_codecs.xml
+++ b/configs/media_codecs.xml
@@ -15,6 +15,38 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
+
+
+
@@ -28,34 +60,51 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
@@ -90,84 +127,113 @@
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/configs/mixer_paths.xml b/configs/mixer_paths.xml
index 37c8b80a..dfff875a 100644
--- a/configs/mixer_paths.xml
+++ b/configs/mixer_paths.xml
@@ -26,8 +26,8 @@
-
-
+
+
@@ -461,7 +461,7 @@
-
+
@@ -469,8 +469,8 @@
-
-
+
+
@@ -478,7 +478,7 @@
-
+
@@ -510,8 +510,8 @@
-
-
+
+
@@ -523,7 +523,7 @@
-
+
@@ -533,13 +533,13 @@
-
+
-
+
@@ -549,19 +549,19 @@
-
+
-
+
-
+
@@ -571,14 +571,14 @@
-
-
+
+
-
+
@@ -601,8 +601,8 @@
-
-
+
+
@@ -610,8 +610,8 @@
-
-
+
+
@@ -624,11 +624,11 @@
-
-
+
+
-
+
@@ -652,8 +652,8 @@
-
-
+
+
@@ -663,8 +663,8 @@
-
-
+
+
@@ -674,8 +674,8 @@
-
-
+
+
@@ -686,13 +686,13 @@
-
+
-
+
@@ -702,7 +702,7 @@
-
+
@@ -993,8 +993,8 @@
-
-
+
+
@@ -1104,8 +1104,8 @@
-
-
+
+
diff --git a/configs/synaptics_rmi4_i2c.kl b/configs/synaptics_rmi4_i2c.kl
deleted file mode 100644
index eda99fb6..00000000
--- a/configs/synaptics_rmi4_i2c.kl
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright (c) 2012, 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 The 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 "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.
-
-key 139 MENU
-key 102 HOME
-key 158 BACK
-key 217 SEARCH
diff --git a/configs/thermal-engine-8974.conf b/configs/thermal-engine-8974.conf
deleted file mode 100644
index d2405a5d..00000000
--- a/configs/thermal-engine-8974.conf
+++ /dev/null
@@ -1,112 +0,0 @@
-sampling 5000
-
-[CPU_LCD_management]
-algo_type monitor
-sensor xo_therm_pu2
-sampling 10000
-thresholds 46000 48000 50000 52000 54000 56000
-thresholds_clr 44000 46500 48500 50500 52500 54500
-actions cpu+lcd cpu+lcd cpu+lcd cpu+lcd cpu+lcd cpu+lcd
-action_info FFFFFFF+255 1958400+255 1728000+235 1574400+215 1267200+204 1190400+204
-action_type 25000
-
-[battery_monitor]
-algo_type monitor
-sensor xo_therm_pu2
-sampling 10000
-thresholds 42000 44000 46000 48000 50000 52000
-thresholds_clr 40000 42500 44500 46500 48500 50500
-actions battery battery battery battery battery battery
-action_info 700 500 300 300 300 300
-
-[batt_therm_monitor]
-algo_type monitor
-sensor batt_therm
-sampling 10000
-thresholds 562000
-thresholds_clr 528000
-actions lcd
-action_info 92
-
-[CPU0_MONITOR]
-algo_type monitor
-sensor cpu0
-sampling 65
-thresholds 115000
-thresholds_clr 110000
-actions shutdown
-action_info 0
-
-[CPU1_MONITOR]
-algo_type monitor
-sensor cpu1
-sampling 65
-thresholds 115000
-thresholds_clr 110000
-actions shutdown
-action_info 0
-
-[CPU2_MONITOR]
-algo_type monitor
-sensor cpu2
-sampling 65
-thresholds 115000
-thresholds_clr 110000
-actions shutdown
-action_info 0
-
-[CPU3_MONITOR]
-algo_type monitor
-sensor cpu3
-sampling 65
-thresholds 115000
-thresholds_clr 110000
-actions shutdown
-action_info 0
-
-[SS-CPU0]
-algo_type ss
-sampling 65
-sensor cpu0
-device cpu
-set_point 85000
-set_point_clr 55000
-action_type 10000
-
-[SS-CPU1]
-algo_type ss
-sampling 65
-sensor cpu1
-device cpu
-set_point 85000
-set_point_clr 55000
-action_type 10000
-
-[SS-CPU2]
-algo_type ss
-sampling 65
-sensor cpu2
-device cpu
-set_point 85000
-set_point_clr 55000
-action_type 10000
-
-[SS-CPU3]
-algo_type ss
-sampling 65
-sensor cpu3
-device cpu
-set_point 85000
-set_point_clr 55000
-action_type 10000
-
-[SS-POPMEM]
-algo_type ss
-sampling 65
-sensor pop_mem
-device cpu
-set_point 80000
-set_point_clr 55000
-time_constant 16
-action_type 20000
-
diff --git a/configs/thermal-engine-default.conf b/configs/thermal-engine-default.conf
deleted file mode 100644
index 88b26b48..00000000
--- a/configs/thermal-engine-default.conf
+++ /dev/null
@@ -1,38 +0,0 @@
-sampling 5000
-
-[CPU0_MONITOR]
-algo_type monitor
-sensor cpu0
-sampling 65
-thresholds 115000
-thresholds_clr 110000
-actions shutdown
-action_info 0
-
-[CPU1_MONITOR]
-algo_type monitor
-sensor cpu1
-sampling 65
-thresholds 115000
-thresholds_clr 110000
-actions shutdown
-action_info 0
-
-[CPU2_MONITOR]
-algo_type monitor
-sensor cpu2
-sampling 65
-thresholds 115000
-thresholds_clr 110000
-actions shutdown
-action_info 0
-
-[CPU3_MONITOR]
-algo_type monitor
-sensor cpu3
-sampling 65
-thresholds 115000
-thresholds_clr 110000
-actions shutdown
-action_info 0
-
diff --git a/configs/thermanager.xml b/configs/thermanager.xml
new file mode 100644
index 00000000..a4eb2c1b
--- /dev/null
+++ b/configs/thermanager.xml
@@ -0,0 +1,251 @@
+
+
+
+ /sys/class/thermal/thermal_zone0
+ /sys/class/thermal/thermal_zone1
+ /sys/class/thermal/thermal_zone2
+ /sys/class/thermal/thermal_zone3
+ /sys/class/thermal/thermal_zone4
+
+ /sys/class/thermal/thermal_zone5
+ /sys/class/thermal/thermal_zone6
+ /sys/class/thermal/thermal_zone7
+ /sys/class/thermal/thermal_zone8
+ /sys/class/thermal/thermal_zone9
+ /sys/class/thermal/thermal_zone10
+
+ /sys/class/thermal/thermal_zone12
+ /sys/class/thermal/thermal_zone13
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
+ /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
+ /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
+
+
+
+
+
+
+
+
+
+ /sys/class/kgsl/kgsl-3d0/max_gpuclk
+ /sys/class/power_supply/usb/current_max
+ /sys/class/power_supply/battery/temp
+ /sys/class/power_supply/battery/charging_enabled
+
+
+
+
+
+
+
+
+
+ 1500000
+ 900000
+ 700000
+ 500000
+ 300000
+ 150000
+
+
+
+ 1
+ 0
+
+
+
+
+ 0
+ 1
+
+
+
+ NORMAL
+ WARNING
+ CRITICAL
+
+
+
+
+
+
+
+
+ 578000000
+ 462400000
+ 389000000
+ 330000000
+ 200000000
+
+
+
+
+ 2457600
+ 2265600
+ 1958400
+ 1728000
+ 1574400
+ 1497600
+ 1267200
+ 1190400
+ 1036800
+ 960000
+ 883200
+ 729600
+ 652800
+ 422400
+ 300000
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/custom_prop.mk b/custom_prop.mk
new file mode 100644
index 00000000..252e3c98
--- /dev/null
+++ b/custom_prop.mk
@@ -0,0 +1,84 @@
+#
+# Custom System Properties for G2
+#
+
+# Google Client ID
+PRODUCT_GMS_CLIENTID_BASE := android-lge
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.com.google.clientidbase.ms=android-lge \
+ ro.com.google.clientidbase.am=android-lge \
+ ro.com.google.clientidbase.gmm=android-lge \
+ ro.com.google.clientidbase.yt=android-lge
+
+# ART
+PRODUCT_PROPERTY_OVERRIDES += \
+ dalvik.vm.dex2oat-flags=--no-watch-dog
+
+# Wi-Fi
+PRODUCT_PROPERTY_OVERRIDES += \
+ wlan.chip.vendor=brcm \
+ wlan.chip.version=bcm4335
+
+#
+# Audio/Video
+#
+
+# ALSA
+PRODUCT_PROPERTY_OVERRIDES += \
+ persist.audio.handset.mic.type=digital
+
+# Platform
+PRODUCT_PROPERTY_OVERRIDES += \
+ persist.audio.dualmic.config=endfire
+
+# VoIP and Direct output for PCM format
+PRODUCT_PROPERTY_OVERRIDES += \
+ use.dedicated.device.for.voip=false \
+ use.voice.path.for.pcm.voip=true
+
+# Surround sound recording
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.qc.sdk.audio.ssr=false
+
+# HW Composer debug level
+PRODUCT_PROPERTY_OVERRIDES += \
+ debug.mdpcomp.logs=0
+
+# VIDC debug level
+PRODUCT_PROPERTY_OVERRIDES += \
+ vidc.debug.level=0
+
+#
+# Memory
+#
+
+# Memory
+PRODUCT_PROPERTY_OVERRIDES += \
+ dalvik.vm.heapstartsize=8m \
+ dalvik.vm.heapgrowthlimit=256m \
+ dalvik.vm.heapsize=512m \
+ dalvik.vm.heaptargetutilization=0.5 \
+ dalvik.vm.heapminfree=2m \
+ dalvik.vm.heapmaxfree=8m
+
+# HWUI
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.hwui.texture_cache_size=76 \
+ ro.hwui.layer_cache_size=52 \
+ ro.hwui.r_buffer_cache_size=8 \
+ ro.hwui.path_cache_size=32 \
+ ro.hwui.gradient_cache_size=1 \
+ ro.hwui.drop_shadow_cache_size=6 \
+ ro.hwui.texture_cache_flushrate=0.4 \
+ ro.hwui.text_small_cache_width=1024 \
+ ro.hwui.text_small_cache_height=1024 \
+ ro.hwui.text_large_cache_width=2048 \
+ ro.hwui.text_large_cache_height=1024
+
+#
+# HotPlug
+#
+
+# MP-Decision
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.qualcomm.perf.cores_online=1
diff --git a/extract-files.sh b/extract-files.sh
new file mode 100755
index 00000000..364dbb86
--- /dev/null
+++ b/extract-files.sh
@@ -0,0 +1,62 @@
+#!/bin/bash
+
+#set -e
+export FAMILY=g2-common
+export VENDOR=lge
+
+function extract() {
+ for FILE in `egrep -v '(^#|^$)' $1`; do
+ OLDIFS=$IFS IFS=":" PARSING_ARRAY=($FILE) IFS=$OLDIFS
+ FILE=`echo ${PARSING_ARRAY[0]} | sed -e "s/^-//g"`
+ DEST=${PARSING_ARRAY[1]}
+ if [ -z $DEST ]; then
+ DEST=$FILE
+ fi
+ DIR=`dirname $FILE`
+ if [ ! -d $2/$DIR ]; then
+ mkdir -p $2/$DIR
+ fi
+ if [ "$SRC" = "adb" ]; then
+ # Try CM target first
+ adb pull /system/$DEST $2/$DEST
+ # if file does not exist try OEM target
+ if [ "$?" != "0" ]; then
+ adb pull /system/$FILE $2/$DEST
+ fi
+ else
+ cp $SRC/system/$FILE $2/$DEST
+ # if file dot not exist try destination
+ if [ "$?" != "0" ]
+ then
+ cp $SRC/system/$DEST $2/$DEST
+ fi
+ fi
+ done
+}
+
+if [ $# -eq 0 ]; then
+ SRC=adb
+else
+ if [ $# -eq 1 ]; then
+ SRC=$1
+ else
+ echo "$0: bad number of arguments"
+ echo ""
+ echo "usage: $0 [PATH_TO_EXPANDED_ROM]"
+ echo ""
+ echo "If PATH_TO_EXPANDED_ROM is not specified, blobs will be extracted from"
+ echo "the device using adb pull."
+ exit 1
+ fi
+fi
+
+BASE=../../../vendor/$VENDOR/$FAMILY/proprietary
+rm -rf $BASE/*
+
+DEVBASE=../../../vendor/$VENDOR/$DEVICE/proprietary
+rm -rf $DEVBASE/*
+
+extract ../../$VENDOR/$FAMILY/proprietary-files.txt $BASE
+extract ../../$VENDOR/$DEVICE/proprietary-files.txt $DEVBASE
+
+./setup-makefiles.sh
diff --git a/g2.mk b/g2.mk
index c6991fc9..65de273e 100644
--- a/g2.mk
+++ b/g2.mk
@@ -20,159 +20,116 @@ $(call inherit-product-if-exists, vendor/lge/g2-common/g2-common-vendor.mk)
# Overlays
DEVICE_PACKAGE_OVERLAYS := $(LOCAL_PATH)/overlay
-# Google Client ID
-PRODUCT_GMS_CLIENTID_BASE := android-lge
+# Permissions
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.audio.low_latency.xml:system/etc/permissions/android.hardware.audio.low_latency.xml \
+ frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml \
+ frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:system/etc/permissions/android.hardware.camera.flash-autofocus.xml \
+ frameworks/native/data/etc/android.hardware.camera.front.xml:system/etc/permissions/android.hardware.camera.front.xml \
+ frameworks/native/data/etc/android.hardware.consumerir.xml:system/etc/permissions/android.hardware.consumerir.xml \
+ frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \
+ frameworks/native/data/etc/android.hardware.nfc.xml:system/etc/permissions/android.hardware.nfc.xml \
+ frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:system/etc/permissions/android.hardware.sensor.gyroscope.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.proximity.xml:system/etc/permissions/android.hardware.sensor.proximity.xml \
+ frameworks/native/data/etc/android.hardware.sensor.stepcounter.xml:system/etc/permissions/android.hardware.sensor.stepcounter.xml \
+ frameworks/native/data/etc/android.hardware.sensor.stepdetector.xml:system/etc/permissions/android.hardware.sensor.stepdetector.xml \
+ frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml \
+ frameworks/native/data/etc/android.hardware.telephony.cdma.xml:system/etc/permissions/android.hardware.telephony.cdma.xml \
+ frameworks/native/data/etc/android.hardware.telephony.gsm.xml:system/etc/permissions/android.hardware.telephony.gsm.xml \
+ frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \
+ frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml \
+ frameworks/native/data/etc/android.hardware.usb.host.xml:system/etc/permissions/android.hardware.usb.host.xml \
+ frameworks/native/data/etc/android.hardware.wifi.direct.xml:system/etc/permissions/android.hardware.wifi.direct.xml \
+ frameworks/native/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \
+ frameworks/native/data/etc/com.android.nfc_extras.xml:system/etc/permissions/com.android.nfc_extras.xml \
+ frameworks/native/data/etc/handheld_core_hardware.xml:system/etc/permissions/handheld_core_hardware.xml
# System properties
-include $(LOCAL_PATH)/system_prop.mk
-# Fall back to lower resolution if xxhdpi bitmaps dont exist
+# Screen density
PRODUCT_AAPT_CONFIG := normal hdpi xhdpi xxhdpi
PRODUCT_AAPT_PREF_CONFIG := xxhdpi
-# Media and audio
-PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/configs/audio_policy.conf:system/etc/audio_policy.conf \
- $(LOCAL_PATH)/configs/audio_effects.conf:system/vendor/etc/audio_effects.conf \
- $(LOCAL_PATH)/configs/media_profiles.xml:system/etc/media_profiles.xml \
- $(LOCAL_PATH)/configs/media_codecs.xml:system/etc/media_codecs.xml \
- $(LOCAL_PATH)/configs/mixer_paths.xml:system/etc/mixer_paths.xml \
- frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:system/etc/media_codecs_google_audio.xml \
- frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:system/etc/media_codecs_google_telephony.xml \
- frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:system/etc/media_codecs_google_video.xml
+# Boot animation
+TARGET_SCREEN_HEIGHT := 1920
+TARGET_SCREEN_WIDTH := 1080
-# Thermal configuration
-PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/configs/thermal-engine-8974.conf:system/etc/thermal-engine-8974.conf \
- $(LOCAL_PATH)/configs/thermal-engine-default.conf:system/etc/thermal-engine-default.conf
-
-# Sensors
-PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/configs/sensor_def_common.conf:system/etc/sensor_def_common.conf
-
-# Touchscreen configuration
-PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/configs/gpio-keys.kl:system/usr/keylayout/gpio-keys.kl \
- $(LOCAL_PATH)/configs/synaptics_rmi4_i2c.kl:system/usr/keylayout/synaptics_rmi4_i2c.kl \
- $(LOCAL_PATH)/configs/touch_dev.idc:system/usr/idc/touch_dev.idc
-
-# These are the hardware-specific features
-PRODUCT_COPY_FILES += \
- frameworks/native/data/etc/handheld_core_hardware.xml:system/etc/permissions/handheld_core_hardware.xml \
- frameworks/native/data/etc/android.hardware.camera.autofocus.xml:system/etc/permissions/android.hardware.camera.autofocus.xml \
- frameworks/native/data/etc/android.hardware.camera.xml:system/etc/permissions/android.hardware.camera.xml \
- frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:system/etc/permissions/android.hardware.camera.flash-autofocus.xml \
- frameworks/native/data/etc/android.hardware.camera.front.xml:system/etc/permissions/android.hardware.camera.front.xml \
- frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \
- frameworks/native/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \
- frameworks/native/data/etc/android.hardware.wifi.direct.xml:system/etc/permissions/android.hardware.wifi.direct.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.sensor.barometer.xml:system/etc/permissions/android.hardware.sensor.barometer.xml \
- frameworks/native/data/etc/android.hardware.sensor.stepcounter.xml:system/etc/permissions/android.hardware.sensor.stepcounter.xml \
- frameworks/native/data/etc/android.hardware.sensor.stepdetector.xml:system/etc/permissions/android.hardware.sensor.stepdetector.xml \
- frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \
- frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml \
- frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml \
- frameworks/native/data/etc/android.hardware.audio.low_latency.xml:system/etc/permissions/android.hardware.audio.low_latency.xml \
- frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml
-
-# Prepatch to fix BT/WiFi bus lockups
-PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/bluetooth/bcm4335_prepatch.hcd:system/vendor/firmware/bcm4335_prepatch.hcd
+# Audio
+PRODUCT_PACKAGES += \
+ audio.a2dp.default \
+ audio.primary.msm8974 \
+ audio.r_submix.default \
+ audio.usb.default \
+ audiod \
+ libaudio-resampler \
+ libqcompostprocbundle \
+ libqcomvisualizer \
+ libqcomvoiceprocessing \
+ libqcomvoiceprocessingdescriptors
-# GPS configuration
PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/gps/etc/gps.conf:system/etc/gps.conf \
- $(LOCAL_PATH)/gps/etc/flp.conf:system/etc/flp.conf \
- $(LOCAL_PATH)/gps/etc/izat.conf:system/etc/izat.conf \
- $(LOCAL_PATH)/gps/etc/quipc.conf:system/etc/quipc.conf \
- $(LOCAL_PATH)/gps/etc/sap.conf:system/etc/sap.conf
+ $(LOCAL_PATH)/configs/audio_effects.conf:system/vendor/etc/audio_effects.conf \
+ $(LOCAL_PATH)/configs/audio_policy.conf:system/etc/audio_policy.conf \
+ $(LOCAL_PATH)/configs/mixer_paths.xml:system/etc/mixer_paths.xml
-# IPv6 tethering
+# Bluetooth
PRODUCT_PACKAGES += \
- ebtables \
- ethertypes
+ hwaddrs
-# IRSC
PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/configs/sec_config:system/etc/sec_config
-
-# Init
-PRODUCT_PACKAGES += \
- init.g2.rc \
- init.g2.usb.rc \
- init.g2.power.rc \
- init.qcom.sh \
- ueventd.g2.rc \
- fstab.g2
+ $(LOCAL_PATH)/bluetooth/bcm4335_prepatch.hcd:system/vendor/firmware/bcm4335_prepatch.hcd
+# Camera
PRODUCT_PACKAGES += \
- libwpa_client \
- hostapd \
- dhcpcd.conf \
- wpa_supplicant \
- wpa_supplicant.conf
+ camera.msm8974
+# Charger
PRODUCT_PACKAGES += \
charger_res_images
-# Live Wallpapers
+# Display
PRODUCT_PACKAGES += \
- LiveWallpapers \
- LiveWallpapersPicker \
- VisualizationWallpapers \
- librs_jni
+ copybit.msm8974 \
+ gralloc.msm8974 \
+ hwcomposer.msm8974 \
+ memtrack.msm8974
-# NFC packages
+# GPS
PRODUCT_PACKAGES += \
- Tag \
- com.android.nfc_extras
+ gps.msm8974
-# NFC access control + feature files + configuration
PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/nfc/libnfc-brcm.conf:system/etc/libnfc-brcm.conf \
- $(LOCAL_PATH)/nfc/nfcee_access.xml:system/etc/nfcee_access.xml \
- frameworks/native/data/etc/com.android.nfc_extras.xml:system/etc/permissions/com.android.nfc_extras.xml \
- frameworks/native/data/etc/android.hardware.nfc.xml:system/etc/permissions/android.hardware.nfc.xml
-
-# ART
-PRODUCT_PROPERTY_OVERRIDES += \
- dalvik.vm.dex2oat-flags=--no-watch-dog
-
-PRODUCT_TAGS += dalvik.gc.type-precise
-
-PRODUCT_PACKAGES += \
- com.android.future.usb.accessory
+ $(LOCAL_PATH)/gps/etc/flp.conf:system/etc/flp.conf \
+ $(LOCAL_PATH)/gps/etc/gps.conf:system/etc/gps.conf \
+ $(LOCAL_PATH)/gps/etc/izat.conf:system/etc/izat.conf \
+ $(LOCAL_PATH)/gps/etc/quipc.conf:system/etc/quipc.conf \
+ $(LOCAL_PATH)/gps/etc/sap.conf:system/etc/sap.conf
+# Init
PRODUCT_PACKAGES += \
- libgenlock \
- liboverlay \
- hwcomposer.msm8974 \
- gralloc.msm8974 \
- copybit.msm8974 \
- memtrack.msm8974
+ fstab.g2 \
+ init.g2.rc \
+ init.g2.power.rc \
+ init.g2.usb.rc \
+ init.recovery.g2.rc \
+ panel.sh \
+ set_baseband.sh \
+ ueventd.g2.rc
-# Local wrapper for fixups
+# IPv6 tethering
PRODUCT_PACKAGES += \
- camera.msm8974
+ ebtables \
+ ethertypes
-PRODUCT_PACKAGES += \
- power.msm8974
+# IRSC
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/configs/sec_config:system/etc/sec_config
+# Lights
PRODUCT_PACKAGES += \
- audiod \
- audio_policy.default \
- audio.primary.msm8974 \
- audio.a2dp.default \
- audio.usb.default \
- audio.r_submix.default \
- libaudio-resampler \
- libqcomvisualizer \
- libqcomvoiceprocessing \
- libqcomvoiceprocessingdescriptors \
- libqcompostprocbundle
+ lights.msm8974
# Media
PRODUCT_PACKAGES += \
@@ -185,40 +142,83 @@ PRODUCT_PACKAGES += \
libOmxEvrcEnc \
libOmxQcelp13Enc \
libOmxVdec \
- libOmxVdecHevc \
libOmxVenc \
libstagefrighthw \
qcmediaplayer
PRODUCT_BOOT_JARS += qcmediaplayer
-# GPS
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/configs/media_codecs.xml:system/etc/media_codecs.xml \
+ $(LOCAL_PATH)/configs/media_profiles.xml:system/etc/media_profiles.xml \
+ frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:system/etc/media_codecs_google_audio.xml \
+ frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:system/etc/media_codecs_google_telephony.xml \
+ frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:system/etc/media_codecs_google_video.xml
+
+# NFC
PRODUCT_PACKAGES += \
- gps.msm8974
+ Tag \
+ com.android.nfc_extras
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/nfc/libnfc-brcm.conf:system/etc/libnfc-brcm.conf \
+ $(LOCAL_PATH)/nfc/nfcee_access.xml:system/etc/nfcee_access.xml
+
+# Power
PRODUCT_PACKAGES += \
- hwaddrs
+ power.msm8974
+# Qualcomm
PRODUCT_PACKAGES += \
+ libcnefeatureconfig \
libxml2
+# Recovery
PRODUCT_PACKAGES += \
- libcnefeatureconfig
+ librecovery_updater_g2
+# Sensors
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/configs/sensor_def_common.conf:system/etc/sensor_def_common.conf
+
+# Thermal
PRODUCT_PACKAGES += \
- lights.msm8974
+ thermanager
PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/configs/bcmdhd.cal:system/etc/wifi/bcmdhd.cal
+ $(LOCAL_PATH)/configs/thermanager.xml:system/etc/thermanager.xml
-# Panel detection script
-PRODUCT_PACKAGES += \
- panel.sh
+# Touchscreen
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/keylayout/gpio-keys.kl:system/usr/keylayout/gpio-keys.kl \
+ $(LOCAL_PATH)/keylayout/touch_dev.idc:system/usr/idc/touch_dev.idc
-# Recovery
+# Wifi
PRODUCT_PACKAGES += \
- librecovery_updater_g2
+ libwpa_client \
+ hostapd \
+ dhcpcd.conf \
+ wpa_supplicant \
+ wpa_supplicant.conf
+
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/configs/bcmdhd.cal:system/etc/wifi/bcmdhd.cal
$(call inherit-product-if-exists, hardware/broadcom/wlan/bcmdhd/config/config-bcm.mk)
-$(call inherit-product-if-exists, hardware/qcom/msm8x74/msm8x74.mk)
+# Kryten2k35 OTAUpdates
+PRODUCT_PACKAGES += \
+ OTAUpdates
+
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.ota.romname=temasek-D802 \
+ ro.ota.version=$(shell date -u +%y%m%d%H%M) \
+ ro.ota.manifest=http://temasek.wysocki.mobi/ota/d802_rom.xml
+
+# Camera
+PRODUCT_PACKAGES += \
+ Snap \
+ SnapdragonCamera
+
+# System properties
+-include $(LOCAL_PATH)/custom_prop.mk
diff --git a/gps/etc/gps.conf b/gps/etc/gps.conf
index 04d079cd..a7f36c62 100644
--- a/gps/etc/gps.conf
+++ b/gps/etc/gps.conf
@@ -24,7 +24,7 @@ NTP_SERVER=north-america.pool.ntp.org
# DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info
# 4 - Debug, 5 - Verbose
# If DEBUG_LEVEL is commented, Android's logging levels will be used
-DEBUG_LEVEL = 3
+DEBUG_LEVEL = 2
# Intermediate position report, 1=enable, 0=disable
INTERMEDIATE_POS=0
diff --git a/configs/gpio-keys.kl b/keylayout/gpio-keys.kl
similarity index 97%
rename from configs/gpio-keys.kl
rename to keylayout/gpio-keys.kl
index d7b70cf0..39ea17d8 100644
--- a/configs/gpio-keys.kl
+++ b/keylayout/gpio-keys.kl
@@ -27,6 +27,3 @@
key 115 VOLUME_UP
key 114 VOLUME_DOWN
-key 102 HOME
-key 528 FOCUS
-key 766 CAMERA
diff --git a/configs/touch_dev.idc b/keylayout/touch_dev.idc
similarity index 100%
rename from configs/touch_dev.idc
rename to keylayout/touch_dev.idc
diff --git a/nfc.mk b/nfc.mk
new file mode 100644
index 00000000..0e46f14c
--- /dev/null
+++ b/nfc.mk
@@ -0,0 +1,27 @@
+#
+# Copyright (C) 2015 The CyanogenMod Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Permissions
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.nfc.hce.xml:system/etc/permissions/android.hardware.nfc.hce.xml
+
+# NFC
+PRODUCT_PACKAGES += \
+ nfc_nci.bcm2079x.default \
+ NfcNci
+
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/nfc/libnfc-brcm-20791b05.conf:system/etc/libnfc-brcm-20791b05.conf
diff --git a/nfc/libnfc-brcm-20791b05.conf b/nfc/libnfc-brcm-20791b05.conf
new file mode 100644
index 00000000..e8be9d3b
--- /dev/null
+++ b/nfc/libnfc-brcm-20791b05.conf
@@ -0,0 +1,68 @@
+###############################################################################
+# Firmware patch file
+# If the value is not set then patch download is disabled.
+#FW_PATCH="/vendor/firmware/BCM20791B5_002.006.013.0011.0074_Generic_I2C_NCD_Signed_configdata.ncd"
+FW_PATCH="/vendor/firmware/BCM20791B5_002.006.013.0011.0098_Generic_I2C_NCD_Signed_configdata.ncd"
+
+###############################################################################
+# Firmware pre-patch file (sent before the above patch file)
+# If the value is not set then pre-patch is not used.
+#FW_PRE_PATCH="/vendor/firmware/BCM20791B5_002.006.013.0011.0074_Generic_PreI2C_NCD_Signed_configdata.ncd"
+FW_PRE_PATCH="/vendor/firmware/BCM20791B5_002.006.013.0011.0098_Generic_PreI2C_NCD_Signed_configdata.ncd"
+
+###############################################################################
+# LPTD mode configuration
+# byte[0] is the length of the remaining bytes in this value
+# if set to 0, LPTD params will NOT be sent to NFCC (i.e. disabled).
+# byte[1] is the param id it should be set to B9.
+# byte[2] is the length of the LPTD parameters
+# byte[3] indicates if LPTD is enabled
+# if set to 0, LPTD will be disabled (parameters will still be sent).
+# byte[4-n] are the LPTD parameters.
+# By default, LPTD is enabled and default settings are used.
+# See nfc_hal_dm_cfg.c for defaults
+LPTD_CFG={38:B9:36:01:00:FF:FF:06:00:00:00:A0:0F:40:00:00:12:02:10:00:00:00:2D:0B:30:00:00:00:00:00:00:00:00:00:00:00:00:00:00:03:00:D0:07:00:00:08:07:00:00:C8:00:00:00:00:00:00:00}
+
+###############################################################################
+# Startup Configuration (256 bytes maximum)
+#
+# This is applied at stack startup.
+#
+NFA_DM_START_UP_CFG={4A:CB:01:01:A5:01:01:CA:1C:00:00:00:00:0E:F0:55:00:00:0F:00:00:00:00:20:A1:07:00:14:01:00:00:10:B8:0B:06:00:02:B5:03:01:03:FF:80:01:01:C9:03:03:0F:AB:5B:01:00:B2:04:E8:03:00:00:CF:02:02:08:B1:06:00:20:00:00:40:12:AD:02:05:01}
+
+###############################################################################
+# Pre-Discovery Startup Configuration (256 bytes maximum)
+#
+# This is applied before starting Discovery the first time.
+NFA_DM_PRE_DISCOVERY_CFG={0A:C2:08:01:08:00:04:40:4B:4C:00}
+
+###############################################################################
+# Antenna Configuration - This data is used when setting 0xC8 config item
+# at startup (before discovery is started). If not used, no value is sent.
+#
+# The settings for this value are documented here:
+# http://wcgbu.broadcom.com/wpan/PM/Project%20Document%20Library/bcm20791B0/
+# Design/Doc/PHY%20register%20settings/BCM20791-B2-1027-02_PHY_Recommended_Reg_Settings.xlsx
+#
+# The values marked as ?? should be tweaked per antenna or customer/app:
+# {20:C8:1E:06:??:00:??:??:??:00:??:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:??:01:00:00:40:04}
+# array[0] = 0x20 is length of the payload from array[1] to the end
+# array[1] = 0xC8 is PREINIT_DSP_CFG
+PREINIT_DSP_CFG={20:C8:1E:06:1F:00:0A:03:30:00:04:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:4C:01:00:00:40:04}
+
+###############################################################################
+# Snooze Mode Settings
+#
+# By default snooze mode is enabled. Set SNOOZE_MODE_CFG byte[0] to 0
+# to disable.
+#
+# If SNOOZE_MODE_CFG is not provided, the default settings are used:
+# They are as follows:
+# 8 Sleep Mode (0=Disabled 1=UART 8=SPI/I2C)
+# 0 Idle Threshold Host
+# 0 Idle Threshold HC
+# 0 NFC Wake active mode (0=ActiveLow 1=ActiveHigh)
+# 1 Host Wake active mode (0=ActiveLow 1=ActiveHigh)
+#
+#SNOOZE_MODE_CFG={08:00:00:00:01}
+
diff --git a/nfc/nfcee_access_debug.xml b/nfc/nfcee_access_debug.xml
deleted file mode 100644
index a96a2d1d..00000000
--- a/nfc/nfcee_access_debug.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index fd6ad55c..413fc16b 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -19,17 +19,21 @@
-
- false
-
- #ffffffff
+ #ff00ff00
- 1000
+ 500
- 9000
+ 12000
+
+
+ true
+
+
+ true
true
@@ -44,25 +48,25 @@
-
+
- "rndis0"
-
+
- "wlan0"
-
+
- "bt-pan"
-
+
- 0
- 1
- 5
@@ -82,20 +86,13 @@
true
- 60000
+ 180000
- 60000
+ 180000
- 60000
-
-
- true
-
-
- true
+ 180000
-
+
- "wifi,1,1,1,-1,true"
- "mobile,0,0,0,-1,true"
- "mobile_mms,2,0,2,60000,true"
@@ -124,7 +121,7 @@
based on the hardware -->
-
+
- "1,1"
- "0,1"
- "7,1"
@@ -133,23 +130,41 @@
- 0
- - 7
- - 10
+ - 30
- - 7
+ - 0
+ - 30
- - 5
+ - 0
+ - 30
+
+
+
+
+ - 0
+ - 800
+
+
+
+
+ - 0
+ - 800
- false
+ true
true
@@ -181,7 +196,13 @@
true
- rmnet0
+ rmnet0
+
+
+ false
+ com.qualcomm.location
+ false
+ com.qualcomm.location
true
-
- 92
-
-
- 5
-
- 10
+ 40
+
+
+ 255
+
+
+ 90
-
- 10
+
+ 30
@@ -258,15 +276,17 @@
Spline interpolation is used to determine the auto-brightness
backlight values for LUX levels between these control points. -->
- - 1
- - 4
- 40
+ - 82
+ - 170
- 350
- - 600
+ - 500
+ - 700
- 1000
- - 1600
- - 3000
- - 10000
+ - 1400
+ - 2000
+ - 3500
+ - 5000
- - 50
- - 85
- - 95
- - 115
- - 140
- - 160
- - 175
- - 210
- - 225
- - 255
+ - 72
+ - 118
+ - 124
+ - 130
+ - 158
+ - 178
+ - 188
+ - 200
+ - 218
+ - 226
+ - 244
+ - 255
- true
-
sys.perf.profile
1
true
-
-
true
-
- 256000
-
diff --git a/overlay/frameworks/base/packages/SystemUI/res/values/config.xml b/overlay/frameworks/base/packages/SystemUI/res/values/config.xml
index fb128a9a..93b1a18b 100644
--- a/overlay/frameworks/base/packages/SystemUI/res/values/config.xml
+++ b/overlay/frameworks/base/packages/SystemUI/res/values/config.xml
@@ -21,14 +21,8 @@
for different hardware and product builds. -->
-
- true
-
- 7
+ 7
-
- false
diff --git a/overlay/packages/services/Telephony/res/values/config.xml b/overlay/packages/services/Telephony/res/values/config.xml
index fd128ceb..de63296c 100644
--- a/overlay/packages/services/Telephony/res/values/config.xml
+++ b/overlay/packages/services/Telephony/res/values/config.xml
@@ -21,5 +21,5 @@
true
- true
+ true
diff --git a/power/hint-data.c b/power/hint-data.c
index 05e4f887..67da77ad 100644
--- a/power/hint-data.c
+++ b/power/hint-data.c
@@ -41,7 +41,7 @@ int hint_compare(struct hint_data *first_hint,
}
}
-void hint_dump(__attribute__((unused)) struct hint_data *hint)
+void hint_dump(struct hint_data *hint)
{
/*ALOGI("hint_id: %lu", hint->hint_id);*/
}
diff --git a/power/hint-data.h b/power/hint-data.h
index 57455dfb..2a8113a2 100644
--- a/power/hint-data.h
+++ b/power/hint-data.h
@@ -32,8 +32,6 @@
#define DEFAULT_VIDEO_DECODE_HINT_ID (0x0B00)
#define DISPLAY_STATE_HINT_ID (0x0C00)
#define DISPLAY_STATE_HINT_ID_2 (0x0D00)
-#define DEFAULT_AUDIO_HINT_ID (0x0E00)
-#define DEFAULT_PROFILE_HINT_ID (0x0F00)
struct hint_data {
unsigned long hint_id; /* This is our key. */
diff --git a/power/metadata-defs.h b/power/metadata-defs.h
index 59b92d1f..c4649007 100644
--- a/power/metadata-defs.h
+++ b/power/metadata-defs.h
@@ -46,18 +46,9 @@ struct video_decode_metadata_t {
int state;
};
-struct audio_metadata_t {
- int hint_id;
- int state;
-};
-
int parse_metadata(char *metadata, char **metadata_saveptr,
- char *attribute, int attribute_size, char *value,
- unsigned int value_size);
+ char *attribute, int attribute_size, char *value, int value_size);
int parse_video_encode_metadata(char *metadata,
struct video_encode_metadata_t *video_encode_metadata);
int parse_video_decode_metadata(char *metadata,
struct video_decode_metadata_t *video_decode_metadata);
-int parse_audio_metadata(char *metadata,
- struct audio_metadata_t *audio_metadata);
-
diff --git a/power/metadata-parser.c b/power/metadata-parser.c
index 6e90de70..b4561848 100644
--- a/power/metadata-parser.c
+++ b/power/metadata-parser.c
@@ -34,8 +34,7 @@
#include "metadata-defs.h"
int parse_metadata(char *metadata, char **metadata_saveptr,
- char *attribute, int attribute_size, char *value,
- unsigned int value_size)
+ char *attribute, int attribute_size, char *value, int value_size)
{
char *attribute_string;
char *attribute_value_delim;
@@ -130,35 +129,3 @@ int parse_video_decode_metadata(char *metadata,
return 0;
}
-
-int parse_audio_metadata(char *metadata,
- struct audio_metadata_t *audio_metadata)
-{
- char attribute[1024], value[1024], *saveptr;
- char *temp_metadata = metadata;
- int parsing_status;
-
- while ((parsing_status = parse_metadata(temp_metadata, &saveptr,
- attribute, sizeof(attribute), value, sizeof(value))) == METADATA_PARSING_CONTINUE) {
- if (strlen(attribute) == strlen("hint_id") &&
- (strncmp(attribute, "hint_id", strlen("hint_id")) == 0)) {
- if (strlen(value) > 0) {
- audio_metadata->hint_id = atoi(value);
- }
- }
-
- if (strlen(attribute) == strlen("state") &&
- (strncmp(attribute, "state", strlen("state")) == 0)) {
- if (strlen(value) > 0) {
- audio_metadata->state = atoi(value);
- }
- }
-
- temp_metadata = NULL;
- }
-
- if (parsing_status == METADATA_PARSING_ERR)
- return -1;
-
- return 0;
-}
diff --git a/power/performance.h b/power/performance.h
index 49a4a4a3..955158f1 100644
--- a/power/performance.h
+++ b/power/performance.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, 2014, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012, 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
@@ -112,6 +112,11 @@ enum MAX_CPUS_ONLINE_LVL {
CPUS_ONLINE_MAX_LIMIT_MAX = 0x8FB,
};
+enum ALL_CPUS_FREQBOOST_LVL {
+ ALL_CPUS_FREQ_NONTURBO_MAX = 0x90A,
+ ALL_CPUS_FREQ_TURBO = 0x9FE,
+};
+
enum SAMPLING_RATE_LVL {
MS_500 = 0xBCD,
MS_50 = 0xBFA,
@@ -128,7 +133,6 @@ enum ONDEMAND_SAMPLING_DOWN_FACTOR_LVL {
SAMPLING_DOWN_FACTOR_4 = 0xD04,
};
-
enum INTERACTIVE_TIMER_RATE_LVL {
TR_MS_500 = 0xECD,
TR_MS_100 = 0xEF5,
@@ -137,26 +141,6 @@ enum INTERACTIVE_TIMER_RATE_LVL {
TR_MS_20 = 0xEFD,
};
-/* This timer rate applicable to cpu0
- across 8939 series chipset */
-enum INTERACTIVE_TIMER_RATE_LVL_CPU0_8939 {
- TR_MS_CPU0_500 = 0x30CD,
- TR_MS_CPU0_100 = 0x30F5,
- TR_MS_CPU0_50 = 0x30FA,
- TR_MS_CPU0_30 = 0x30FC,
- TR_MS_CPU0_20 = 0x30FD,
-};
-
-/* This timer rate applicable to cpu4
- across 8939 series chipset */
-enum INTERACTIVE_TIMER_RATE_LVL_CPU4_8939 {
- TR_MS_CPU4_500 = 0x3B0CD,
- TR_MS_CPU4_100 = 0x3BF5,
- TR_MS_CPU4_50 = 0x3BFA,
- TR_MS_CPU4_30 = 0x3BFC,
- TR_MS_CPU4_20 = 0x3BFD,
-};
-
enum INTERACTIVE_HISPEED_FREQ_LVL {
HS_FREQ_1026 = 0xF0A,
};
@@ -182,8 +166,7 @@ enum OPTIMAL_FREQ_LVL {
};
enum SCREEN_PWR_CLPS_LVL {
- PWR_CLPS_DIS = 0x1300,
- PWR_CLPS_ENA = 0x1301,
+ PWR_CLPS_DIS = 0x1301,
};
enum THREAD_MIGRATION_LVL {
@@ -194,56 +177,6 @@ enum INTERACTIVE_IO_BUSY_LVL {
INTERACTIVE_IO_BUSY_OFF = 0x1B00,
INTERACTIVE_IO_BUSY_ON = 0x1B01,
};
-
-enum SCHED_BOOST_LVL {
- SCHED_BOOST_ON = 0x1E01,
-};
-
-enum CPU4_MIN_FREQ_LVL {
- CPU4_MIN_FREQ_NONTURBO_MAX = 0x1F0A,
- CPU4_MIN_FREQ_TURBO_MAX = 0x1FFE,
-};
-
-enum CPU5_MIN_FREQ_LVL {
- CPU5_MIN_FREQ_NONTURBO_MAX = 0x200A,
- CPU5_MIN_FREQ_TURBO_MAX = 0x20FE,
-};
-
-enum CPU6_MIN_FREQ_LVL {
- CPU6_MIN_FREQ_NONTURBO_MAX = 0x210A,
- CPU6_MIN_FREQ_TURBO_MAX = 0x21FE,
-};
-
-enum CPU7_MIN_FREQ_LVL {
- CPU7_MIN_FREQ_NONTURBO_MAX = 0x220A,
- CPU7_MIN_FREQ_TURBO_MAX = 0x22FE,
-};
-
-enum CPU4_MAX_FREQ_LVL {
- CPU4_MAX_FREQ_NONTURBO_MAX = 0x230A,
-};
-
-enum CPU5_MAX_FREQ_LVL {
- CPU5_MAX_FREQ_NONTURBO_MAX = 0x240A,
-};
-
-enum CPU6_MAX_FREQ_LVL {
- CPU6_MAX_FREQ_NONTURBO_MAX = 0x250A,
-};
-
-enum CPU7_MAX_FREQ_LVL {
- CPU7_MAX_FREQ_NONTURBO_MAX = 0x260A,
-};
-
-enum SCHED_PREFER_IDLE {
- SCHED_PREFER_IDLE_DIS = 0x3E01,
-};
-
-enum SCHED_MIGRATE_COST_CHNG {
- SCHED_MIGRATE_COST_SET = 0x3F01,
-};
-
-
#ifdef __cplusplus
}
#endif
diff --git a/power/power-8974.c b/power/power-8974.c
index bdb017a3..7aa15294 100644
--- a/power/power-8974.c
+++ b/power/power-8974.c
@@ -1,6 +1,5 @@
/*
* Copyright (c) 2013, The Linux Foundation. All rights reserved.
- * Copyright (c) 2014, The CyanogenMod Project
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -53,83 +52,7 @@ static int display_hint2_sent;
static int first_display_off_hint;
extern int display_boost;
-enum {
- PROFILE_POWER_SAVE = 0,
- PROFILE_BALANCED,
- PROFILE_HIGH_PERFORMANCE
-};
-
-static int current_power_profile = PROFILE_BALANCED;
-
-static void set_power_profile(int profile) {
-
- if (profile == current_power_profile)
- return;
-
- ALOGV("%s: profile=%d", __func__, profile);
-
- if (current_power_profile != PROFILE_BALANCED) {
- undo_hint_action(DEFAULT_PROFILE_HINT_ID);
- ALOGV("%s: hint undone", __func__);
- }
-
- if (profile == PROFILE_HIGH_PERFORMANCE) {
- int resource_values[] = { CPUS_ONLINE_MIN_4,
- CPU0_MIN_FREQ_TURBO_MAX, CPU1_MIN_FREQ_TURBO_MAX,
- CPU2_MIN_FREQ_TURBO_MAX, CPU3_MIN_FREQ_TURBO_MAX };
- perform_hint_action(DEFAULT_PROFILE_HINT_ID,
- resource_values, sizeof(resource_values)/sizeof(resource_values[0]));
- ALOGD("%s: set performance mode", __func__);
-
- } else if (profile == PROFILE_POWER_SAVE) {
- int resource_values[] = { CPUS_ONLINE_MAX_LIMIT_2,
- CPU0_MAX_FREQ_NONTURBO_MAX, CPU1_MAX_FREQ_NONTURBO_MAX,
- CPU2_MAX_FREQ_NONTURBO_MAX, CPU3_MAX_FREQ_NONTURBO_MAX };
- perform_hint_action(DEFAULT_PROFILE_HINT_ID,
- resource_values, sizeof(resource_values)/sizeof(resource_values[0]));
- ALOGD("%s: set powersave", __func__);
- }
-
- current_power_profile = profile;
-}
-
-extern void interaction(int duration, int num_args, int opt_list[]);
-
-int power_hint_override(__attribute__((unused)) struct power_module *module,
- power_hint_t hint, void *data)
-{
- if (hint == POWER_HINT_SET_PROFILE) {
- set_power_profile((int)data);
- return HINT_HANDLED;
- }
-
- if (hint == POWER_HINT_LOW_POWER) {
- if (current_power_profile == PROFILE_POWER_SAVE) {
- set_power_profile(PROFILE_BALANCED);
- } else {
- set_power_profile(PROFILE_POWER_SAVE);
- }
- }
-
- // Skip other hints in custom power modes
- if (current_power_profile != PROFILE_BALANCED) {
- return HINT_HANDLED;
- }
-
- if (hint == POWER_HINT_CPU_BOOST) {
- int duration = (int)data / 1000;
- int resources[] = { CPUS_ONLINE_MIN_2, 0x20B, 0x30B };
-
- if (duration > 0)
- interaction(duration, sizeof(resources)/sizeof(resources[0]), resources);
-
- return HINT_HANDLED;
- }
-
- return HINT_NONE;
-}
-
-int set_interactive_override(struct power_module *module __unused, int on)
+int set_interactive_override(struct power_module *module, int on)
{
char governor[80];
diff --git a/power/power-common.h b/power/power-common.h
index c352441a..c00ce4e3 100644
--- a/power/power-common.h
+++ b/power/power-common.h
@@ -33,8 +33,6 @@
#define DCVS_CPU0_SLACK_MIN_NODE "/sys/module/msm_dcvs/cores/cpu0/slack_time_min_us"
#define MPDECISION_SLACK_MAX_NODE "/sys/module/msm_mpdecision/slack_time_max_us"
#define MPDECISION_SLACK_MIN_NODE "/sys/module/msm_mpdecision/slack_time_min_us"
-#define SCALING_MIN_FREQ "/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq"
-#define GO_HISPEED_LOAD_PATH "/sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load"
#define ONDEMAND_GOVERNOR "ondemand"
#define INTERACTIVE_GOVERNOR "interactive"
@@ -42,5 +40,3 @@
#define HINT_HANDLED (0)
#define HINT_NONE (-1)
-
-#define OFF_HIGHSPEED_LOAD 110
diff --git a/power/power.c b/power/power.c
index 237ee432..73d9e712 100644
--- a/power/power.c
+++ b/power/power.c
@@ -1,6 +1,5 @@
/*
* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
- * Copyright (c) 2014, The CyanogenMod Project
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -42,7 +41,6 @@
#include
#include
#include
-#include
#include "utils.h"
#include "metadata-defs.h"
@@ -57,17 +55,13 @@ static int saved_mpdecision_slack_min = -1;
static int saved_interactive_mode = -1;
static int slack_node_rw_failed = 0;
static int display_hint_sent;
-static int go_hispeed_load = 0;
-static int off_hispeed_load = OFF_HIGHSPEED_LOAD;
int display_boost;
static struct hw_module_methods_t power_module_methods = {
.open = NULL,
};
-static pthread_mutex_t hint_mutex = PTHREAD_MUTEX_INITIALIZER;
-
-static void power_init(__attribute__((unused))struct power_module *module)
+static void power_init(struct power_module *module)
{
ALOGI("QCOM power HAL initing.");
@@ -80,7 +74,7 @@ static void power_init(__attribute__((unused))struct power_module *module)
ALOGW("Unable to read soc_id");
} else {
int soc_id = atoi(buf);
- if (soc_id == 194 || (soc_id >= 208 && soc_id <= 218) || soc_id == 178) {
+ if (soc_id == 194 || (soc_id >= 208 && soc_id <= 218)) {
display_boost = 1;
}
}
@@ -194,34 +188,31 @@ static void process_video_encode_hint(void *metadata)
}
}
-int __attribute__ ((weak)) power_hint_override(
- __attribute__((unused)) struct power_module *module,
- __attribute__((unused)) power_hint_t hint,
- __attribute__((unused)) void *data)
+int __attribute__ ((weak)) power_hint_override(struct power_module *module, power_hint_t hint,
+ void *data)
{
return HINT_NONE;
}
-extern void interaction(int duration, int num_args, int opt_list[]);
-
-static void power_hint(__attribute__((unused)) struct power_module *module, power_hint_t hint,
+static void power_hint(struct power_module *module, power_hint_t hint,
void *data)
{
- pthread_mutex_lock(&hint_mutex);
-
/* Check if this hint has been overridden. */
if (power_hint_override(module, hint, data) == HINT_HANDLED) {
/* The power_hint has been handled. We can skip the rest. */
- goto out;
+ return;
}
switch(hint) {
case POWER_HINT_VSYNC:
+ break;
case POWER_HINT_INTERACTION:
- case POWER_HINT_CPU_BOOST:
- case POWER_HINT_AUDIO:
- case POWER_HINT_SET_PROFILE:
- case POWER_HINT_LOW_POWER:
+ {
+ int resources[] = {0x702, 0x20F, 0x30F};
+ int duration = 3000;
+
+ interaction(duration, sizeof(resources)/sizeof(resources[0]), resources);
+ }
break;
case POWER_HINT_VIDEO_ENCODE:
process_video_encode_hint(data);
@@ -229,38 +220,14 @@ static void power_hint(__attribute__((unused)) struct power_module *module, powe
case POWER_HINT_VIDEO_DECODE:
process_video_decode_hint(data);
break;
- break;
}
-
-out:
- pthread_mutex_unlock(&hint_mutex);
}
-int __attribute__ ((weak)) set_interactive_override(
- __attribute__((unused)) struct power_module *module,
- __attribute__((unused)) int on)
+int __attribute__ ((weak)) set_interactive_override(struct power_module *module, int on)
{
return HINT_NONE;
}
-static void cm_power_set_interactive_ext(int on)
-{
- char tmp_str[NODE_MAX];
- int tmp;
-
- if (sysfs_read(GO_HISPEED_LOAD_PATH, tmp_str, NODE_MAX - 1)) {
- return;
- }
-
- tmp = atoi(tmp_str);
- if (!go_hispeed_load || (go_hispeed_load != tmp && off_hispeed_load != tmp)) {
- go_hispeed_load = tmp;
- }
-
- snprintf(tmp_str, NODE_MAX, "%d", on ? go_hispeed_load : off_hispeed_load);
- sysfs_write(GO_HISPEED_LOAD_PATH, tmp_str);
-}
-
void set_interactive(struct power_module *module, int on)
{
char governor[80];
@@ -268,19 +235,16 @@ void set_interactive(struct power_module *module, int on)
struct video_encode_metadata_t video_encode_metadata;
int rc;
- pthread_mutex_lock(&hint_mutex);
-
- cm_power_set_interactive_ext(on);
-
if (set_interactive_override(module, on) == HINT_HANDLED) {
- goto out;
+ return;
}
ALOGI("Got set_interactive hint");
if (get_scaling_governor(governor, sizeof(governor)) == -1) {
ALOGE("Can't obtain scaling governor.");
- goto out;
+
+ return;
}
if (!on) {
@@ -296,7 +260,7 @@ void set_interactive(struct power_module *module, int on)
}
} else if ((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) &&
(strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) {
- int resource_values[] = {THREAD_MIGRATION_SYNC_OFF};
+ int resource_values[] = {TR_MS_50, THREAD_MIGRATION_SYNC_OFF};
if (!display_hint_sent) {
perform_hint_action(DISPLAY_STATE_HINT_ID,
@@ -467,9 +431,6 @@ void set_interactive(struct power_module *module, int on)
}
saved_interactive_mode = !!on;
-
-out:
- pthread_mutex_unlock(&hint_mutex);
}
struct power_module HAL_MODULE_INFO_SYM = {
@@ -479,7 +440,7 @@ struct power_module HAL_MODULE_INFO_SYM = {
.hal_api_version = HARDWARE_HAL_API_VERSION,
.id = POWER_HARDWARE_MODULE_ID,
.name = "QCOM Power HAL",
- .author = "Qualcomm/CyanogenMod",
+ .author = "Qualcomm",
.methods = &power_module_methods,
},
diff --git a/power/utils.c b/power/utils.c
index 4c910c63..5c7863e8 100644
--- a/power/utils.c
+++ b/power/utils.c
@@ -44,9 +44,7 @@ static void *qcopt_handle;
static int (*perf_lock_acq)(unsigned long handle, int duration,
int list[], int numArgs);
static int (*perf_lock_rel)(unsigned long handle);
-static int (*perf_lock_use_profile)(unsigned long handle, int profile);
static struct list_node active_hint_list_head;
-static int profile_handle = 0;
static void *get_qcopt_handle()
{
@@ -89,8 +87,6 @@ static void __attribute__ ((constructor)) initialize(void)
if (!perf_lock_rel) {
ALOGE("Unable to get perf_lock_rel function handle.\n");
}
-
- perf_lock_use_profile = dlsym(qcopt_handle, "perf_lock_use_profile");
}
}
@@ -177,9 +173,10 @@ int get_scaling_governor(char governor[], int size)
void interaction(int duration, int num_args, int opt_list[])
{
+#ifdef INTERACTION_BOOST
static int lock_handle = 0;
- if (duration <= 0 || num_args < 1 || opt_list[0] == 0)
+ if (duration < 0 || num_args < 1 || opt_list[0] == NULL)
return;
if (qcopt_handle) {
@@ -189,6 +186,7 @@ void interaction(int duration, int num_args, int opt_list[])
ALOGE("Failed to acquire lock.");
}
}
+#endif
}
void perform_hint_action(int hint_id, int resource_values[], int num_resources)
@@ -284,17 +282,3 @@ void undo_initial_hint_action()
}
}
}
-
-/* Set a static profile */
-void set_profile(int profile)
-{
- if (qcopt_handle) {
- if (perf_lock_use_profile) {
- profile_handle = perf_lock_use_profile(profile_handle, profile);
- if (profile_handle == -1)
- ALOGE("Failed to set profile.");
- if (profile < 0)
- profile_handle = 0;
- }
- }
-}
diff --git a/power/utils.h b/power/utils.h
index cc922729..cd12c15c 100644
--- a/power/utils.h
+++ b/power/utils.h
@@ -40,5 +40,3 @@ void unvote_ondemand_sdf_low();
void perform_hint_action(int hint_id, int resource_values[],
int num_resources);
void undo_hint_action(int hint_id);
-void undo_initial_hint_action();
-void set_profile(int profile);
diff --git a/proprietary-files.txt b/proprietary-files.txt
new file mode 100644
index 00000000..01f6143e
--- /dev/null
+++ b/proprietary-files.txt
@@ -0,0 +1,314 @@
+-app/qcrilmsgtunnel/qcrilmsgtunnel.apk
+-app/TimeService/TimeService.apk
+bin/bridgemgrd
+bin/btnvtool
+bin/gsiff_daemon
+bin/hci_qcomm_init
+bin/hvdcp
+bin/irsc_util
+bin/location-mq
+bin/loc_launcher
+bin/lowi-server
+bin/mm-pp-daemon
+bin/mm-qcamera-daemon
+bin/mpdecision
+bin/netmgrd
+bin/qmuxd
+bin/quipc_igsn
+bin/quipc_main
+bin/qseecomd
+bin/radish
+bin/rmt_storage
+bin/sensors.qcom
+bin/thermal-engine
+bin/time_daemon
+bin/xtwifi-client
+bin/xtwifi-inet-agent
+etc/acdbdata/Bluetooth_cal.acdb
+etc/acdbdata/General_cal.acdb
+etc/acdbdata/Global_cal.acdb
+etc/acdbdata/Handset_cal.acdb
+etc/acdbdata/Hdmi_cal.acdb
+etc/acdbdata/Headset_cal.acdb
+etc/acdbdata/Speaker_cal.acdb
+etc/firmware/a330_pfp.fw
+etc/firmware/a330_pm4.fw
+etc/firmware/cpp_firmware_v1_1_1.fw
+etc/firmware/cpp_firmware_v1_1_6.fw
+etc/firmware/cpp_firmware_v1_2_0.fw
+etc/firmware/cpp_firmware_v1_2_1.fw
+etc/firmware/fw_bcmdhd_apsta.bin
+etc/firmware/fw_bcmdhd.bin
+etc/firmware/fw_bcmdhd_mfg.bin
+etc/firmware/venus.b00
+etc/firmware/venus.b01
+etc/firmware/venus.b02
+etc/firmware/venus.b03
+etc/firmware/venus.b04
+etc/firmware/venus.mbn
+etc/firmware/venus.mdt
+etc/permissions/qcrilhook.xml
+etc/permissions/qcnvitems.xml
+etc/permissions/com.qualcomm.location.xml
+-framework/qcnvitems.jar
+-framework/qcrilhook.jar
+lib/drm/libdrmwvmplugin.so
+lib/hw/camera.vendor.msm8974.so
+lib/hw/consumerir.msm8974.so
+lib/libchromatix_imx135_liveshot.so
+lib/libcir_driver.so
+lib/libdivxdrm_jni.so
+lib/libdivxdrmdecrypt.so
+lib/libdrmframework.so
+lib/libdrmframework_jni.so
+lib/libHDR.so
+lib/libloc_api_v02.so
+lib/libloc_ds_api.so
+lib/libmdmdetect.so
+lib/libmmcamera_interface.so
+lib/libmmjpeg_interface.so
+lib/libmm-qcamera.so
+lib/libmorphoimageconverter_4.so
+lib/libmorpho_image_stab31.so
+lib/libmorpho_memory_allocator.so
+lib/libmorpho_noise_reduction.so
+lib/libmorpho_panorama_gp.so
+lib/libmorpho_panorama_wa_4.so
+lib/libmorpho_panorama_wa_viewer.so
+lib/libmorpho_sensor_fusion_4.so
+lib/libmorpho_video_denoiser.so
+lib/libOmxVdecHevc.so
+lib/libqomx_core.so
+lib/libril.so
+lib/libuicc.so
+lib/libVDObjectTrackerAPI.so
+lib/libvss_bsp_qcci.so
+lib/libvss_common_core.so
+lib/libvss_common_idl.so
+lib/libvss_common_iface.so
+lib/libvss_dmi_qcci.so
+lib/libvss_gnss_qcci.so
+lib/libvss_ims_qcci.so
+lib/libvss_nv_core.so
+lib/libvss_nv_idl.so
+lib/libvss_nv_iface.so
+lib/libvss_resim_core.so
+lib/libvss_resim_idl.so
+lib/libvss_resim_iface.so
+lib/libvss_sar_qcci.so
+-priv-app/com.qualcomm.location/com.qualcomm.location.apk
+vendor/bin/slim_ap_daemon
+vendor/firmware/BCM4335B0_002.001.006.0191.0201_ORC.hcd
+vendor/lib/drm/libdrmwvmplugin.so
+vendor/lib/egl/eglsubAndroid.so
+vendor/lib/egl/libEGL_adreno.so
+vendor/lib/egl/libGLESv1_CM_adreno.so
+vendor/lib/egl/libGLESv2_adreno.so
+vendor/lib/egl/libq3dtools_adreno.so
+vendor/lib/hw/activity_recognition.msm8974.so
+vendor/lib/hw/flp.default.so
+vendor/lib/hw/sensors.msm8974.so
+vendor/lib/libacdbloader.so
+vendor/lib/libacdbmapper.so
+vendor/lib/libacdbrtac.so
+vendor/lib/libactuator_dw9714.so
+vendor/lib/libactuator_dw9714_camcorder.so
+vendor/lib/libactuator_dw9714_camera.so
+vendor/lib/libactuator_dw9714_lgaf_1.so
+vendor/lib/libactuator_dw9714_lgaf_1_camcorder.so
+vendor/lib/libactuator_dw9714_lgaf_1_camera.so
+vendor/lib/libactuator_dw9716.so
+vendor/lib/libactuator_dw9716_camcorder.so
+vendor/lib/libactuator_dw9716_camera.so
+vendor/lib/libactuator_iu074.so
+vendor/lib/libactuator_iu074_camcorder.so
+vendor/lib/libactuator_iu074_camera.so
+vendor/lib/libactuator_ov12830.so
+vendor/lib/libactuator_ov12830_camcorder.so
+vendor/lib/libactuator_ov12830_camera.so
+vendor/lib/libactuator_ov8825.so
+vendor/lib/libactuator_ov8825_camcorder.so
+vendor/lib/libactuator_ov8825_camera.so
+vendor/lib/libactuator_rohm_bu64243gwz.so
+vendor/lib/libactuator_rohm_bu64243gwz_camcorder.so
+vendor/lib/libactuator_rohm_bu64243gwz_camera.so
+vendor/lib/libadiertac.so
+vendor/lib/libadreno_utils.so
+vendor/lib/libadsprpc.so
+vendor/lib/libalarmservice_jni.so
+vendor/lib/libasn1cper.so
+vendor/lib/libasn1crt.so
+vendor/lib/libasn1crtx.so
+vendor/lib/libaudcal.so
+vendor/lib/libaudioalsa.so
+vendor/lib/libbccQTI.so
+vendor/lib/libbtnv.so
+vendor/lib/libC2D2.so
+vendor/lib/libc2d30-a3xx.so
+vendor/lib/libc2d30-a4xx.so
+vendor/lib/libCB.so
+vendor/lib/libchromaflash.so
+vendor/lib/libchromatix_imx132_common.so
+vendor/lib/libchromatix_imx132_default_video.so
+vendor/lib/libchromatix_imx132_mms_video.so
+vendor/lib/libchromatix_imx132_preview.so
+vendor/lib/libchromatix_imx132_vt.so
+vendor/lib/libchromatix_imx135_common.so
+vendor/lib/libchromatix_imx135_default_video.so
+vendor/lib/libchromatix_imx135_hfr_120.so
+vendor/lib/libchromatix_imx135_hfr_60.so
+vendor/lib/libchromatix_imx135_mms_video.so
+vendor/lib/libchromatix_imx135_preview.so
+vendor/lib/libchromatix_imx135_snapshot.so
+vendor/lib/libchromatix_imx135_uhd_video.so
+vendor/lib/libchromatix_imx135_video_dualrec.so
+vendor/lib/libchromatix_imx135_video_hdr.so
+vendor/lib/libchromatix_imx135_video_hd.so
+vendor/lib/libchromatix_imx135_video_qtr.so
+vendor/lib/libcneapiclient.so
+vendor/lib/libcneconn.so
+vendor/lib/libcneqmiutils.so
+vendor/lib/libCommandSvc.so
+vendor/lib/libconfigdb.so
+vendor/lib/libdiag.so
+vendor/lib/libdisp-aba.so
+vendor/lib/libdrmdecrypt.so
+vendor/lib/libdrmdiag.so
+vendor/lib/libdrmfs.so
+vendor/lib/libdrmtime.so
+vendor/lib/libdsi_netctrl.so
+vendor/lib/libdsucsd.so
+vendor/lib/libdsutils.so
+vendor/lib/libfastcvadsp_stub.so
+vendor/lib/libfastcvopt.so
+vendor/lib/libFileMux.so
+vendor/lib/libgeofence.so
+vendor/lib/libgsl.so
+vendor/lib/libHevcSwDecoder.so
+vendor/lib/libI420colorconvert.so
+vendor/lib/libidl.so
+vendor/lib/libizat_core.so
+vendor/lib/libjpegdhw.so
+vendor/lib/libjpegehw.so
+vendor/lib/liblbs_core.so
+vendor/lib/libllvm-qcom.so
+vendor/lib/liblocationservice.so
+vendor/lib/liblowi_client.so
+vendor/lib/libmm-abl-oem.so
+vendor/lib/libmm-abl.so
+vendor/lib/libmmcamera2_c2d_module.so
+vendor/lib/libmmcamera2_cpp_module.so
+vendor/lib/libmmcamera2_frame_algorithm.so
+vendor/lib/libmmcamera2_iface_modules.so
+vendor/lib/libmmcamera2_imglib_modules.so
+vendor/lib/libmmcamera2_isp_modules.so
+vendor/lib/libmmcamera2_is.so
+vendor/lib/libmmcamera2_pproc_modules.so
+vendor/lib/libmmcamera2_sensor_modules.so
+vendor/lib/libmmcamera2_stats_algorithm.so
+vendor/lib/libmmcamera2_stats_modules.so
+vendor/lib/libmmcamera2_vpe_module.so
+vendor/lib/libmmcamera2_wnr_module.so
+vendor/lib/libmmcamera_chromaflash_lib.so
+vendor/lib/libmmcamera_faceproc.so
+vendor/lib/libmmcamera_hdr_gb_lib.so
+vendor/lib/libmmcamera_hdr_lib.so
+vendor/lib/libmmcamera_imglib.so
+vendor/lib/libmmcamera_imx132.so
+vendor/lib/libmmcamera_imx135.so
+vendor/lib/libmmcamera_sonyimx135_eeprom.so
+vendor/lib/libmmcamera_tintless_algo.so
+vendor/lib/libmmcamera_tintless_bg_pca_algo.so
+vendor/lib/libmmcamera_tuning.so
+vendor/lib/libmmcamera_ubifocus_lib.so
+vendor/lib/libmmcamera_wavelet_lib.so
+vendor/lib/libmm-color-convertor.so
+vendor/lib/libmm-hdcpmgr.so
+vendor/lib/libmmipl.so
+vendor/lib/libmmipstreamaal.so
+vendor/lib/libmmipstreamnetwork.so
+vendor/lib/libmmipstreamsourcehttp.so
+vendor/lib/libmmipstreamutils.so
+vendor/lib/libmmjpeg.so
+vendor/lib/libmmqjpeg_codec.so
+vendor/lib/libmsapm_jni.so
+vendor/lib/libnetmgr.so
+vendor/lib/liboemcamera.so
+vendor/lib/libOmxAacDec.so
+vendor/lib/libOmxAmrwbplusDec.so
+vendor/lib/libOmxEvrcDec.so
+vendor/lib/libOmxMux.so
+vendor/lib/libOmxQcelp13Dec.so
+vendor/lib/libOmxWmaDec.so
+vendor/lib/libOpenCL.so
+vendor/lib/libperipheral_client.so
+vendor/lib/libqcci_legacy.so
+vendor/lib/libqdi.so
+vendor/lib/libqdp.so
+vendor/lib/libqmi_cci.so
+vendor/lib/libqmi_client_helper.so
+vendor/lib/libqmi_client_qmux.so
+vendor/lib/libqmi_common_so.so
+vendor/lib/libqmi_csi.so
+vendor/lib/libqmi_csvt_srvc.so
+vendor/lib/libqmi_encdec.so
+vendor/lib/libqmiservices.so
+vendor/lib/libqmi.so
+vendor/lib/libqomx_jpegdec.so
+vendor/lib/libqomx_jpegenc.so
+vendor/lib/libQSEEComAPI.so
+vendor/lib/libqti-perfd-client.so
+vendor/lib/libquipc_os_api.so
+vendor/lib/libquipc_ulp_adapter.so
+vendor/lib/libril-qc-qmi-1.so
+vendor/lib/libril-qcril-hook-oem.so
+vendor/lib/librpmb.so
+vendor/lib/librs_adreno_sha1.so
+vendor/lib/librs_adreno.so
+vendor/lib/libRSDriver_adreno.so
+vendor/lib/libscale.so
+vendor/lib/libscve.so
+vendor/lib/libscve_stub.so
+vendor/lib/libsc-a2xx.so
+vendor/lib/libsc-a3xx.so
+vendor/lib/libSecureUILib.so
+vendor/lib/libsecureui.so
+vendor/lib/libsecureui_svcsock.so
+vendor/lib/libsecureuisvc_jni.so
+vendor/lib/libsensor1.so
+vendor/lib/libsensor_reg.so
+vendor/lib/libsensor_test.so
+vendor/lib/libsensor_thresh.so
+vendor/lib/libsensor_user_cal.so
+vendor/lib/libsmemlog.so
+vendor/lib/libssd.so
+vendor/lib/libSSEPKCS11.so
+vendor/lib/libStDrvInt.so
+vendor/lib/libstlport_sh_521.so
+vendor/lib/libsystem_health_mon.so
+vendor/lib/lib-sec-disp.so
+vendor/lib/libthermalclient.so
+vendor/lib/libthermalioctl.so
+-vendor/lib/libtime_genoff.so
+vendor/lib/libTimeService.so
+vendor/lib/libubifocus.so
+vendor/lib/libulp2.so
+vendor/lib/libvendorconn.so
+vendor/lib/libwifiscanner.so
+vendor/lib/libwvdrm_L1.so
+vendor/lib/libwvm.so
+vendor/lib/libWVphoneAPI.so
+vendor/lib/libWVStreamControlAPI_L1.so
+vendor/lib/libxml.so
+vendor/lib/libxtadapter.so
+vendor/lib/libxtwifi_ulp_adaptor.so
+vendor/lib/libxtwifi_zpp_adaptor.so
+vendor/lib/mediadrm/libwvdrmengine.so
+vendor/lib/rfsa/adsp/libapps_mem_heap.so
+vendor/lib/rfsa/adsp/libdspCV_skel.so
+vendor/lib/rfsa/adsp/libfastcvadsp_skel.so
+vendor/lib/rfsa/adsp/libfastcvadsp.so
+vendor/lib/rfsa/adsp/libscveT2T_skel.so
+vendor/lib/soundfx/libqcbassboost.so
+vendor/lib/soundfx/libqcreverb.so
+vendor/lib/soundfx/libqcvirt.so
diff --git a/rootdir/Android.mk b/rootdir/Android.mk
index ea468dd7..1b1f6995 100644
--- a/rootdir/Android.mk
+++ b/rootdir/Android.mk
@@ -1,30 +1,29 @@
LOCAL_PATH := $(call my-dir)
-# Device init files
+# Configuration scripts
include $(CLEAR_VARS)
-LOCAL_MODULE := fstab.g2
-LOCAL_MODULE_TAGS := optional eng
-LOCAL_MODULE_CLASS := ETC
-LOCAL_SRC_FILES := etc/fstab.g2
-LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
+LOCAL_MODULE := set_baseband.sh
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := etc/set_baseband.sh
include $(BUILD_PREBUILT)
# Init scripts
include $(CLEAR_VARS)
-LOCAL_MODULE := init.g2.rc
+LOCAL_MODULE := fstab.g2
LOCAL_MODULE_TAGS := optional eng
LOCAL_MODULE_CLASS := ETC
-LOCAL_SRC_FILES := etc/init.g2.rc
+LOCAL_SRC_FILES := etc/fstab.g2
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
-LOCAL_MODULE := init.g2.usb.rc
+LOCAL_MODULE := init.g2.rc
LOCAL_MODULE_TAGS := optional eng
LOCAL_MODULE_CLASS := ETC
-LOCAL_SRC_FILES := etc/init.g2.usb.rc
+LOCAL_SRC_FILES := etc/init.g2.rc
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
include $(BUILD_PREBUILT)
@@ -37,13 +36,21 @@ LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
-LOCAL_MODULE := init.qcom.sh
+LOCAL_MODULE := init.g2.usb.rc
LOCAL_MODULE_TAGS := optional eng
LOCAL_MODULE_CLASS := ETC
-LOCAL_SRC_FILES := etc/init.qcom.sh
+LOCAL_SRC_FILES := etc/init.g2.usb.rc
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
include $(BUILD_PREBUILT)
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.recovery.g2.rc
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := etc/init.g2.power.rc
+LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)
+include $(BUILD_PREBUILT)
+
include $(CLEAR_VARS)
LOCAL_MODULE := ueventd.g2.rc
LOCAL_MODULE_TAGS := optional eng
diff --git a/rootdir/etc/fstab.g2 b/rootdir/etc/fstab.g2
index 601edf3f..2de00597 100644
--- a/rootdir/etc/fstab.g2
+++ b/rootdir/etc/fstab.g2
@@ -9,13 +9,14 @@
/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait,check
-/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue wait,check,encryptable=/dev/block/platform/msm_sdcc.1/by-name/encrypt
+/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue,journal_async_commit wait,check,encryptable=/dev/block/platform/msm_sdcc.1/by-name/encrypt
/dev/block/platform/msm_sdcc.1/by-name/userdata /data f2fs rw,discard,nosuid,nodev,noatime,nodiratime,inline_xattr wait,check,encryptable=/dev/block/platform/msm_sdcc.1/by-name/encrypt
-/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue wait
+/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue,journal_async_commit wait
/dev/block/platform/msm_sdcc.1/by-name/cache /cache f2fs rw,discard,nosuid,nodev,noatime,nodiratime,inline_xattr wait,check
-/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue wait
+/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue wait,notrim
/dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait
-/dev/block/platform/msm_sdcc.1/by-name/sns /sns ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue wait
-/dev/block/platform/msm_sdcc.1/by-name/drm /persist-lg ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue wait
-/dev/block/platform/msm_sdcc.1/by-name/mpt /mpt ext4 nodev,nosuid,barrier=1,noauto_da_alloc,errors=continue wait
+/dev/block/platform/msm_sdcc.1/by-name/sns /sns ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue wait,notrim
+/dev/block/platform/msm_sdcc.1/by-name/drm /persist-lg ext4 nosuid,nodev,barrier=1,noauto_da_alloc,errors=continue wait,notrim
+/dev/block/platform/msm_sdcc.1/by-name/mpt /mpt ext4 nodev,nosuid,barrier=1,noauto_da_alloc,errors=continue wait,notrim
/devices/platform/xhci-hcd auto auto defaults voldmanaged=usbdisk0:auto
+/dev/block/zram0 none swap defaults wait
diff --git a/rootdir/etc/init.g2.power.rc b/rootdir/etc/init.g2.power.rc
index 3e069794..a261a82a 100644
--- a/rootdir/etc/init.g2.power.rc
+++ b/rootdir/etc/init.g2.power.rc
@@ -1,18 +1,82 @@
-on early-init
- write /sys/block/mmcblk0/queue/scheduler bfq
- write /sys/block/mmcblk0/bdi/read_ahead_kb 1024
- write /sys/class/mmc_host/mmc0/clk_scaling/scale_down_in_low_wr_load 0
+on property:sys.boot_completed=1
+ setprop sys.io.scheduler zen
+ write /sys/block/mmcblk0/queue/scheduler zen
+ write /sys/block/mmcblk0/bdi/read_ahead_kb 512
write /sys/module/cpu_boost/parameters/input_boost_ms 0
write /sys/kernel/sched/arch_power 0
write /sys/kernel/sched/gentle_fair_sleepers 0
- 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
+ setprop sys.perf.profile 1
+
+ # Lower GPU
+ write /sys/devices/fdb00000.qcom,kgsl-3d0/devfreq/fdb00000.qcom,kgsl-3d0/max_freq 320000000
+
+ # Tune entropy parameters
+ write /proc/sys/kernel/random/read_wakeup_threshold 128
+ write /proc/sys/kernel/random/write_wakeup_threshold 256
+
+ # VM
+ write /proc/sys/vm/block_dump 0
+ write /proc/sys/vm/dirty_background_ratio 5
+ write /proc/sys/vm/dirty_expire_centisecs 500
+ write /proc/sys/vm/dirty_ratio 10
+ write /proc/sys/vm/dirty_writeback_centisecs 3000
+ write /proc/sys/vm/min_free_kbytes 4608
+ write /proc/sys/vm/min_free_order_shift 4
+ write /proc/sys/vm/oom_dump_tasks 1
+ write /proc/sys/vm/oom_kill_allocating_task 1
+ write /proc/sys/vm/overcommit_memory 1
+ write /proc/sys/vm/page-cluster 3
+ write /proc/sys/vm/panic_on_oom 0
+ write /proc/sys/vm/swappiness 70
+ write /proc/sys/vm/vfs_cache_pressure 50
+
+ # Kernel
+ write /proc/sys/kernel/hung_task_timeout_secs 0
+ write /proc/sys/kernel/panic 0
+ write /proc/sys/kernel/panic_on_oops 0
+ write /proc/sys/kernel/softlockup_panic 0
+
+ # Network
+ write /proc/sys/net/ipv4/tcp_moderate_rcvbuf 1
+ write /proc/sys/net/ipv4/route/flush 1
+ write /proc/sys/net/ipv4/tcp_rfc1337 1
+ write /proc/sys/net/ipv4/ip_no_pmtu_disc 0
+ write /proc/sys/net/ipv4/tcp_ecn 0
+ write /proc/sys/net/ipv4/tcp_fack 1
+ write /proc/sys/net/ipv4/tcp_synack_retries 2
+ write /proc/sys/net/ipv4/tcp_syn_retries 2
+ write /proc/sys/net/ipv4/tcp_no_metrics_save 1
+ write /proc/sys/net/ipv4/ip_forward 0
+ write /proc/sys/net/ipv4/tcp_sack 1
+ write /proc/sys/net/ipv4/tcp_dsack 1
+ write /proc/sys/net/ipv4/tcp_tw_recycle 1
+ write /proc/sys/net/ipv4/tcp_window_scaling 1
+ write /proc/sys/net/ipv4/conf/default/accept_source_route 0
+ write /proc/sys/net/ipv4/conf/all/accept_source_route 0
+ write /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts 1
+ write /proc/sys/net/ipv4/icmp_echo_ignore_all 1
+ write /proc/sys/net/ipv4/icmp_ignore_bogus_error_responses 1
+ write /proc/sys/net/ipv4/tcp_syncookies 0
+ write /proc/sys/net/ipv4/conf/all/accept_redirects 0
+ write /proc/sys/net/ipv4/conf/default/accept_redirects 0
+ write /proc/sys/net/ipv4/conf/all/secure_redirects 0
+ write /proc/sys/net/ipv4/conf/default/secure_redirects 0
+ write /proc/sys/net/ipv4/ip_dynaddr 0
+ write /proc/sys/net/ipv4/tcp_tw_reuse 1
+ write /proc/sys/net/ipv4/tcp_keepalive_probes 5
+ write /proc/sys/net/ipv4/tcp_max_syn_backlog 4096
+ write /proc/sys/net/ipv4/tcp_timestamps 0
+ write /proc/sys/net/ipv4/tcp_keepalive_probes 5
+ write /proc/sys/net/ipv4/tcp_keepalive_intvl 30
+ write /proc/sys/net/ipv4/tcp_fin_timeout 30
+ write /proc/sys/net/core/wmem_max 404480
+ write /proc/sys/net/core/rmem_max 404480
+ write /proc/sys/net/core/rmem_default 256960
+ write /proc/sys/net/core/wmem_default 256960
+ write /proc/sys/net/ipv4/tcp_wmem "4096,16384,404480"
+ write /proc/sys/net/ipv4/tcp_rmem "4096,16384,404480"
on enable-low-power
write /sys/module/lpm_levels/enable_low_power/l2 4
@@ -37,45 +101,19 @@ on enable-low-power
write /sys/module/msm_pm/modes/cpu2/retention/idle_enabled 1
write /sys/module/msm_pm/modes/cpu3/retention/idle_enabled 1
+ # MP-Decision
+ rm /data/system/default_values
+
write /sys/module/msm_thermal/core_control/enabled 0
- write /sys/devices/system/cpu/cpu0/online 1
write /sys/devices/system/cpu/cpu1/online 1
write /sys/devices/system/cpu/cpu2/online 1
write /sys/devices/system/cpu/cpu3/online 1
-
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
- write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor interactive
- write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor interactive
- write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor interactive
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 300000
- write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 300000
- write /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq 300000
- write /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq 300000
- write /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay "20000 900000:60000 1500000:20000"
- write /sys/devices/system/cpu/cpufreq/interactive/above_optimal_max_freq_delay 40000
- write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 95
- write /sys/devices/system/cpu/cpufreq/interactive/high_grid_load 45
- write /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq 1190400
- write /sys/devices/system/cpu/cpufreq/interactive/io_is_busy 0
- write /sys/devices/system/cpu/cpufreq/interactive/is_grid 1
- write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 40000
- write /sys/devices/system/cpu/cpufreq/interactive/max_freq_hysteresis 100000
- write /sys/devices/system/cpu/cpufreq/interactive/optimal_max_freq 1190400
- write /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor 0
- write /sys/devices/system/cpu/cpufreq/interactive/sync_freq 1190400
- write /sys/devices/system/cpu/cpufreq/interactive/target_loads "90 300000:45 800000:65 900000:70 1500000:90 1800000:99"
- write /sys/devices/system/cpu/cpufreq/interactive/timer_rate 30000
- write /sys/devices/system/cpu/cpufreq/interactive/timer_slack 30000
- write /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_freq 960000
- write /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_load 50
-
- write /sys/class/devfreq/qcom,cpubw.42/governor cpubw_hwmon
- write /sys/class/devfreq/fdb00000.qcom,kgsl-3d0/governor msm-adreno-tz
-
- # Permission for Power HAL CM extension
- chown root system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
- chmod 664 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
-
+ 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
write /sys/devices/system/cpu/cpu1/online 0
write /sys/devices/system/cpu/cpu2/online 0
write /sys/devices/system/cpu/cpu3/online 0
@@ -96,9 +134,7 @@ on charger
write /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled 1
write /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled 1
- stop mpdecision
write /sys/module/msm_thermal/core_control/enabled 0
- write /sys/devices/system/cpu/cpu0/online 1
write /sys/devices/system/cpu/cpu1/online 1
write /sys/devices/system/cpu/cpu2/online 1
write /sys/devices/system/cpu/cpu3/online 1
@@ -117,7 +153,7 @@ on charger
write /sys/devices/system/cpu/cpu3/online 0
write /sys/module/msm_thermal/core_control/enabled 1
-on class_start:late_start
+on boot
trigger enable-low-power
on property:init.svc.recovery=running
@@ -126,8 +162,9 @@ on property:init.svc.recovery=running
# CM Powersave Profile
on property:sys.perf.profile=0
stop mpdecision
+ write /sys/module/intelli_plug/parameters/intelli_plug_active 0
+
write /sys/module/msm_thermal/core_control/enabled 0
- write /sys/devices/system/cpu/cpu0/online 1
write /sys/devices/system/cpu/cpu1/online 1
write /sys/devices/system/cpu/cpu2/online 1
write /sys/devices/system/cpu/cpu3/online 1
@@ -144,13 +181,16 @@ on property:sys.perf.profile=0
write /sys/devices/system/cpu/cpu2/online 0
write /sys/devices/system/cpu/cpu3/online 0
write /sys/module/msm_thermal/core_control/enabled 1
- start mpdecision
+
+ write /sys/module/intelli_plug/parameters/nr_run_profile_sel 2
+ write /sys/module/intelli_plug/parameters/intelli_plug_active 1
# CM Balanced Profile
on property:sys.perf.profile=1
stop mpdecision
+ write /sys/module/intelli_plug/parameters/intelli_plug_active 0
+
write /sys/module/msm_thermal/core_control/enabled 0
- write /sys/devices/system/cpu/cpu0/online 1
write /sys/devices/system/cpu/cpu1/online 1
write /sys/devices/system/cpu/cpu2/online 1
write /sys/devices/system/cpu/cpu3/online 1
@@ -159,38 +199,35 @@ on property:sys.perf.profile=1
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor interactive
write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor interactive
write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor interactive
- write /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay "20000 900000:60000 1500000:20000"
- write /sys/devices/system/cpu/cpufreq/interactive/above_optimal_max_freq_delay 40000
- write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 95
- write /sys/devices/system/cpu/cpufreq/interactive/high_grid_load 45
+ write /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay "20000 1400000:40000 1700000:20000"
+ write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 90
write /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq 1190400
- write /sys/devices/system/cpu/cpufreq/interactive/io_is_busy 0
- write /sys/devices/system/cpu/cpufreq/interactive/is_grid 1
+ write /sys/devices/system/cpu/cpufreq/interactive/io_is_busy 1
+ write /sys/devices/system/cpu/cpufreq/interactive/target_loads "85 1500000:90 1800000:70"
write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 40000
- write /sys/devices/system/cpu/cpufreq/interactive/max_freq_hysteresis 100000
- write /sys/devices/system/cpu/cpufreq/interactive/optimal_max_freq 1190400
- write /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor 0
- write /sys/devices/system/cpu/cpufreq/interactive/sync_freq 1190400
- write /sys/devices/system/cpu/cpufreq/interactive/target_loads "90 300000:45 800000:65 900000:70 1500000:90 1800000:99"
- write /sys/devices/system/cpu/cpufreq/interactive/timer_rate 30000
- write /sys/devices/system/cpu/cpufreq/interactive/timer_slack 30000
- write /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_freq 960000
- write /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_load 50
+ write /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor 100000
- write /sys/class/devfreq/qcom,cpubw.42/governor msm-adreno-tz
+ # Permission for Power HAL CM extension
+ chown root system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
+ chmod 664 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
+
+ write /sys/class/devfreq/qcom,cpubw.42/governor msm_cpufreq
write /sys/class/devfreq/fdb00000.qcom,kgsl-3d0/governor msm-adreno-tz
write /sys/devices/system/cpu/cpu1/online 0
write /sys/devices/system/cpu/cpu2/online 0
write /sys/devices/system/cpu/cpu3/online 0
write /sys/module/msm_thermal/core_control/enabled 1
- start mpdecision
+
+ write /sys/module/intelli_plug/parameters/nr_run_profile_sel 2
+ write /sys/module/intelli_plug/parameters/intelli_plug_active 1
# CM Performance Profile
on property:sys.perf.profile=2
stop mpdecision
+ write /sys/module/intelli_plug/parameters/intelli_plug_active 0
+
write /sys/module/msm_thermal/core_control/enabled 0
- write /sys/devices/system/cpu/cpu0/online 1
write /sys/devices/system/cpu/cpu1/online 1
write /sys/devices/system/cpu/cpu2/online 1
write /sys/devices/system/cpu/cpu3/online 1
diff --git a/rootdir/etc/init.g2.rc b/rootdir/etc/init.g2.rc
index ffcb9010..066b4d9c 100644
--- a/rootdir/etc/init.g2.rc
+++ b/rootdir/etc/init.g2.rc
@@ -25,30 +25,34 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
-import init.g2.usb.rc
import init.g2.power.rc
+import init.g2.usb.rc
on early-init
symlink /dev/diag_lge /dev/diag
+
mkdir /sys 0771 system system
mkdir /firmware 0771 system system
+
mount debugfs debugfs /sys/kernel/debug
- write /sys/class/leds/lcd-backlight/brightness 100
chown system system /sys/kernel/debug/kgsl/proc
+
symlink /data/tombstones /tombstones
+ write /sys/class/leds/lcd-backlight/brightness 130
+
on init
- # Set permissions for persist partition
mkdir /persist 0771 system system
mkdir /factory 0775 system system
mkdir /persist-lg 0755 system system
mkdir /mpt 0755 system system
mkdir /sns 0775 system system
+
# Create directory for sensordaemon
mkdir /sns/cal 0644 system system
-
- mkdir /mnt/media_rw 0700 media_rw media_rw
+
# See storage config details at http://source.android.com/tech/storage/
+ mkdir /mnt/media_rw 0700 media_rw media_rw
mkdir /mnt/shell/emulated 0700 shell shell
mkdir /storage 0751 system sdcard_r
mkdir /storage/emulated 0555 root root
@@ -78,21 +82,88 @@ on init
setprop persist.radio.custom_ecc_voice "{515:117},{452:113,114,115}"
setprop persist.radio.custom_ecc_hard "911,*911,#911,112,999,000,08,118,120,122,110,119,995,111,113,125,127,133"
- # Prevents permission denied error for telephony
- chmod 0644 /proc/cmdline
-
on fs
mount_all ./fstab.g2
restorecon_recursive /sns
restorecon_recursive /mpt
setprop ro.crypto.fuse_sdcard true
-on post-fs
- # Execute sreadahead daemon to reduce boot-time
- start sreadahead
+on post-fs-data
+ mkdir /data/media 0770 media_rw media_rw
+
+ # Create directory used by bluetooth
+ mkdir /data/misc/bluetooth 0770 bluetooth bluetooth
+
+ # Create directory used by audio subsystem
+ mkdir /data/misc/audio 0770 audio audio
+
+ # Create folder for camera sockets
+ mkdir /data/misc/camera 0770 camera camera
+
+ # Create the directories used by CnE subsystem
+ mkdir /data/connectivity 0771 system system
+ chown system system /data/connectivity
+
+ mkdir /data/dpm/nsrm 0771 system system
+ chown system system /data/dpm/nsrm
+
+ # Create directory used by the DASH client
+ mkdir /data/misc/dash 0770 media audio
+
+ # Create the directories used by DPM subsystem
+ mkdir /data/dpm 0771 system system
+ chown system system /data/dpm
+
+ # Create directory used by display clients
+ mkdir /data/misc/display 0770 root system
+
+ # Create directory for IMS services
+ mkdir /data/shared 0755
+ chown system system /data/shared
+
+ # Create directories for Location services
+ mkdir /data/misc/location 0770 gps gps
+ mkdir /data/misc/location/mq 0770 gps gps
+ mkdir /data/misc/location/xtwifi 0770 gps gps
+ mkdir /data/misc/location/gpsone_d 0770 system gps
+ mkdir /data/misc/location/quipc 0770 gps system
+ mkdir /data/misc/location/gsiff 0770 gps gps
+
+ # NFC: create data/nfc for nv storage
+ mkdir /data/nfc 770 nfc nfc
+ mkdir /data/nfc/param 770 nfc nfc
+
+ # Create directory used by sensor subsystem
+ mkdir /persist/sensors 0775 system root
+ write /persist/sensors/sensors_settings 1
+ chmod 0644 /persist/sensors/sensors_settings
+ chown system root /persist/sensors/sensors_settings
+ mkdir /data/misc/sensors 0775 system system
+ restorecon_recursive /data/misc/sensors
+
+ # Some blobs have a tendancy to reference the old sensor settings
+ # so create them here, just in case.
+ mkdir /data/system/sensors
+ chmod 665 /data/system/sensors
+ write /data/system/sensors/settings 1
+ chmod 0775 /data/system/sensors
+ restorecon /data/system/sensors/settings
+ chmod 0664 /data/system/sensors/settings
+ chown system /data/system/sensors/settings
-# import cne init file
-# export LD_PRELOAD /vendor/lib/libNimsWrap.so
+ # Create /data/time folder for time-services
+ mkdir /data/time/ 0700 system system
+
+ # Create directory for TZ Apps
+ mkdir /data/misc/qsee 0770 system system
+
+ # wifi
+ chown wifi system /persist/wifi
+
+ # Make sure the default firmware is loaded
+ write /sys/module/bcmdhd/parameters/firmware_path "/system/etc/firmware/fw_bcmdhd.bin"
+
+ setprop vold.post_fs_data_done 1
on early-boot
# set RLIMIT_MEMLOCK to 64MB
@@ -103,41 +174,40 @@ on early-boot
write /sys/kernel/boot_adsp/boot 1
# disable lmk_fast_run
- write /sys/module/lowmemorykiller/parameters/lmk_fast_run 0
+ write /sys/module/lowmemorykiller/parameters/lmk_fast_run 0
on boot
+ # Create QMUX deamon socket area
+ mkdir /dev/socket/qmux_radio 0770 radio radio
+ chmod 2770 /dev/socket/qmux_radio
+ mkdir /dev/socket/qmux_audio 0770 media audio
+ chmod 2770 /dev/socket/qmux_audio
+ mkdir /dev/socket/qmux_bluetooth 0770 bluetooth bluetooth
+ chmod 2770 /dev/socket/qmux_bluetooth
+ mkdir /dev/socket/qmux_gps 0770 gps gps
+ chmod 2770 /dev/socket/qmux_gps
+
+ # Allow QMUX daemon to assign port open wait time
+ chown radio radio /sys/devices/virtual/hsicctl/hsicctl0/modem_wait
+
+ # communicate with mpdecision and thermald
+ mkdir /dev/socket/mpdecision 2770 system system
+
+ # Prevents permission denied error for telephony
+ chmod 0644 /proc/cmdline
+
# bluetooth
- chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power
chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type
chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state
chown bluetooth net_bt_stack /proc/bluetooth/sleep/btwake
chown bluetooth net_bt_stack /proc/bluetooth/sleep/proto
- chown bluetooth bluetooth /proc/bluetooth/sleep/lpm
chown bluetooth bluetooth /proc/bluetooth/sleep/btwrite
- chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_lpm
- chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_btwrite
- chown system system /sys/module/sco/parameters/disable_esco
- chown bluetooth bluetooth /sys/module/hci_smd/parameters/hcismd_set
- chmod 0660 /sys/module/bluetooth_power/parameters/power
- chmod 0660 /sys/module/hci_smd/parameters/hcismd_set
+ chown bluetooth bluetooth /proc/bluetooth/sleep/lpm
chmod 0660 /sys/class/rfkill/rfkill0/state
chmod 0660 /proc/bluetooth/sleep/btwake
chmod 0660 /proc/bluetooth/sleep/proto
chmod 0644 /proc/bluetooth/sleep/btwrite
chmod 0644 /proc/bluetooth/sleep/lpm
- chown bluetooth bluetooth /dev/ttyHS0
- chmod 0660 /sys/module/hci_uart/parameters/ath_lpm
- chmod 0660 /sys/module/hci_uart/parameters/ath_btwrite
- chown bluetooth net_bt_stack /dev/ttyHS99
- chmod 0660 /dev/ttyHS0
- chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock
- chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock
-
- chmod 0660 /dev/ttyHS2
- chown bluetooth bluetooth /dev/ttyHS2
-
- chown bluetooth bluetooth /sys/class/rfkill/rfkill0/device/extldo
- chmod 0660 /sys/class/rfkill/rfkill0/device/extldo
# vibrator
chown system system /sys/class/timed_output/vibrator/amp
@@ -164,29 +234,6 @@ on boot
chown system system /sys/devices/f9967000.i2c/i2c-0/0-0032/leds/G/led_current
chown system system /sys/devices/f9967000.i2c/i2c-0/0-0032/leds/B/led_current
- # Feature chip vendor: brcm, qct
- setprop bluetooth.chip.vendor brcm
-
- # SCMS-T property set during phone Booting
- setprop persist.service.bdroid.a2dp_con 0
- setprop persist.service.bdroid.scms_t 0
-
- chown bluetooth net_bt_stack /dev/btlock
- chmod 0600 /dev/btlock
-
- # Create QMUX deamon socket area
- mkdir /dev/socket/qmux_radio 0770 radio radio
- chmod 2770 /dev/socket/qmux_radio
- mkdir /dev/socket/qmux_audio 0770 media audio
- chmod 2770 /dev/socket/qmux_audio
- mkdir /dev/socket/qmux_bluetooth 0770 bluetooth bluetooth
- chmod 2770 /dev/socket/qmux_bluetooth
- mkdir /dev/socket/qmux_gps 0770 gps gps
- chmod 2770 /dev/socket/qmux_gps
-
- # Allow QMUX daemon to assign port open wait time
- chown radio radio /sys/devices/virtual/hsicctl/hsicctl0/modem_wait
-
# Define TCP buffer sizes for various networks
# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
setprop net.tcp.buffersize.wifi 524288,2097152,4194304,262144,524288,1048576
@@ -206,17 +253,9 @@ on boot
write /proc/sys/net/core/rmem_max 2097152
write /proc/sys/net/core/wmem_max 2097152
- # Set SUID bit for usbhub
- chmod 4755 /system/bin/usbhub
- chmod 755 /system/bin/usbhub_init
-
# Remove SUID bit for iproute2 ip tool
chmod 0755 /system/bin/ip
- # port-bridge
- chmod 0660 /dev/smd0
- chown system system /dev/smd0
-
# Camera Recording
mkdir /dev/video
symlink /dev/video32 /dev/video/venus_dec
@@ -268,9 +307,6 @@ on boot
chmod 0664 /sys/devices/virtual/graphics/fb1/vendor_name
chmod 0664 /sys/devices/virtual/graphics/fb1/product_description
- chmod 660 /dev/rtc0
- chown system system /dev/rtc0
-
chown root system /proc/net/ip_conntrack
# Enable DEBUG_SUSPEND, DEBUG_EXIT_SUSPEND, and DEBUG_WAKEUP
@@ -279,128 +315,6 @@ on boot
chown system wifi /sys/module/bcmdhd/parameters/firmware_path
chmod 0640 /sys/module/bcmdhd/parameters/firmware_path
-# msm specific files that need to be created on /data
-on post-fs-data
- mkdir /data/media 0770 media_rw media_rw
-
- # NFC: create data/nfc for nv storage
- mkdir /data/nfc 770 nfc nfc
- mkdir /data/nfc/param 770 nfc nfc
-
- # Create directory for TZ Apps
- mkdir /data/misc/qsee 0770 system system
-
- # bluetooth
- mkdir /data/misc/bluetooth 0770 bluetooth bluetooth
-
- # Create directory used by audio subsystem
- mkdir /data/misc/audio 0770 audio audio
-
- # Create directory used by sensor subsystem
- mkdir /persist/sensors 0775 system root
- write /persist/sensors/sensors_settings 1
- chmod 0644 /persist/sensors/sensors_settings
- chown system root /persist/sensors/sensors_settings
- mkdir /data/misc/sensors 0775 system system
- restorecon_recursive /data/misc/sensors
-
- # Some blobs have a tendancy to reference the old sensor settings
- # so create them here, just in case.
- mkdir /data/system/sensors
- chmod 665 /data/system/sensors
- write /data/system/sensors/settings 1
- chmod 0775 /data/system/sensors
- restorecon /data/system/sensors/settings
- chmod 0664 /data/system/sensors/settings
- chown system /data/system/sensors/settings
-
- # wifi
- chown wifi system /persist/wifi
-
- # Create the directories used by the Wireless subsystem
- mkdir /data/misc/wifi 0770 wifi wifi
- mkdir /data/misc/wifi/sockets 0770 wifi wifi
- mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi
- mkdir /data/misc/dhcp 0770 dhcp dhcp
- chown dhcp system /data/misc/dhcp
-
- # Create the directories used by CnE subsystem
- mkdir /data/connectivity 0771 system system
- chown system system /data/connectivity
-
- # Create the directories used by DPM subsystem
- mkdir /data/dpm 0771 system system
- chown system system /data/dpm
-
- mkdir /data/dpm/nsrm 0771 system system
- chown system system /data/dpm/nsrm
-
- # Create directory used by the DASH client
- mkdir /data/misc/dash 0770 media audio
-
- # Create directory used by display clients
- mkdir /data/misc/display 0770 root system
-
- # Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections
- # We chown/chmod /persist again so because mount is run as root + defaults
- chown system system /persist
- chmod 0771 /persist
- chmod 0664 /sys/devices/platform/msm_sdcc.1/polling
- chmod 0664 /sys/devices/platform/msm_sdcc.2/polling
- chmod 0664 /sys/devices/platform/msm_sdcc.3/polling
- chmod 0664 /sys/devices/platform/msm_sdcc.4/polling
-
- # Chown polling nodes as needed from UI running on system server
- chown system system /sys/devices/platform/msm_sdcc.1/polling
- chown system system /sys/devices/platform/msm_sdcc.2/polling
- chown system system /sys/devices/platform/msm_sdcc.3/polling
- chown system system /sys/devices/platform/msm_sdcc.4/polling
-
- # Create the symlink to qcn wpa_supplicant folder for ar6000 wpa_supplicant
- mkdir /data/system 0775 system system
- #symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant
-
- # Create directories for Location services
- mkdir /data/misc/location 0770 gps gps
- mkdir /data/misc/location/mq 0770 gps gps
- mkdir /data/misc/location/xtwifi 0770 gps gps
- mkdir /data/misc/location/gpsone_d 0770 system gps
- mkdir /data/misc/location/quipc 0770 gps system
- mkdir /data/misc/location/gsiff 0770 gps gps
-
- # Create directory for IMS services
- mkdir /data/shared 0755
- chown system system /data/shared
-
- # Create /data/time folder for time-services
- mkdir /data/time/ 0700 system system
-
- # Make sure the default firmware is loaded
- write /sys/module/bcmdhd/parameters/firmware_path "/system/etc/firmware/fw_bcmdhd.bin"
-
- # Create directory for hostapd
- mkdir /data/hostapd 0770 system wifi
-
- # Provide the access to hostapd.conf only to root and group
- chmod 0660 /data/hostapd/hostapd.conf
-
- # Enable the setgid bit on the directory
- mkdir /data/audio 2770 media audio
-
- setprop vold.post_fs_data_done 1
-
- # communicate with mpdecision and thermald
- mkdir /dev/socket/mpdecision 2770 system system
-
- # Create a folder for SRS to be able to create a usercfg file
- mkdir /data/data/media 0770 media media
-
- # Create folder for mm-qcamera-daemon
- mkdir /data/camera 0770 media camera
-
- # Create folder for camera sockets
- mkdir /data/misc/camera 0770 camera camera
-
# Torch
chown system camera /sys/class/leds/led:flash_torch/brightness
chmod 0660 /sys/class/leds/led:flash_torch/brightness
@@ -412,30 +326,25 @@ on post-fs-data
chmod 0664 /sys/devices/platform/tspdrv/nforce_timed
restorecon /sys/devices/platform/tspdrv/nforce_timed
- # Display Calibration
- chown system system /sys/devices/virtual/graphics/fb0/rgb
- chmod 0660 /sys/devices/virtual/graphics/fb0/rgb
-
# Tap to wake
chown system radio /sys/devices/virtual/input/lge_touch/touch_gesture
chmod 0664 /sys/devices/virtual/input/lge_touch/touch_gesture
+ write /sys/devices/virtual/input/lge_touch/touch_gesture 1
- # VM
- write /proc/sys/vm/dirty_background_ratio 70
- write /proc/sys/vm/dirty_expire_centisecs 250
- write /proc/sys/vm/dirty_ratio 90
- write /proc/sys/vm/dirty_writeback_centisecs 500
- write /proc/sys/vm/min_free_kbytes 4096
- write /proc/sys/vm/swappiness 60
- write /proc/sys/vm/vfs_cache_pressure 20
- write /proc/sys/vm/drop_caches 3
+ # LMK
+ chmod 0664 /sys/module/lowmemorykiller/parameters/adj
+ chmod 0664 /sys/module/lowmemorykiller/parameters/minfree
-on property:init.svc.wpa_supplicant=stopped
- stop dhcpcd
+# Services start here
-service rmt_storage /system/bin/rmt_storage
- class core
- user root
+service adsprpcd /system/bin/adsprpcd
+ class main
+ user media
+ group media
+
+service audiod /system/bin/audiod
+ class late_start
+ user system
group system
service bridgemgrd /system/bin/bridgemgrd
@@ -443,37 +352,116 @@ service bridgemgrd /system/bin/bridgemgrd
user radio
group radio
-# QMUX must be in multiple groups to support external process connections
-service qmuxd /system/bin/qmuxd
+service charger /sbin/healthd -c
+ class charger
+ critical
+ seclabel u:r:healthd:s0
+
+service conn_init /system/bin/hwaddrs
+ class late_start
+ user system
+ group system wifi
+ oneshot
+
+on property:init.svc.conn_init=stopped
+ chmod 644 /data/misc/bdaddr
+
+service irsc_util /system/bin/irsc_util "/etc/sec_config"
class main
- user radio
- group radio audio bluetooth gps qcom_diag
+ user root
+ oneshot
+
+service loc_launcher /system/bin/loc_launcher
+ class late_start
+ group gps inet net_raw qcom_diag net_admin wifi
+
+service mpdecision /system/bin/mpdecision --no_sleep --avg_comp
+ class late_start
+ user root
+ group root system
service netmgrd /system/bin/netmgrd
class main
user root
group radio
-# QCOM sensor
-service sensors /system/bin/sensors.qcom
+service ppd /system/bin/mm-pp-daemon
+ class late_start
+ disabled
+ user system
+ socket pps stream 0660 system system
+ group system graphics
+
+on property:init.svc.surfaceflinger=stopped
+ stop ppd
+
+on property:init.svc.surfaceflinger=running
+ start ppd
+
+service qcamerasvr /system/bin/mm-qcamera-daemon
class late_start
+ user camera
+ group camera system inet input graphics
+
+service qmuxd /system/bin/qmuxd
+ class main
+ user radio
+ group radio audio bluetooth gps qcom_diag
+
+service qseecomd /system/bin/qseecomd
+ class core
user root
group root
-# Adjust socket buffer to enlarge TCP receive window for high bandwidth
-# but only if ro.data.large_tcp_window_size property is set.
-on property:ro.data.large_tcp_window_size=true
- write /proc/sys/net/ipv4/tcp_adv_win_scale 2
+service rmt_storage /system/bin/rmt_storage
+ class core
+ user root
+ group system
-service cnd /system/bin/cnd
+# SD card
+service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023
class late_start
- socket cnd stream 660 root inet
-service irsc_util /system/bin/irsc_util "/etc/sec_config"
- class main
+service fuse_usbdisk0 /system/bin/sdcard -u 1023 -g 1023 -w 1023 /mnt/media_rw/usbdisk0 /storage/usbdisk0
+ class late_start
+ disabled
+
+service sensors /system/bin/sensors.qcom
+ class late_start
+ user root
+ group root
+
+service set_baseband /system/bin/sh /system/etc/set_baseband.sh
+ class late_start
user root
oneshot
+ disabled
+
+on property:sys.boot_completed=1
+ start set_baseband
+service thermal-engine /system/bin/thermal-engine
+ class main
+ user root
+ group root
+
+service time_daemon /system/bin/time_daemon
+ class late_start
+ user root
+ group root
+
+# OSS thermal management
+service thermanager /system/bin/thermanager /system/etc/thermanager.xml
+ class late_start
+ user root
+ group root
+
+service time_daemon /system/bin/time_daemon
+ class late_start
+ user root
+ group root
+
+# WiFi
service p2p_supplicant /system/bin/wpa_supplicant \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
-I/system/etc/wifi/wpa_supplicant_overlay.conf -N \
@@ -513,16 +501,6 @@ service dhcpcd_p2p /system/bin/dhcpcd -aABKL
disabled
oneshot
-service iprenew_wlan0 /system/bin/dhcpcd -n
- class late_start
- disabled
- oneshot
-
-service iprenew_p2p /system/bin/dhcpcd -n
- class late_start
- disabled
- oneshot
-
service dhcpcd_bnep0 /system/bin/dhcpcd -BKLG
disabled
oneshot
@@ -547,85 +525,24 @@ service dhcpcd_bt-pan /system/bin/dhcpcd -BKLG
disabled
oneshot
-service iprenew_bt-pan /system/bin/dhcpcd -n
- disabled
- oneshot
-
-service qseecomd /system/bin/qseecomd
- class core
- user root
- group root
-
-service qcom-sh /system/bin/sh /init.qcom.sh
- class late_start
- user root
- oneshot
-
-service loc_launcher /system/bin/loc_launcher
- #loc_launcher will start as root and set its uid to gps
- class late_start
- group gps inet net_raw qcom_diag net_admin wifi
-
-# virtual sdcard daemon running as media_rw (1023)
-service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023
- class late_start
-
-service fuse_usbdisk0 /system/bin/sdcard -u 1023 -g 1023 -w 1023 /mnt/media_rw/usbdisk0 /storage/usbdisk0
+service iprenew_wlan0 /system/bin/dhcpcd -n
class late_start
disabled
+ oneshot
-service charger /sbin/healthd -c
- class charger
- critical
- seclabel u:r:healthd:s0
-
-service qcamerasvr /system/bin/mm-qcamera-daemon
+service iprenew_p2p /system/bin/dhcpcd -n
class late_start
- user camera
- group camera system inet input graphics
-
-# bugreport is triggered by holding down volume down, volume up and power
-service bugreport /system/bin/dumpstate -d -p -B \
- -o /data/data/com.android.shell/files/bugreports/bugreport
- class main
disabled
oneshot
- keycodes 114 115 116
-
-service mpdecision /system/bin/mpdecision --avg_comp
- class late_start
- user root
- group root system
-
-service thermal-engine /system/bin/thermal-engine
- class main
- user root
- group root
-
-service time_daemon /system/bin/time_daemon
- class late_start
- user root
- group root
-
-service adsprpcd /system/bin/adsprpcd
- class main
- user media
- group media
-service audiod /system/bin/audiod
- class late_start
- user system
- group system
-
-service ppd /system/bin/mm-pp-daemon
- class late_start
+service iprenew_bt-pan /system/bin/dhcpcd -n
disabled
- user system
- socket pps stream 0660 system system
- group system graphics
+ oneshot
-on property:init.svc.surfaceflinger=stopped
- stop ppd
+on property:init.svc.wpa_supplicant=stopped
+ stop dhcpcd
-on property:init.svc.surfaceflinger=running
- start ppd
+# Adjust socket buffer to enlarge TCP receive window for high bandwidth
+# but only if ro.data.large_tcp_window_size property is set.
+on property:ro.data.large_tcp_window_size=true
+ write /proc/sys/net/ipv4/tcp_adv_win_scale 2
diff --git a/rootdir/etc/init.qcom.sh b/rootdir/etc/init.qcom.sh
deleted file mode 100755
index 68c567ce..00000000
--- a/rootdir/etc/init.qcom.sh
+++ /dev/null
@@ -1,230 +0,0 @@
-#!/system/bin/sh
-# Copyright (c) 2009-2014, 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 The 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.
-#
-
-target=`getprop ro.board.platform`
-if [ -f /sys/devices/soc0/soc_id ]; then
- platformid=`cat /sys/devices/soc0/soc_id`
-else
- platformid=`cat /sys/devices/system/soc/soc0/id`
-fi
-
-product=`getprop ro.build.product`
-# grep the modem partition for baseband version and set it
-case "$product" in
- "ls980" | "vs980")
- setprop gsm.version.baseband `strings /firmware/image/modem.b18 | grep "^MPSS.DI" | head -1`
- ;;
- "d800" | "d801" | "d802" | "d803" | "f320" | "l01f")
- setprop gsm.version.baseband `strings /firmware/image/modem.b21 | grep "^M8974A-" | head -1`
- ;;
-esac
-
-#
-# Function to start sensors for DSPS enabled platforms
-#
-start_sensors()
-{
- if [ -c /dev/msm_dsps -o -c /dev/sensors ]; then
- chmod -h 775 /persist/sensors
- chmod -h 664 /persist/sensors/sensors_settings
- chown -h system.root /persist/sensors/sensors_settings
-
- mkdir -p /data/misc/sensors
- chmod -h 775 /data/misc/sensors
-
- # LGE_START, make /sns/cal folder for save sensor registy
- # If the sns directory exists, make sns/cal/ directory
- if [ -d /sns ]; then
- mkdir -p /sns/cal
- fi
- # LGE_END, make /sns/cal folder for save sensor registy
-
- start sensors
- fi
-}
-
-start_battery_monitor()
-{
- if ls /sys/bus/spmi/devices/qpnp-bms-*/fcc_data ; then
- chown -h root.system /sys/module/pm8921_bms/parameters/*
- chown -h root.system /sys/module/qpnp_bms/parameters/*
- chown -h root.system /sys/bus/spmi/devices/qpnp-bms-*/fcc_data
- chown -h root.system /sys/bus/spmi/devices/qpnp-bms-*/fcc_temp
- chown -h root.system /sys/bus/spmi/devices/qpnp-bms-*/fcc_chgcyl
- chmod 0660 /sys/module/qpnp_bms/parameters/*
- chmod 0660 /sys/module/pm8921_bms/parameters/*
- mkdir -p /data/bms
- chown -h root.system /data/bms
- chmod 0770 /data/bms
- start battery_monitor
- fi
-}
-
-start_charger_monitor()
-{
- if ls /sys/module/qpnp_charger/parameters/charger_monitor; then
- chown -h root.system /sys/module/qpnp_charger/parameters/*
- chown -h root.system /sys/class/power_supply/battery/input_current_max
- chown -h root.system /sys/class/power_supply/battery/input_current_trim
- chown -h root.system /sys/class/power_supply/battery/input_current_settled
- chown -h root.system /sys/class/power_supply/battery/voltage_min
- chmod 0664 /sys/class/power_supply/battery/input_current_max
- chmod 0664 /sys/class/power_supply/battery/input_current_trim
- chmod 0664 /sys/class/power_supply/battery/input_current_settled
- chmod 0664 /sys/class/power_supply/battery/voltage_min
- chmod 0664 /sys/module/qpnp_charger/parameters/charger_monitor
- start charger_monitor
- fi
-}
-
-start_vm_bms()
-{
- if [ -e /dev/vm_bms ]; then
- chown -h root.system /sys/class/power_supply/bms/current_now
- chown -h root.system /sys/class/power_supply/bms/voltage_ocv
- chmod 0664 /sys/class/power_supply/bms/current_now
- chmod 0664 /sys/class/power_supply/bms/voltage_ocv
- start vm_bms
- fi
-}
-
-start_msm_irqbalance_8939()
-{
- if [ -f /system/bin/msm_irqbalance ]; then
- case "$platformid" in
- "239")
- start msm_irqbalance;;
- esac
- fi
-}
-
-start_msm_irqbalance()
-{
- if [ -f /system/bin/msm_irqbalance ]; then
- start msm_irqbalance
- fi
-}
-
-baseband=`getprop ro.baseband`
-#
-# Suppress default route installation during RA for IPV6; user space will take
-# care of this
-# exception default ifc
-for file in /proc/sys/net/ipv6/conf/*
-do
- echo 0 > $file/accept_ra_defrtr
-done
-echo 1 > /proc/sys/net/ipv6/conf/default/accept_ra_defrtr
-
-case "$baseband" in
- "svlte2a")
- start bridgemgrd
- ;;
-esac
-
-start_sensors
-
-case "$target" in
- "msm7630_surf" | "msm7630_1x" | "msm7630_fusion")
- if [ -f /sys/devices/soc0/hw_platform ]; then
- value=`cat /sys/devices/soc0/hw_platform`
- else
- value=`cat /sys/devices/system/soc/soc0/hw_platform`
- fi
- case "$value" in
- "Fluid")
- start profiler_daemon;;
- esac
- ;;
- "msm8660" )
- if [ -f /sys/devices/soc0/hw_platform ]; then
- platformvalue=`cat /sys/devices/soc0/hw_platform`
- else
- platformvalue=`cat /sys/devices/system/soc/soc0/hw_platform`
- fi
- case "$platformvalue" in
- "Fluid")
- start profiler_daemon;;
- esac
- ;;
- "msm8960")
- case "$baseband" in
- "msm")
- start_battery_monitor;;
- esac
-
- if [ -f /sys/devices/soc0/hw_platform ]; then
- platformvalue=`cat /sys/devices/soc0/hw_platform`
- else
- platformvalue=`cat /sys/devices/system/soc/soc0/hw_platform`
- fi
- case "$platformvalue" in
- "Fluid")
- start profiler_daemon;;
- "Liquid")
- start profiler_daemon;;
- esac
- ;;
- "msm8974")
- platformvalue=`cat /sys/devices/soc0/hw_platform`
- case "$platformvalue" in
- "Fluid")
- start profiler_daemon;;
- "Liquid")
- start profiler_daemon;;
- esac
- case "$baseband" in
- "msm")
- start_battery_monitor
- ;;
- esac
- start_charger_monitor
- ;;
- "apq8084")
- platformvalue=`cat /sys/devices/soc0/hw_platform`
- case "$platformvalue" in
- "Fluid")
- start profiler_daemon;;
- "Liquid")
- start profiler_daemon;;
- esac
- ;;
- "msm8226")
- start_charger_monitor
- ;;
- "msm8610")
- start_charger_monitor
- ;;
- "msm8916")
- start_vm_bms
- start_msm_irqbalance_8939
- ;;
- "msm8994")
- start_msm_irqbalance
- ;;
-esac
diff --git a/rootdir/etc/set_baseband.sh b/rootdir/etc/set_baseband.sh
new file mode 100755
index 00000000..cd721507
--- /dev/null
+++ b/rootdir/etc/set_baseband.sh
@@ -0,0 +1,12 @@
+#!/system/bin/sh
+
+product=`getprop ro.build.product`
+# grep the modem partition for baseband version and set it
+case "$product" in
+ "ls980" | "vs980")
+ setprop gsm.version.baseband `strings /firmware/image/modem.b18 | grep "^MPSS.DI" | head -1`
+ ;;
+ "d800" | "d801" | "d802" | "d803" | "f320" | "l01f")
+ setprop gsm.version.baseband `strings /firmware/image/modem.b21 | grep "^M8974A-" | head -1`
+ ;;
+esac
diff --git a/rootdir/etc/ueventd.g2.rc b/rootdir/etc/ueventd.g2.rc
index 3c7e44cf..63b190fb 100644
--- a/rootdir/etc/ueventd.g2.rc
+++ b/rootdir/etc/ueventd.g2.rc
@@ -35,7 +35,7 @@
/dev/kgsl-2d0 0666 root root
/dev/kgsl-2d1 0666 root root
/dev/ion 0664 system system
-/dev/rtc0 0600 system system
+/dev/rtc0 0660 system system
/dev/smd0 0660 system system
/dev/smd4 0660 system system
/dev/smd_cxm_qmi 0640 radio radio
@@ -243,5 +243,5 @@
/dev/lge_ddm_tty0 0660 system system
/dev/block/mmcblk0p13 0660 system wifi
-/dev/btlock 0660 bluetooth bluetooth
+/dev/btlock 0660 bluetooth net_bt_stack
/dev/rfkill 0660 wifi wifi
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index e0f509ea..c3c7fd09 100644
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
@@ -16,6 +16,7 @@
/sns(/.*)? u:object_r:sensors_persist_file:s0
/data/system/default_values u:object_r:mpdecision_data:s0
/dev/btlock u:object_r:btlock_file:s0
+/system/bin/thermanager u:object_r:thermanager_exec:s0
/dev/bcm2079x u:object_r:nfc_device:s0
/dev/socket/mpdecision(/.*)? u:object_r:mpctl_socket:s0
diff --git a/sepolicy/mpdecision.te b/sepolicy/mpdecision.te
index 38fca424..3ac4bbbd 100644
--- a/sepolicy/mpdecision.te
+++ b/sepolicy/mpdecision.te
@@ -5,6 +5,9 @@ type_transition mpdecision system_data_file:file mpctl_data_file;
allow mpdecision mpdecision_data:file { rw_file_perms };
+allow mpdecision system_data_file:dir { write add_name };
+allow mpdecision system_data_file:file { open append create };
+
binder_use(mpdecision)
allow mpdecision socket_device:dir {add_name remove_name write};
diff --git a/sepolicy/thermal-engine.te b/sepolicy/thermal-engine.te
deleted file mode 100644
index 09c6adef..00000000
--- a/sepolicy/thermal-engine.te
+++ /dev/null
@@ -1,21 +0,0 @@
-# Access /sys/devices/system/cpu/
-allow thermal-engine sysfs_devices_system_cpu:file rw_file_perms;
-
-binder_use(thermal-engine)
-
-# Some files in /sys/devices/system/cpu may pop in and out of existance,
-# defeating our attempt to label them. As a result, they could have the
-# sysfs label, not the sysfs_devices_system_cpu label.
-# Allow write access for now until we figure out a better solution.
-# For example, the following files pop in and out of existance:
-# /sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_min_freq
-# /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
-allow thermal-engine sysfs:file write;
-
-allow thermal-engine self:capability { dac_override net_admin };
-
-allow thermal-engine system_server:binder call;
-allow thermal-engine self:netlink_kobject_uevent_socket { create setopt bind read };
-allow thermal-engine sysfs:file write;
-
-allow thermal-engine mpctl_socket:dir w_dir_perms;
diff --git a/sepolicy/thermanager.te b/sepolicy/thermanager.te
new file mode 100644
index 00000000..6fca2677
--- /dev/null
+++ b/sepolicy/thermanager.te
@@ -0,0 +1,11 @@
+type thermanager, domain;
+type thermanager_exec, exec_type, file_type;
+
+# Started by init
+init_daemon_domain(thermanager)
+
+allow thermanager self:capability { dac_override sys_boot };
+allow thermanager { sysfs sysfs_devices_system_cpu }:file write;
+allow thermanager { sysfs_thermal sysfs_usb_supply }:dir search;
+allow thermanager sysfs_thermal:{ lnk_file file } rw_file_perms;
+allow thermanager sysfs_usb_supply:file rw_file_perms;
diff --git a/setup-makefiles.sh b/setup-makefiles.sh
new file mode 100755
index 00000000..68a7402a
--- /dev/null
+++ b/setup-makefiles.sh
@@ -0,0 +1,267 @@
+#!/bin/bash
+
+OUTDIR=vendor/$VENDOR/$DEVICE
+MAKEFILE=../../../$OUTDIR/$DEVICE-vendor-blobs.mk
+
+(cat << EOF) > $MAKEFILE
+# Copyright (C) 2015 The CyanogenMod Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh
+
+PRODUCT_COPY_FILES += \\
+EOF
+
+LINEEND=" \\"
+COUNT=`wc -l proprietary-files.txt | awk {'print $1'}`
+DISM=`egrep -c '(^#|^$)' proprietary-files.txt`
+COUNT=`expr $COUNT - $DISM`
+for FILE in `egrep -v '(^#|^$)' proprietary-files.txt`; do
+ COUNT=`expr $COUNT - 1`
+ if [ $COUNT = "0" ]; then
+ LINEEND=""
+ fi
+ # Split the file from the destination (format is "file[:destination]")
+ OLDIFS=$IFS IFS=":" PARSING_ARRAY=($FILE) IFS=$OLDIFS
+ if [[ ! "$FILE" =~ ^-.* ]]; then
+ FILE=`echo ${PARSING_ARRAY[0]} | sed -e "s/^-//g"`
+ DEST=${PARSING_ARRAY[1]}
+ if [ -n "$DEST" ]; then
+ FILE=$DEST
+ fi
+ echo " $OUTDIR/proprietary/$FILE:system/$FILE$LINEEND" >> $MAKEFILE
+ fi
+done
+
+(cat << EOF) > ../../../$OUTDIR/$DEVICE-vendor.mk
+# Copyright (C) 2015 The CyanogenMod Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh
+
+\$(call inherit-product, vendor/$VENDOR/$DEVICE/$DEVICE-vendor-blobs.mk)
+EOF
+
+(cat << EOF) > ../../../$OUTDIR/BoardConfigVendor.mk
+# Copyright (C) 2015 The CyanogenMod Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh
+EOF
+
+export DEVICE=g2-common
+
+OUTDIR=vendor/$VENDOR/$DEVICE
+MAKEFILE=../../../$OUTDIR/$DEVICE-vendor-blobs.mk
+
+(cat << EOF) > $MAKEFILE
+# Copyright (C) 2015 The CyanogenMod Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh
+
+PRODUCT_COPY_FILES += \\
+EOF
+
+LINEEND=" \\"
+COUNT=`wc -l ../$DEVICE/proprietary-files.txt | awk {'print $1'}`
+DISM=`egrep -c '(^#|^$)' ../$DEVICE/proprietary-files.txt`
+COUNT=`expr $COUNT - $DISM`
+for FILE in `egrep -v '(^#|^$)' ../$DEVICE/proprietary-files.txt`; do
+ COUNT=`expr $COUNT - 1`
+ if [ $COUNT = "0" ]; then
+ LINEEND=""
+ fi
+ # Split the file from the destination (format is "file[:destination]")
+ OLDIFS=$IFS IFS=":" PARSING_ARRAY=($FILE) IFS=$OLDIFS
+ if [[ ! "$FILE" =~ ^-.* ]]; then
+ FILE=`echo ${PARSING_ARRAY[0]} | sed -e "s/^-//g"`
+ DEST=${PARSING_ARRAY[1]}
+ if [ -n "$DEST" ]; then
+ FILE=$DEST
+ fi
+ echo " $OUTDIR/proprietary/$FILE:system/$FILE$LINEEND" >> $MAKEFILE
+ fi
+done
+
+(cat << EOF) > ../../../$OUTDIR/$DEVICE-vendor.mk
+# Copyright (C) 2015 The CyanogenMod Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh
+
+PRODUCT_PACKAGES += \\
+ qcrilmsgtunnel \\
+ TimeService
+
+PRODUCT_PACKAGES += \\
+ qcnvitems \\
+ qcrilhook
+
+PRODUCT_PACKAGES += \\
+ com.qualcomm.location
+
+PRODUCT_PACKAGES += \\
+ libtime_genoff \\
+ libTimeService
+
+\$(call inherit-product, vendor/$VENDOR/$DEVICE/$DEVICE-vendor-blobs.mk)
+EOF
+
+(cat << EOF) > ../../../$OUTDIR/BoardConfigVendor.mk
+# Copyright (C) 2015 The CyanogenMod Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh
+EOF
+
+(cat << EOF) > ../../../$OUTDIR/Android.mk
+# Copyright (C) 2015 The CyanogenMod Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh
+
+LOCAL_PATH := \$(call my-dir)
+
+ifneq (\$(filter g2 d800 d801 d802 d803 f320 l01f ls980 vs980,\$(TARGET_DEVICE)),)
+
+include \$(CLEAR_VARS)
+LOCAL_MODULE := qcrilmsgtunnel
+LOCAL_MODULE_OWNER := $VENDOR
+LOCAL_SRC_FILES := proprietary/app/qcrilmsgtunnel/qcrilmsgtunnel.apk
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX := \$(COMMON_ANDROID_PACKAGE_SUFFIX)
+LOCAL_MODULE_CLASS := APPS
+LOCAL_CERTIFICATE := platform
+include \$(BUILD_PREBUILT)
+
+include \$(CLEAR_VARS)
+LOCAL_MODULE := TimeService
+LOCAL_MODULE_OWNER := $VENDOR
+LOCAL_SRC_FILES := proprietary/app/TimeService/TimeService.apk
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX := \$(COMMON_ANDROID_PACKAGE_SUFFIX)
+LOCAL_MODULE_CLASS := APPS
+LOCAL_CERTIFICATE := platform
+include \$(BUILD_PREBUILT)
+
+include \$(CLEAR_VARS)
+LOCAL_MODULE := qcnvitems
+LOCAL_MODULE_OWNER := $VENDOR
+LOCAL_SRC_FILES := proprietary/framework/qcnvitems.jar
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX := \$(COMMON_JAVA_PACKAGE_SUFFIX)
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+LOCAL_CERTIFICATE := PRESIGNED
+include \$(BUILD_PREBUILT)
+
+include \$(CLEAR_VARS)
+LOCAL_MODULE := qcrilhook
+LOCAL_MODULE_OWNER := $VENDOR
+LOCAL_SRC_FILES := proprietary/framework/qcrilhook.jar
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX := \$(COMMON_JAVA_PACKAGE_SUFFIX)
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+LOCAL_CERTIFICATE := PRESIGNED
+include \$(BUILD_PREBUILT)
+
+include \$(CLEAR_VARS)
+LOCAL_MODULE := com.qualcomm.location
+LOCAL_MODULE_OWNER := $VENDOR
+LOCAL_SRC_FILES := proprietary/priv-app/com.qualcomm.location/com.qualcomm.location.apk
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX := \$(COMMON_ANDROID_PACKAGE_SUFFIX)
+LOCAL_MODULE_CLASS := APPS
+LOCAL_CERTIFICATE := platform
+LOCAL_PRIVILEGED_MODULE := true
+include \$(BUILD_PREBUILT)
+
+include \$(CLEAR_VARS)
+LOCAL_MODULE := libtime_genoff
+LOCAL_MODULE_OWNER := $VENDOR
+LOCAL_SRC_FILES := proprietary/vendor/lib/libtime_genoff.so
+LOCAL_MODULE_PATH := \$(TARGET_OUT_VENDOR_SHARED_LIBRARIES)
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX := .so
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+include \$(BUILD_PREBUILT)
+
+endif
+EOF
diff --git a/system_prop.mk b/system_prop.mk
index 9617754d..048e4572 100644
--- a/system_prop.mk
+++ b/system_prop.mk
@@ -2,90 +2,62 @@
# System Properties for G2
#
+# Bluetooth
PRODUCT_PROPERTY_OVERRIDES += \
- ro.sf.lcd_density=380 \
- ro.opengles.version=196608
-
-# AAC Stagefright
-PRODUCT_PROPERTY_OVERRIDES += \
- media.aac_51_output_enabled=true
-
-# AV offload
-PRODUCT_PROPERTY_OVERRIDES += \
- av.offload.enable=false
-
-# Smooth streaming Stagefright
-PRODUCT_PROPERTY_OVERRIDES += \
- mm.enable.smoothstreaming=true
-
-# ALSA
-PRODUCT_PROPERTY_OVERRIDES += \
- persist.audio.handset.mic.type=digital
-
-# Platform
-PRODUCT_PROPERTY_OVERRIDES += \
- persist.audio.dualmic.config=endfire
+ bluetooth.chip.vendor=brcm \
+ persist.service.bdroid.a2dp_con=0 \
+ persist.service.bdroid.scms_t=0 \
+ ro.bt.bdaddr_path=/data/misc/bdaddr
-# Fluence
+# Camera
PRODUCT_PROPERTY_OVERRIDES += \
- persist.audio.fluence.voicecall=true \
- persist.audio.fluence.voicerec=false \
- persist.audio.fluence.speaker=false
+ camera2.portability.force_api=1
-# MM parser
+# Display
PRODUCT_PROPERTY_OVERRIDES += \
- mm.enable.qcom_parser=3310129
+ persist.hwc.mdpcomp.enable=true \
+ ro.opengles.version=196608 \
+ ro.sf.lcd_density=380
-# VoIP and Direct output for PCM format
+# DRM
PRODUCT_PROPERTY_OVERRIDES += \
- use.dedicated.device.for.voip=false \
- use.voice.path.for.pcm.voip=true
+ drm.service.enabled=true
-# Surround sound recording
-PRODUCT_PROPERTY_OVERRIDES += \
- ro.qc.sdk.audio.ssr=false
+# IO Scheduler
+#PRODUCT_PROPERTY_OVERRIDES += \
+# sys.io.scheduler=bfq
-# Stagefright recorder compress offload
+# Media/offload
PRODUCT_PROPERTY_OVERRIDES += \
+ audio.offload.buffer.size.kb=32 \
+ audio.offload.gapless.enabled=true \
+ audio.offload.multiple.enabled=false \
+ audio.offload.pcm.16bit.enable=true \
+ audio.offload.pcm.24bit.enable=true \
+ av.offload.enable=true \
+ av.streaming.offload.enable=true \
tunnel.audio.encode=false
-# Do not power down SIM card when modem is sent to Low Power Mode.
-PRODUCT_PROPERTY_OVERRIDES += \
- persist.radio.apm_sim_not_pwdn=1
-
-# Ril sends only one RIL_UNSOL_CALL_RING, so set call_ring.multiple to false
PRODUCT_PROPERTY_OVERRIDES += \
- ro.telephony.call_ring.multiple=0
-
-PRODUCT_PROPERTY_OVERRIDES += \
- ro.telephony.ril_class=LgeLteRIL
-
-# HW Composer
-PRODUCT_PROPERTY_OVERRIDES += \
- persist.hwc.mdpcomp.enable=true \
- debug.mdpcomp.logs=0
-
-# Camera
-PRODUCT_PROPERTY_OVERRIDES += \
- camera2.portability.force_api=1
-
-PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
- rild.libpath=/vendor/lib/libril-qc-qmi-1.so
+ media.aac_51_output_enabled=true \
+ mm.enable.smoothstreaming=true
+# NFC
PRODUCT_PROPERTY_OVERRIDES += \
- drm.service.enabled=true
+ nfc.app_log_level=2 \
+ nfc.enable_protocol_log=0
+# Radio
PRODUCT_PROPERTY_OVERRIDES += \
- ro.bt.bdaddr_path=/data/misc/bdaddr
+ persist.radio.apm_sim_not_pwdn=1 \
+ ro.telephony.call_ring.multiple=0
PRODUCT_PROPERTY_OVERRIDES += \
- wifi.interface=wlan0 \
- wifi.supplicant_scan_interval=180 \
- wlan.chip.vendor=brcm \
- wlan.chip.version=bcm4335
+ persist.data.qmi.adb_logmask=0 \
PRODUCT_PROPERTY_OVERRIDES += \
- debug.egl.recordable.rgba8888=1
+ rild.libpath=/vendor/lib/libril-qc-qmi-1.so \
+ ro.telephony.ril_class=LgeLteRIL
# Sensors
PRODUCT_PROPERTY_OVERRIDES += \
@@ -125,50 +97,11 @@ PRODUCT_PROPERTY_OVERRIDES += \
persist.debug.sensors.hal=e \
persist.debug.ar.hal=e
-# MTP and USB-OTG
+# USB
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
persist.sys.usb.config=mtp \
persist.sys.isUsbOtgEnabled=true
-# QC vendor extension
-PRODUCT_PROPERTY_OVERRIDES += \
- ro.vendor.extension_library=/vendor/lib/libqti-perfd-client.so
-
-# Google Client ID
-PRODUCT_PROPERTY_OVERRIDES += \
- ro.com.google.clientidbase.ms=android-lge \
- ro.com.google.clientidbase.am=android-lge \
- ro.com.google.clientidbase.gmm=android-lge \
- ro.com.google.clientidbase.yt=android-lge
-
-# VIDC debug_levels
-# 1:ERROR 2:HIGH 4:LOW 0:NOLOGS 7:AllLOGS
-PRODUCT_PROPERTY_OVERRIDES += \
- vidc.debug.level=1
-
-# Memory
-PRODUCT_PROPERTY_OVERRIDES += \
- dalvik.vm.heapstartsize=8m \
- dalvik.vm.heapgrowthlimit=256m \
- dalvik.vm.heapsize=512m \
- dalvik.vm.heaptargetutilization=0.5 \
- dalvik.vm.heapminfree=2m \
- dalvik.vm.heapmaxfree=8m
-
-# HWUI
-PRODUCT_PROPERTY_OVERRIDES += \
- ro.hwui.texture_cache_size=76 \
- ro.hwui.layer_cache_size=52 \
- ro.hwui.r_buffer_cache_size=8 \
- ro.hwui.path_cache_size=32 \
- ro.hwui.gradient_cache_size=1 \
- ro.hwui.drop_shadow_cache_size=6 \
- ro.hwui.texture_cache_flushrate=0.4 \
- ro.hwui.text_small_cache_width=1024 \
- ro.hwui.text_small_cache_height=1024 \
- ro.hwui.text_large_cache_width=2048 \
- ro.hwui.text_large_cache_height=1024
-
-# MP-Decision
+# Wifi
PRODUCT_PROPERTY_OVERRIDES += \
- ro.qualcomm.perf.cores_online=2
+ wifi.interface=wlan0