aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsafarend <s.a.f.a.r.end@live.com.au>2015-09-14 22:19:15 +1200
committersafarend <s.a.f.a.r.end@live.com.au>2015-09-14 22:19:15 +1200
commit5a29cc65136d4fc25513c5c48a7fa3a7e4563696 (patch)
treeb87b4e945ba90a8929f4eb27490171de02722d52
parent92291b7d62486019a96d063ce9cd8715f1c0a8a9 (diff)
-Optimized battery life
-Added missing OMX libs -Fixed Bad video quality -Enabled Stock LPM Change-Id: I7a3dc8c318450a61f0bf3bb7fdcc1cf7b6227e74
-rw-r--r--BoardConfig.mk25
-rw-r--r--camera/CameraWrapper.cpp86
-rw-r--r--configs/media_codecs.xml200
-rw-r--r--configs/media_profiles.xml232
-rw-r--r--device.mk8
-rw-r--r--freq.cpu36
-rw-r--r--power/freq10
-rw-r--r--proprietary-files.txt69
-rw-r--r--rootdir/Android.mk8
-rw-r--r--rootdir/etc/init.universal5420.rc65
-rw-r--r--rootdir/etc/lpm.rc89
-rw-r--r--system.prop5
12 files changed, 483 insertions, 350 deletions
diff --git a/BoardConfig.mk b/BoardConfig.mk
index ce99ff4..ab2e82b 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -45,6 +45,11 @@ BOARD_HAVE_BLUETOOTH_BCM := true
BOARD_BLUEDROID_VENDOR_CONF := $(LOCAL_PATH)/bluetooth/libbt_vndcfg.txt
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(LOCAL_PATH)/bluetooth
+# Boot animation
+TARGET_BOOTANIMATION_PRELOAD := true
+TARGET_BOOTANIMATION_TEXTURE_CACHE := true
+TARGET_BOOTANIMATION_HALF_RES := true
+
# Bootloader
TARGET_OTA_ASSERT_DEVICE := ha3g
TARGET_BOOTLOADER_BOARD_NAME := universal5420
@@ -59,12 +64,9 @@ COMMON_GLOBAL_CFLAGS += -DSAMSUNG_DVFS
# Force the screenshot path to CPU consumer (fix glitches)
COMMON_GLOBAL_CFLAGS += -DFORCE_SCREENSHOT_CPU_PATH
-# HEALTH DAEMON (CHARGER) DEFINES
-RED_LED_PATH := "/sys/devices/virtual/sec/led/led_r"
-GREEN_LED_PATH := "/sys/devices/virtual/led/led_g"
-BLUE_LED_PATH := "/sys/devices/virtual/led/led_b"
-BACKLIGHT_PATH := "/sys/class/backlight/panel/brightness"
-CHARGING_ENABLED_PATH := "/sys/class/power_supply/battery/batt_lp_charging"
+# Fonts
+EXTENDED_FONT_FOOTPRINT := true
+
# Kernel
TARGET_KERNEL_SOURCE := kernel/samsung/ha3g
@@ -76,8 +78,6 @@ BOARD_KERNEL_PAGESIZE := 2048
#BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x02900000 --tags_offset 0x02700000
# Battery
-BOARD_CHARGER_ENABLE_SUSPEND := true
-CHARGING_ENABLED_PATH := "/sys/class/power_supply/battery/batt_lp_charging"
BOARD_BATTERY_DEVICE_NAME := battery
# FIMG2D
@@ -93,17 +93,11 @@ BOARD_USES_CEC := true
# Graphics
USE_OPENGL_RENDERER := true
-# not found in any .mk
-# BOARD_USES_HGL := true
BOARD_EGL_CFG := $(LOCAL_PATH)/configs/egl.cfg
NUM_FRAMEBUFFER_SURFACE_BUFFERS := 5
-# 0 is by default
-# VSYNC_EVENT_PHASE_OFFSET_NS := 0
-OVERRIDE_RS_DRIVER := libRSDriverArm.so
# HWCServices
BOARD_USES_HWC_SERVICES := true
-#TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS := true
# Include path
TARGET_SPECIFIC_HEADER_PATH := $(LOCAL_PATH)/include
@@ -119,7 +113,8 @@ BOARD_HAVE_NFC := true
BOARD_NFC_HAL_SUFFIX := universal5420
# Media
-#COMMON_GLOBAL_CFLAGS += -DUSE_NATIVE_SEC_NV12TILED # use format from fw/native
+COMMON_GLOBAL_CFLAGS += -DUSE_NATIVE_SEC_NV12TILED # use format from fw/native
+COMMON_GLOBAL_CFLAGS += -DWIDEVINE_PLUGIN_PRE_NOTIFY_ERROR
# OpenMAX Video
BOARD_USE_STOREMETADATA := true
diff --git a/camera/CameraWrapper.cpp b/camera/CameraWrapper.cpp
index 3d56b4c..e77fc86 100644
--- a/camera/CameraWrapper.cpp
+++ b/camera/CameraWrapper.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2015, The CyanogenMod Project
+ * Copyright (C) 2014, 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.
@@ -22,10 +22,11 @@
*/
//#define LOG_NDEBUG 0
-//#define LOG_PARAMETERS
-#define LOG_TAG "camera"
+#define LOG_TAG "CameraWrapper"
#include <cutils/log.h>
+//#include <sys/types.h>
+//#include <sys/stat.h>
#include <utils/threads.h>
#include <utils/String8.h>
@@ -34,14 +35,15 @@
#include <camera/Camera.h>
#include <camera/CameraParameters.h>
+//#define CAMID_PATH "/data/CameraID.txt"
+
static android::Mutex gCameraWrapperLock;
static camera_module_t *gVendorModule = 0;
static char **fixed_set_params = NULL;
static int camera_device_open(const hw_module_t *module, const char *name,
- hw_device_t **device);
-static int camera_device_close(hw_device_t *device);
+ hw_device_t **device);
static int camera_get_number_of_cameras(void);
static int camera_get_camera_info(int camera_id, struct camera_info *info);
@@ -51,7 +53,7 @@ static struct hw_module_methods_t camera_module_methods = {
camera_module_t HAL_MODULE_INFO_SYM = {
.common = {
- .tag = HARDWARE_MODULE_TAG,
+ tag: HARDWARE_MODULE_TAG,
.module_api_version = CAMERA_MODULE_API_VERSION_1_0,
.hal_api_version = HARDWARE_HAL_API_VERSION,
.id = CAMERA_HARDWARE_MODULE_ID,
@@ -81,6 +83,36 @@ typedef struct wrapper_camera_device {
})
#define CAMERA_ID(device) (((wrapper_camera_device_t *)(device))->id)
+//static void fix_camera_id_permissions()
+//{
+// FILE* camidfile;
+// int amode;
+// int ret = -1;
+// camidfile = fopen(CAMID_PATH, "w");
+// if (camidfile == 0) {
+// fprintf(stderr, "open(%s) failed\n", CAMID_PATH);
+// ALOGE("Can't open %s\n", CAMID_PATH);
+// } else {
+// ALOGD("Setting permissions of %s\n", CAMID_PATH);
+
+// /* write permissions for the file owner */
+// amode = S_IWUSR;
+// ret = chmod(CAMID_PATH, amode);
+
+// /* owner: media; group: system */
+// char* chown_cmd = (char*) malloc(strlen("chown media ") + strlen(CAMID_PATH) + 1);
+// char* chgrp_cmd = (char*) malloc(strlen("chgrp system ") + strlen(CAMID_PATH) + 1);
+// sprintf(chown_cmd, "chown media %s", CAMID_PATH);
+// sprintf(chgrp_cmd, "chgrp system %s", CAMID_PATH);
+// system(chown_cmd);
+// system(chgrp_cmd);
+
+// if (ret != 0) {
+// fprintf(stderr, "chmod() on file %s failed\n", CAMID_PATH);
+// ALOGE("Can't set permissions on %s\n", CAMID_PATH);
+// }
+// }
+//}
static int check_vendor_module()
{
@@ -91,21 +123,19 @@ static int check_vendor_module()
return 0;
rv = hw_get_module_by_class("camera", "vendor",
- (const hw_module_t **)&gVendorModule);
-
+ (const hw_module_t**)&gVendorModule);
if (rv)
ALOGE("failed to open vendor camera module");
return rv;
}
-static char *camera_fixup_getparams(int __attribute__((unused)) id,
- const char *settings)
+static char *camera_fixup_getparams(int id, const char *settings)
{
android::CameraParameters params;
params.unflatten(android::String8(settings));
-#ifdef LOG_PARAMETERS
- ALOGV("%s: Original parameters:", __FUNCTION__);
+#if !LOG_NDEBUG
+ ALOGV("%s: original parameters:", __FUNCTION__);
params.dump();
#endif
@@ -120,14 +150,14 @@ static char *camera_fixup_getparams(int __attribute__((unused)) id,
params.set("max-sharpness", params.get("sharpness-max"));
}
- android::String8 strParams = params.flatten();
- char *ret = strdup(strParams.string());
-
-#ifdef LOG_PARAMETERS
+#if !LOG_NDEBUG
ALOGV("%s: fixed parameters:", __FUNCTION__);
params.dump();
#endif
+ android::String8 strParams = params.flatten();
+ char *ret = strdup(strParams.string());
+
return ret;
}
@@ -136,7 +166,7 @@ static char *camera_fixup_setparams(int id, const char *settings)
android::CameraParameters params;
params.unflatten(android::String8(settings));
-#ifdef LOG_PARAMETERS
+#if !LOG_NDEBUG
ALOGV("%s: original parameters:", __FUNCTION__);
params.dump();
#endif
@@ -152,27 +182,24 @@ static char *camera_fixup_setparams(int id, const char *settings)
params.set("sharpness-max", params.get("max-sharpness"));
}
+#if !LOG_NDEBUG
+ ALOGV("%s: fixed parameters:", __FUNCTION__);
+ params.dump();
+#endif
android::String8 strParams = params.flatten();
-
if (fixed_set_params[id])
free(fixed_set_params[id]);
fixed_set_params[id] = strdup(strParams.string());
char *ret = fixed_set_params[id];
-#ifdef LOG_PARAMETERS
- ALOGV("%s: fixed parameters:", __FUNCTION__);
- params.dump();
-#endif
-
return ret;
}
/*******************************************************************
* implementation of camera_device_ops functions
*******************************************************************/
-static char *camera_get_parameters(struct camera_device *device);
-static int camera_set_parameters(struct camera_device *device, const char *params);
+
static int camera_set_preview_window(struct camera_device *device,
struct preview_stream_ops *window)
{
@@ -198,7 +225,8 @@ static void camera_set_callbacks(struct camera_device *device,
if (!device)
return;
- VENDOR_CALL(device, set_callbacks, notify_cb, data_cb, data_cb_timestamp, get_memory, user);
+ VENDOR_CALL(device, set_callbacks, notify_cb, data_cb, data_cb_timestamp,
+ get_memory, user);
}
static void camera_enable_msg_type(struct camera_device *device,
@@ -335,6 +363,7 @@ static int camera_auto_focus(struct camera_device *device)
if (!device)
return -EINVAL;
+
return VENDOR_CALL(device, auto_focus);
}
@@ -371,7 +400,8 @@ static int camera_cancel_picture(struct camera_device *device)
return VENDOR_CALL(device, cancel_picture);
}
-static int camera_set_parameters(struct camera_device *device, const char *params)
+static int camera_set_parameters(struct camera_device *device,
+ const char *params)
{
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
@@ -501,7 +531,7 @@ static int camera_device_open(const hw_module_t *module, const char *name,
android::Mutex::Autolock lock(gCameraWrapperLock);
- ALOGV("camera_device open");
+ ALOGV("%s", __FUNCTION__);
if (name != NULL) {
if (check_vendor_module())
diff --git a/configs/media_codecs.xml b/configs/media_codecs.xml
index cc0e04b..64a0e7c 100644
--- a/configs/media_codecs.xml
+++ b/configs/media_codecs.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright (C) 2012 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,91 +14,231 @@
limitations under the License.
-->
+<!--
+<!DOCTYPE MediaCodecs [
+<!ELEMENT Include EMPTY>
+<!ATTLIST Include href CDATA #REQUIRED>
+<!ELEMENT MediaCodecs (Decoders|Encoders|Include)*>
+<!ELEMENT Decoders (MediaCodec|Include)*>
+<!ELEMENT Encoders (MediaCodec|Include)*>
+<!ELEMENT MediaCodec (Type|Quirk|Include)*>
+<!ATTLIST MediaCodec name CDATA #REQUIRED>
+<!ATTLIST MediaCodec type CDATA>
+<!ELEMENT Type EMPTY>
+<!ATTLIST Type name CDATA #REQUIRED>
+<!ELEMENT Quirk EMPTY>
+<!ATTLIST Quirk name CDATA #REQUIRED>
+]>
+
+There's a simple and a complex syntax to declare the availability of a
+media codec:
+
+A codec that properly follows the OpenMax spec and therefore doesn't have any
+quirks and that only supports a single content type can be declared like so:
+
+ <MediaCodec name="OMX.foo.bar" type="something/interesting" />
+
+If a codec has quirks OR supports multiple content types, the following syntax
+can be used:
+
+ <MediaCodec name="OMX.foo.bar" >
+ <Type name="something/interesting" />
+ <Type name="something/else" />
+ ...
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="output-buffers-are-unreadable" />
+ </MediaCodec>
+
+Only the three quirks included above are recognized at this point:
+
+"requires-allocate-on-input-ports"
+ must be advertised if the component does not properly support specification
+ of input buffers using the OMX_UseBuffer(...) API but instead requires
+ OMX_AllocateBuffer to be used.
+
+"requires-allocate-on-output-ports"
+ must be advertised if the component does not properly support specification
+ of output buffers using the OMX_UseBuffer(...) API but instead requires
+ OMX_AllocateBuffer to be used.
+
+"output-buffers-are-unreadable"
+ must be advertised if the emitted output buffers of a decoder component
+ are not readable, i.e. use a custom format even though abusing one of
+ the official OMX colorspace constants.
+ Clients of such decoders will not be able to access the decoded data,
+ naturally making the component much less useful. The only use for
+ a component with this quirk is to render the output to the screen.
+ Audio decoders MUST NOT advertise this quirk.
+ Video decoders that advertise this quirk must be accompanied by a
+ corresponding color space converter for thumbnail extraction,
+ matching surfaceflinger support that can render the custom format to
+ a texture and possibly other code, so just DON'T USE THIS QUIRK.
+
+-->
+
<MediaCodecs>
<Decoders>
- <MediaCodec name="OMX.Exynos.MPEG4.Decoder" type="video/mp4v-es" >
+ <MediaCodec name="OMX.SEC.amr.dec">
+ <Type name="audio/amr-wb" />
+ <Type name="audio/3gpp" />
+ <Quirk name="needs-flush-before-disable" />
+ <Quirk name="decoder-ignores-streamcorrupt-error" />
+ </MediaCodec>
+
+ <MediaCodec name="OMX.SEC.mp3.dec">
+ <Type name="audio/mpeg"/>
+ <Type name="audio/mpeg-L1"/>
+ <Type name="audio/mpeg-L2"/>
+ <Quirk name="needs-flush-before-disable" />
+ <Quirk name="decoder-ignores-streamcorrupt-error" />
+ </MediaCodec>
+
+ <MediaCodec name="OMX.SEC.aac.dec" type="audio/mp4a-latm" >
+ <Quirk name="needs-flush-before-disable" />
+ <Quirk name="decoder-ignores-streamcorrupt-error" />
+ </MediaCodec>
+ <MediaCodec name="OMX.SEC.flac.dec" type="audio/flac" >
+ <Quirk name="needs-flush-before-disable" />
+ <Quirk name="decoder-ignores-streamcorrupt-error" />
+ </MediaCodec>
+ <MediaCodec name="OMX.SEC.wma.dec" type="audio/x-ms-wma" >
+ <Quirk name="needs-flush-before-disable" />
+ <Quirk name="decoder-ignores-streamcorrupt-error" />
+ </MediaCodec>
+ <MediaCodec name="OMX.SEC.adpcm.dec" type="audio/x-ima" >
+ <Quirk name="needs-flush-before-disable" />
+ <Quirk name="decoder-ignores-streamcorrupt-error" />
+ </MediaCodec>
+
+ <MediaCodec name="OMX.Exynos.avc.dec" type="video/avc" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="decoder-ignores-streamcorrupt-error" />
<Quirk name="video-controller-check-enable" />
- <Limit name="size" min="32x32" max="1920x1088" />
+ <Limit name="size" min="32x32" max="8192x8192" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
<Limit name="blocks-per-second" min="1" max="489600" />
<Limit name="bitrate" range="1-80000000" />
<Feature name="adaptive-playback" />
</MediaCodec>
-
- <MediaCodec name="OMX.Exynos.H263.Decoder" type="video/3gpp" >
+ <MediaCodec name="OMX.Exynos.mpeg4.dec" type="video/mp4v-es" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="decoder-ignores-streamcorrupt-error" />
<Quirk name="video-controller-check-enable" />
- <Limit name="size" min="32x32" max="1088x1152" />
+ <Limit name="size" min="32x32" max="2048x2048" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
<Limit name="blocks-per-second" min="1" max="489600" />
<Limit name="bitrate" range="1-80000000" />
<Feature name="adaptive-playback" />
</MediaCodec>
-
- <MediaCodec name="OMX.Exynos.AVC.Decoder" type="video/avc" >
+ <MediaCodec name="OMX.Exynos.h263.dec" type="video/3gpp" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="decoder-ignores-streamcorrupt-error" />
<Quirk name="video-controller-check-enable" />
- <Limit name="size" min="32x32" max="8192x8192" />
+ <Limit name="size" min="32x32" max="2048x1152" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
<Limit name="blocks-per-second" min="1" max="489600" />
<Limit name="bitrate" range="1-80000000" />
<Feature name="adaptive-playback" />
</MediaCodec>
-
- <MediaCodec name="OMX.Exynos.VP8.Decoder" type="video/x-vnd.on2.vp8" >
+ <MediaCodec name="OMX.Exynos.vc1.dec" >
+ <Type name="video/wvc1" />
+ <Type name="video/x-ms-wmv" />
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="decoder-ignores-streamcorrupt-error" />
<Quirk name="video-controller-check-enable" />
- <Limit name="size" min="32x32" max="8192x8192" />
+ <Limit name="size" min="32x32" max="2048x2032" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
<Limit name="blocks-per-second" min="1" max="489600" />
<Limit name="bitrate" range="1-80000000" />
<Feature name="adaptive-playback" />
</MediaCodec>
- </Decoders>
-
- <Encoders>
- <MediaCodec name="OMX.Exynos.MPEG4.Encoder" type="video/mp4v-es" >
+ <MediaCodec name="OMX.Exynos.vp8.dec" type="video/x-vnd.on2.vp8" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="decoder-ignores-streamcorrupt-error" />
<Quirk name="video-controller-check-enable" />
- <Limit name="size" min="32x32" max="1920x1088" />
+ <Limit name="size" min="32x32" max="8192x8192" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
<Limit name="blocks-per-second" min="1" max="489600" />
<Limit name="bitrate" range="1-40000000" />
+ <Feature name="adaptive-playback" />
</MediaCodec>
- <MediaCodec name="OMX.Exynos.H263.Encoder" type="video/3gpp" >
+
+ <MediaCodec name="OMX.Exynos.avc.dec.secure" type="video/avc" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="decoder-ignores-streamcorrupt-error" />
<Quirk name="video-controller-check-enable" />
- <Limit name="size" min="32x32" max="1088x1152" />
- <Limit name="alignment" value="2x2" />
- <Limit name="block-size" value="16x16" />
- <Limit name="blocks-per-second" min="1" max="489600" />
- <Limit name="bitrate" range="1-40000000" />
+ <Feature name="adaptive-playback" />
+ <Feature name="secure-playback" required="true" />
+ </MediaCodec>
+
+ <MediaCodec name="OMX.SEC.h263.sw.dec" type="video/3gpp" >
+ <Quirk name="decoder-ignores-streamcorrupt-error" />
+ </MediaCodec>
+ <MediaCodec name="OMX.SEC.avc.sw.dec" type="video/avc" >
+ <Quirk name="decoder-ignores-streamcorrupt-error" />
+ </MediaCodec>
+ <MediaCodec name="OMX.SEC.hevc.sw.dec" type="video/hevc" >
+ <Quirk name="decoder-ignores-streamcorrupt-error" />
+ </MediaCodec>
+ <MediaCodec name="OMX.SEC.mpeg4.sw.dec" type="video/mp4v-es" >
+ <Quirk name="decoder-ignores-streamcorrupt-error" />
+ </MediaCodec>
+ <MediaCodec name="OMX.SEC.vc1.sw.dec" >
+ <Type name="video/wvc1" />
+ <Type name="video/x-ms-wmv" />
+ <Quirk name="decoder-ignores-streamcorrupt-error" />
+ </MediaCodec>
+ <MediaCodec name="OMX.SEC.wmv7.dec" type="video/x-ms-wmv7" >
+ <Quirk name="decoder-ignores-streamcorrupt-error" />
+ </MediaCodec>
+ <MediaCodec name="OMX.SEC.wmv8.dec" type="video/x-ms-wmv8" >
+ <Quirk name="decoder-ignores-streamcorrupt-error" />
</MediaCodec>
+ <MediaCodec name="OMX.SEC.h263sr.dec" type="video/sorenson" >
+ <Quirk name="decoder-ignores-streamcorrupt-error" />
+ </MediaCodec>
+ <MediaCodec name="OMX.SEC.mp43.dec" type="video/mp43" />
+ <MediaCodec name="OMX.SEC.vp8.dec" type="video/x-vnd.on2.vp8" >
+ <Quirk name="decoder-ignores-streamcorrupt-error" />
+ </MediaCodec>
+
+ </Decoders>
+
+ <Encoders>
<MediaCodec name="OMX.Exynos.AVC.Encoder" type="video/avc" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Quirk name="video-controller-check-enable" />
- <Limit name="size" min="32x32" max="8192x8192" />
- <Limit name="alignment" value="2x2" />
- <Limit name="block-size" value="16x16" />
- <Limit name="blocks-per-second" min="1" max="489600" />
- <Limit name="bitrate" range="1-40000000" />
+ </MediaCodec>
+ <MediaCodec name="OMX.Exynos.H263.Encoder" type="video/3gpp" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="video-controller-check-enable" />
+ </MediaCodec>
+ <MediaCodec name="OMX.Exynos.MPEG4.Encoder" type="video/mp4v-es" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="video-controller-check-enable" />
+ </MediaCodec>
+ <MediaCodec name="OMX.Exynos.VP8.Encoder" type="video/x-vnd.on2.vp8" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="video-controller-check-enable" />
</MediaCodec>
</Encoders>
+ <Include href="media_codecs_google_video.xml" />
<Include href="media_codecs_google_audio.xml" />
<Include href="media_codecs_google_telephony.xml" />
- <Include href="media_codecs_google_video.xml" />
- <Include href="media_codecs_ffmpeg.xml" />
</MediaCodecs>
diff --git a/configs/media_profiles.xml b/configs/media_profiles.xml
index 4ca2373..b9271f2 100644
--- a/configs/media_profiles.xml
+++ b/configs/media_profiles.xml
@@ -38,7 +38,7 @@
<!ATTLIST Audio sampleRate CDATA #REQUIRED>
<!ATTLIST Audio channels (1|2) #REQUIRED>
<!ELEMENT ImageEncoding EMPTY>
-<!ATTLIST ImageEncoding quality (100|100|100|100|100|100) #REQUIRED>
+<!ATTLIST ImageEncoding quality (90|80|70|60|50|40) #REQUIRED>
<!ELEMENT ImageDecoding EMPTY>
<!ATTLIST ImageDecoding memCap CDATA #REQUIRED>
<!ELEMENT Camera EMPTY>
@@ -79,22 +79,11 @@
<MediaSettings>
<!-- Each camcorder profile defines a set of predefined configuration parameters -->
<CamcorderProfiles cameraId="0" startOffsetMs="700">
- <EncoderProfile quality="low" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="384000"
- width="176"
- height="144"
- frameRate="30" />
- <Audio codec="aac"
- bitRate="128000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
<EncoderProfile quality="high" fileFormat="mp4" duration="30">
<Video codec="h264"
- bitRate="17000000"
+ bitRate="25000000"
width="1920"
height="1080"
frameRate="30" />
@@ -105,21 +94,8 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="qcif" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="384000"
- width="176"
- height="144"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="128000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
<EncoderProfile quality="qvga" fileFormat="mp4" duration="30">
- <Video codec="h264"
+ <Video codec="h264"
bitRate="767000"
width="320"
height="240"
@@ -131,22 +107,9 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="3449000"
- width="720"
- height="480"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="256000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
<EncoderProfile quality="720p" fileFormat="mp4" duration="30">
<Video codec="h264"
- bitRate="12000000"
+ bitRate="17000000"
width="1280"
height="720"
frameRate="30" />
@@ -158,8 +121,8 @@
</EncoderProfile>
<EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="17000000"
+ <Video codec="h264"
+ bitRate="25000000"
width="1920"
height="1080"
frameRate="30" />
@@ -170,26 +133,10 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="timelapselow" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="384000"
- width="176"
- height="144"
- frameRate="30" />
-
- <!--
- The Audio part of the profile will not be used since time lapse mode
- does not capture audio
- -->
- <Audio codec="aac"
- bitRate="128000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
<EncoderProfile quality="timelapsehigh" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="17000000"
+ <Video codec="h264"
+ bitRate="25000000"
width="1920"
height="1080"
frameRate="30" />
@@ -204,22 +151,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="384000"
- width="176"
- height="144"
- frameRate="30" />
-
- <!--
- The Audio part of the profile will not be used since time lapse mode
- does not capture audio
- -->
- <Audio codec="aac"
- bitRate="128000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
<EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
<Video codec="h264"
@@ -233,23 +164,6 @@
does not capture audio
-->
<Audio codec="aac"
- bitRate="128000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="3449000"
- width="720"
- height="480"
- frameRate="30" />
-
- <!--
- The Audio part of the profile will not be used since time lapse mode
- does not capture audio
- -->
- <Audio codec="aac"
bitRate="256000"
sampleRate="48000"
channels="2" />
@@ -257,7 +171,7 @@
<EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
<Video codec="h264"
- bitRate="12000000"
+ bitRate="17000000"
width="1280"
height="720"
frameRate="30" />
@@ -274,7 +188,7 @@
<EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30">
<Video codec="h264"
- bitRate="17000000"
+ bitRate="25000000"
width="1920"
height="1080"
frameRate="30" />
@@ -289,32 +203,20 @@
channels="2" />
</EncoderProfile>
- <ImageEncoding quality="100" />
- <ImageEncoding quality="100" />
- <ImageEncoding quality="100" />
- <ImageDecoding memCap="50000000" />
+ <ImageEncoding quality="100" />
+ <ImageEncoding quality="95" />
+ <ImageEncoding quality="90" />
+ <ImageDecoding memCap="25000000" />
- </CamcorderProfiles>
+ </CamcorderProfiles>
<!-- Front Camera -->
<CamcorderProfiles cameraId="1" startOffsetMs="700">
- <EncoderProfile quality="low" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="384000"
- width="176"
- height="144"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="128000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
<EncoderProfile quality="high" fileFormat="mp4" duration="30">
<Video codec="h264"
- bitRate="17000000"
+ bitRate="25000000"
width="1920"
height="1080"
frameRate="30" />
@@ -325,18 +227,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="qcif" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="384000"
- width="176"
- height="144"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="128000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
<EncoderProfile quality="qvga" fileFormat="mp4" duration="30">
<Video codec="h264"
@@ -346,19 +236,6 @@
frameRate="30" />
<Audio codec="aac"
- bitRate="128000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="3449000"
- width="720"
- height="480"
- frameRate="30" />
-
- <Audio codec="aac"
bitRate="256000"
sampleRate="48000"
channels="2" />
@@ -366,7 +243,7 @@
<EncoderProfile quality="720p" fileFormat="mp4" duration="30">
<Video codec="h264"
- bitRate="12000000"
+ bitRate="17000000"
width="1280"
height="720"
frameRate="30" />
@@ -379,7 +256,7 @@
<EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
<Video codec="h264"
- bitRate="17000000"
+ bitRate="25000000"
width="1920"
height="1080"
frameRate="30" />
@@ -390,26 +267,10 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="timelapselow" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="384000"
- width="176"
- height="144"
- frameRate="30" />
-
- <!--
- The Audio part of the profile will not be used since time lapse mode
- does not capture audio
- -->
- <Audio codec="aac"
- bitRate="128000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
<EncoderProfile quality="timelapsehigh" fileFormat="mp4" duration="30">
<Video codec="h264"
- bitRate="17000000"
+ bitRate="25000000"
width="1920"
height="1080"
frameRate="30" />
@@ -424,22 +285,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="384000"
- width="176"
- height="144"
- frameRate="30" />
-
- <!--
- The Audio part of the profile will not be used since time lapse mode
- does not capture audio
- -->
- <Audio codec="aac"
- bitRate="128000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
<EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
<Video codec="h264"
@@ -453,23 +298,6 @@
does not capture audio
-->
<Audio codec="aac"
- bitRate="128000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="3449000"
- width="720"
- height="480"
- frameRate="30" />
-
- <!--
- The Audio part of the profile will not be used since time lapse mode
- does not capture audio
- -->
- <Audio codec="aac"
bitRate="256000"
sampleRate="48000"
channels="2" />
@@ -477,7 +305,7 @@
<EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
<Video codec="h264"
- bitRate="12000000"
+ bitRate="17000000"
width="1280"
height="720"
frameRate="30" />
@@ -494,7 +322,7 @@
<EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30">
<Video codec="h264"
- bitRate="17000000"
+ bitRate="25000000"
width="1920"
height="1080"
frameRate="30" />
@@ -510,9 +338,9 @@
</EncoderProfile>
<ImageEncoding quality="100" />
- <ImageEncoding quality="100" />
- <ImageEncoding quality="100" />
- <ImageDecoding memCap="50000000" />
+ <ImageEncoding quality="95" />
+ <ImageEncoding quality="90" />
+ <ImageDecoding memCap="25000000" />
</CamcorderProfiles>
@@ -525,19 +353,19 @@
or query the capabilities of the codec at all if it is disabled
-->
<VideoEncoderCap name="h264" enabled="true"
- minBitRate="64000" maxBitRate="20000000"
+ minBitRate="64000" maxBitRate="25000000"
minFrameWidth="176" maxFrameWidth="1920"
minFrameHeight="144" maxFrameHeight="1080"
minFrameRate="1" maxFrameRate="30" />
<VideoEncoderCap name="h263" enabled="true"
- minBitRate="64000" maxBitRate="1000000"
+ minBitRate="64000" maxBitRate="2500000"
minFrameWidth="176" maxFrameWidth="800"
minFrameHeight="144" maxFrameHeight="480"
minFrameRate="1" maxFrameRate="30" />
<VideoEncoderCap name="m4v" enabled="true"
- minBitRate="64000" maxBitRate="20000000"
+ minBitRate="64000" maxBitRate="25000000"
minFrameWidth="176" maxFrameWidth="1920"
minFrameHeight="144" maxFrameHeight="1080"
minFrameRate="1" maxFrameRate="30" />
@@ -548,12 +376,12 @@
minChannels="1" maxChannels="2" />
<AudioEncoderCap name="heaac" enabled="true"
- minBitRate="8000" maxBitRate="64000"
+ minBitRate="8000" maxBitRate="128000"
minSampleRate="16000" maxSampleRate="48000"
minChannels="1" maxChannels="1" />
<AudioEncoderCap name="aaceld" enabled="true"
- minBitRate="16000" maxBitRate="192000"
+ minBitRate="16000" maxBitRate="256000"
minSampleRate="16000" maxSampleRate="48000"
minChannels="1" maxChannels="1" />
@@ -610,4 +438,4 @@
Codec = mpeg4, Simple profile, level 5
-->
<ExportVideoProfile name="m4v" profile= "1" level="128"/>
-</MediaSettings> \ No newline at end of file
+</MediaSettings>
diff --git a/device.mk b/device.mk
index 2f1b1be..1a8b562 100644
--- a/device.mk
+++ b/device.mk
@@ -194,7 +194,6 @@ PRODUCT_COPY_FILES += \
# Media profile
PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/configs/media_codecs_ffmpeg.xml:system/etc/media_codecs_ffmpeg.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 \
@@ -207,9 +206,6 @@ PRODUCT_PACKAGES += \
# MobiCore setup
PRODUCT_PACKAGES += \
- libMcClient \
- libMcRegistry \
- libgdmcprov \
mcDriverDaemon
# Network tools
@@ -264,6 +260,7 @@ PRODUCT_PACKAGES += \
# Ramdisk
PRODUCT_PACKAGES += \
+ lpm.rc \
fstab.universal5420 \
init.samsung.rc \
init.universal5420.rc \
@@ -300,9 +297,6 @@ PRODUCT_PACKAGES += \
libnetcmdiface \
macloader
-# for off charging mode
-PRODUCT_PACKAGES += \
- charger_res_images
# $(call inherit-product, build/target/product/full.mk)
diff --git a/freq.cpu b/freq.cpu
new file mode 100644
index 0000000..16b3fad
--- /dev/null
+++ b/freq.cpu
@@ -0,0 +1,36 @@
+on early-init
+ write /sys/block/mmcblk0/queue/read_ahead_kb 512
+ write /sys/block/mmcblk1/queue/read_ahead_kb 512
+ write /sys/block/mmcblk0/queue/scheduler noop
+
+on property:sys.boot_completed=1
+ write /sys/block/mmcblk0/queue/scheduler cfq
+ write /sys/block/sda/queue/scheduler cfq
+ # Interactive
+ 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
+ #Stock cat
+ write /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay "20000 1000000:80000 1200000:100000 1700000:20000"
+ write /sys/devices/system/cpu/cpufreq/interactive/boost 0
+ write /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration 40000
+ write /sys/devices/system/cpu/cpufreq/interactive/cpu_util "11 OFF OFF OFF"?
+ write /sys/devices/system/cpu/cpufreq/interactive/enforced_mode 0
+ write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 99
+ write /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq 600000
+ write /sys/devices/system/cpu/cpufreq/interactive/io_is_busy 0
+ write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 40000
+ write /sys/devices/system/cpu/cpufreq/interactive/mode 0
+ write /sys/devices/system/cpu/cpufreq/interactive/multi_enter_load 360
+ write /sys/devices/system/cpu/cpufreq/interactive/multi_enter_time 80000
+ write /sys/devices/system/cpu/cpufreq/interactive/multi_exit_load 360
+ write /sys/devices/system/cpu/cpufreq/interactive/multi_exit_time 320000
+ write /sys/devices/system/cpu/cpufreq/interactive/param_index 0
+ write /sys/devices/system/cpu/cpufreq/interactive/single_enter_load 90
+ write /sys/devices/system/cpu/cpufreq/interactive/single_enter_time 160000
+ write /sys/devices/system/cpu/cpufreq/interactive/single_exit_load 90
+ write /sys/devices/system/cpu/cpufreq/interactive/single_exit_time 80000
+ write /sys/devices/system/cpu/cpufreq/interactive/target_loads "70 600000:70 800000:75 1500000:80 1700000:90"
+ write /sys/devices/system/cpu/cpufreq/interactive/timer_rate 20000
+ write /sys/devices/system/cpu/cpufreq/interactive/timer_slack 20000 \ No newline at end of file
diff --git a/power/freq b/power/freq
new file mode 100644
index 0000000..0b07d7a
--- /dev/null
+++ b/power/freq
@@ -0,0 +1,10 @@
+root@ha3g:/sys/devices/system/cpu/cpufreq/iks-cpufreq # ls
+freq_table
+max_freq
+min_freq
+at max_freq <
+1900000
+at min_freq <
+250000
+at freq_table <
+1900000 1800000 1700000 1600000 1500000 1400000 1300000 1200000 1100000 1000000 900000 800000 650000 600000 550000 500000 450000 400000 350000 300000 250000
diff --git a/proprietary-files.txt b/proprietary-files.txt
index e068cc5..afee171 100644
--- a/proprietary-files.txt
+++ b/proprietary-files.txt
@@ -9,27 +9,19 @@ lib/lib_soundaliveresampler.so
lib/libsamsungRecord.so
lib/libsamsungRecord_ns.so
lib/libsamsungRecord_zoom.so
-# lib/libaudiopolicy_sec.so
lib/lib_SoundAlive_SRC192_ver205.so
lib/lib_SamsungRec_V04004.so
lib/lib_DNSe_NRSS_ver226.so
lib/lib_Samsung_AudioZoom_v102.so
lib/lib_SoundBooster_ver402.so
-# lib/libcontrolcsc.so
lib/libmysound.so
lib/libaudiosa.so
lib/lib_SA_GoogleFX_ver124b.so
lib/soundfx/libaudiosa_sec.so
-#lib/soundfx/libbundlewrapper.so
lib/lib_SoundAlive_play_ver125e.so
vendor/lib/liblvverx_3.20.03.so
vendor/lib/liblvvetx_3.20.03.so
-# csc/sales_code.dat
usr/share/alsa/alsa.conf
-#lib/libasound.so
-#safar
-#lib/libsetproperty.so
-
vendor/firmware/srp_cga.bin
@@ -37,28 +29,27 @@ vendor/firmware/srp_data.bin
vendor/firmware/srp_vliw.bin
# Bluetooth
-# vendor/firmware/bcm4335_A0.hcd
-# vendor/firmware/bcm4335.hcd
-# vendor/firmware/bcm4335_semco.hcd
-# vendor/firmware/bcm4335_wisol.hcd
vendor/firmware/bcm4335_V0091.0405_wisol.hcd
vendor/firmware/bcm4335_V0093.0400.hcd
-# vendor/firmware/bcm4339_A0.hcd
-# vendor/firmware/bcm4339.hcd
-# vendor/firmware/bcm4339_semco.hcd
-# vendor/firmware/bcm4339_wisol.hcd
-# vendor/firmware/BT_FW_VER_BCM4339_003.001.009.0055.0254_ORC_H-LTE.hcd
# OemCrypto
lib/liboemcrypto.so
# Camera
lib/hw/camera.universal5420.so:lib/hw/camera.vendor.universal5420.so
+lib/libarccamera.so
+lib/libarcsoft_night_shot.so
+lib/libarcsoft_nighthawk.so
+lib/libarcsoft_panorama_burstcapture.so
+lib/libarcsoft_picaction.so
+lib/libarcsoft_picaction_manual.so
+lib/libarcsoft_selfie_camera_lite.so
+lib/libarcsoft_sensorndk.so
+lib/libarcsoft_vdoinvideo.so
lib/libexynoscamera.so
lib/libvdis.so
# Camera Other
lib/libliveframework.so
-lib/libarcsoft_nighthawk.so
# Widevine (DRM)
bin/drmserver:bin/drmserver.samsung
@@ -66,27 +57,55 @@ lib/libdrmdecrypt.so
lib/libstagefright_hdcp.so
lib/libhdcp2.so
vendor/lib/libwvdrm_L1.so
-# lib/libWVphoneAPI.so
vendor/lib/libWVStreamControlAPI_L1.so
lib/drm/libdrmwvmplugin.so
+lib/drm/libfwdlockengine.so
vendor/lib/libwvm.so
vendor/lib/mediadrm/libwvdrmengine.so
-lib/libExynosOMX_Core.so
lib/libcsc.so
lib/libexynosgscaler.so
lib/libexynosscaler.so
lib/libexynosutils.so
-
+lib/libsomxaace.so
lib/omx/libOMX.Exynos.AVC.Decoder.so
lib/omx/libOMX.Exynos.AVC.Encoder.so
lib/omx/libOMX.Exynos.MPEG4.Decoder.so
lib/omx/libOMX.Exynos.MPEG4.Encoder.so
lib/omx/libOMX.Exynos.VP8.Decoder.so
lib/omx/libOMX.Exynos.VP8.Encoder.so
+lib/omx/libOMX.Exynos.WMV.Decoder.so
+lib/libExynosOMX_Resourcemanager.so
+lib/libExynosOMX_Core.so
+lib/libliveframework.so
+lib/libsavsac.so
+lib/libsavscmn.so
+lib/libsomx263dsw.so
+lib/libsomx264dsw.so
+lib/libsomxaacd.so
+lib/libsomxaace.so
+lib/libsomxadpcmd.so
+lib/libsomxamrd.so
+lib/libsomxcmn.so
+lib/libsomxcore.so
+lib/libsomxflacd.so
+lib/libsomxhevcdsw.so
+lib/libsomxmp3d.so
+lib/libsomxmp4vdsw.so
+lib/libsomxmp43d.so
+lib/libsomxsr263d.so
+lib/libsomxvc1dsw.so
+lib/libsomxvencsw.so
+lib/libsomxvp8d.so
+lib/libsomxwmad.so
+lib/libsomxwmv7d.so
+lib/libsomxwmv8d.so
+
# Graphics
vendor/lib/egl/libGLES_mali.so
+lib/egl/libGLES_android.so
+lib/egl/libsomxaace.so
vendor/lib/libmalicore.bc
vendor/lib/libRSDriverArm.so
@@ -97,6 +116,9 @@ lib/libwrappergps.so
# LPM
bin/lpm
+lib/libmaet.so
+lib/libsuspend.so
+lib/libsxqk_skia.so
lib/libQmageDecoder.so
media/battery_cover.spi
media/battery_error.spi
@@ -173,7 +195,6 @@ vendor/firmware/bcm2079xB5_pre_firmware.ncd
# lib/hw/power.exynos5.so
# Radio
-# lib/libril.so
lib/libaudio-ril.so
lib/libsec-ril.so
lib/libsecnativefeature.so
@@ -190,7 +211,3 @@ etc/wifi/nvram_mfg.txt_wisol
etc/wifi/nvram_net.txt
etc/wifi/nvram_net.txt_semco3rd
etc/wifi/nvram_net.txt_wisol
-
-# Input (not exist anymore)
-# usr/idc/sec_e-pen.idc
-# usr/idc/sec_touchscreen.idc \ No newline at end of file
diff --git a/rootdir/Android.mk b/rootdir/Android.mk
index f2d4ca2..f716a8b 100644
--- a/rootdir/Android.mk
+++ b/rootdir/Android.mk
@@ -51,6 +51,14 @@ LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
+LOCAL_MODULE := lpm.rc
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := etc/lpm.rc
+LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
LOCAL_MODULE := ueventd.universal5420.rc
LOCAL_MODULE_TAGS := optional eng
LOCAL_MODULE_CLASS := ETC
diff --git a/rootdir/etc/init.universal5420.rc b/rootdir/etc/init.universal5420.rc
index d65117f..6c068ad 100644
--- a/rootdir/etc/init.universal5420.rc
+++ b/rootdir/etc/init.universal5420.rc
@@ -45,30 +45,19 @@ on init
symlink /dev/block/mmcblk0p8 /dev/block/param
on early-init
- write /sys/block/mmcblk0/queue/read_ahead_kb 512
- write /sys/block/mmcblk1/queue/read_ahead_kb 512
+ write /sys/block/mmcblk0/queue/read_ahead_kb 3072
+ write /sys/block/mmcblk1/queue/read_ahead_kb 3072
write /sys/block/mmcblk0/queue/scheduler noop
on property:sys.boot_completed=1
- write /sys/block/mmcblk0/queue/scheduler row
+ write /sys/block/mmcblk0/queue/scheduler cfq
# Interactive
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/cpufreq/interactive/above_hispeed_delay "20000 1000000:40000 1500000:20000"
- write /sys/devices/system/cpu/cpufreq/interactive/check_fast_target_loads "50 1000000:66"
- write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 9999999
- write /sys/devices/system/cpu/cpufreq/interactive/io_is_busy 0
- write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 40000
- write /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor 100000
- write /sys/devices/system/cpu/cpufreq/interactive/target_loads 85
-
- # Configure the cpu-boost module
- #write /sys/module/cpu_boost/parameters/boost_ms 10
- #write /sys/module/cpu_boost/parameters/input_boost_freq 1200000
- #write /sys/module/cpu_boost/parameters/input_boost_ms 40
+
on post-fs-data
# we will remap this as /mnt/sdcard with the sdcard fuse tool
@@ -438,19 +427,6 @@ on boot
chown system radio /sys/class/sec/sec_barcode_emul/barcode_ver_check
chown system radio /sys/class/sec/sec_barcode_emul/barcode_led_status
-on charger
-
-# Set cpu governor to powersave while in charging mode
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor powersave
- write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor powersave
- write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor powersave
- write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor powersave
-
-# EHCI runtime enable for LPA
- write /sys/devices/platform/s5p-ehci/power/control auto
-
-# Do not set any USB mode while charging
- setprop sys.usb.config charging
on fs
mount_all /fstab.universal5420
@@ -551,10 +527,11 @@ service fuse_usbdisk /system/bin/sdcard -u 1023 -g 1023 -w 1023 /mnt/media_rw/us
on property:ro.fuse_sdcard=true
start sdcard
-service battery_charger /charger
- class charger
- critical
- seclabel u:r:healthd:s0
+
+#service battery_charger /charger
+# class charger
+# critical
+# seclabel u:r:healthd:s0
# Set watchdog timer to 30 seconds and pet it every 10 seconds to get a 20 second margin
service watchdogd /sbin/watchdogd 10 20
@@ -601,6 +578,15 @@ service mobicore /system/bin/mcDriverDaemon -r /system/app/FFFFFFFF0000000000000
user system
group system
+# LPM
+on charger
+ mount ext4 /dev/block/mmcblk0p18 /system wait ro
+ class_start sec-charger
+
+service sec-playlpm /system/bin/lpm
+ class sec-charger
+ critical
+
# service for TZPR provisioning version check app
service scranton_RD /system/bin/scranton_RD
class main
@@ -638,11 +624,11 @@ on property:ro.debug_level=0x4f4c
# oneshot
# CS service
-#service cs_service /system/bin/cs
-# class main
-# user system
-# group system
-# disabled
+service cs_service /system/bin/cs
+ class main
+ user system
+ group system
+ disabled
#service TvoutService_C /system/bin/bintvoutservice
# class main
@@ -651,8 +637,8 @@ on property:ro.debug_level=0x4f4c
#on property:ro.SecEDS.enable=false
# stop TvoutService_C
-#on property:sys.mobicoredaemon.enable=true
-# start cs_service
+on property:sys.mobicoredaemon.enable=true
+ start cs_service
# Reactivation lock
# service reactived /system/bin/reactived
@@ -667,4 +653,3 @@ service camera_id /system/bin/sh /system/etc/init.exynos.cam.sh
on property:init.svc.bootanim=stopped
start camera_id
-
diff --git a/rootdir/etc/lpm.rc b/rootdir/etc/lpm.rc
new file mode 100644
index 0000000..8054100
--- /dev/null
+++ b/rootdir/etc/lpm.rc
@@ -0,0 +1,89 @@
+on early-init
+ start ueventd
+
+on init
+
+ export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
+ export LD_LIBRARY_PATH /vendor/lib:/system/lib
+ export ANDROID_ROOT /system
+ export ANDROID_DATA /data
+ export EXTERNAL_STORAGE /sdcard
+
+ symlink /system/etc /etc
+
+# Right now vendor lives on the same filesystem as system,
+# but someday that may change.
+ symlink /system/vendor /vendor
+
+ mkdir /sdcard
+ mkdir /preload
+ mkdir /system
+ mkdir /data
+ mkdir /cache
+ mkdir /efs
+ mkdir /tmp
+ mkdir /dbdata
+ mkdir /mnt 0775 root root
+ #mount /tmp /tmp tmpfs
+
+ write /proc/sys/kernel/hung_task_timeout_secs 0
+
+on early-fs
+ insmod /lib/modules/vibrator.ko
+
+ mount ext4 /dev/block/mmcblk0p20 /system ro wait noatime
+ mount ext4 /dev/block/mmcblk0p3 /efs noatime nosuid nodev journal_async_commit
+
+ mkdir /data/log 0777
+
+ chmod 0666 /dev/log/radio
+ chmod 0666 /dev/log/main
+ chmod 0666 /dev/log/event
+
+on boot
+# write /sys/class/sec/switch/usb_sel PDA
+
+# CPU Frequency Governor
+ write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor pegasusq
+
+# EHCI runtime enable for LPA
+ write /sys/devices/platform/s5p-ehci/power/control auto
+
+ ifup lo
+ hostname localhost
+ domainname localdomain
+
+ class_start default
+
+service debuggerd /system/bin/debuggerd
+
+ service ueventd /sbin/ueventd
+ critical
+
+#service console /bin/sh
+service console /system/bin/sh
+ console
+
+service playlpm /system/bin/playlpm
+ user root
+
+service immvibed /system/bin/immvibed
+ oneshot
+
+service lpmkey /system/bin/lpmkey
+ user root
+
+# adbd is controlled by the persist.service.adb.enable system property
+service adbd /sbin/adbd
+ disabled
+
+# adbd on at boot in emulator
+on property:ro.kernel.qemu=1
+ start adbd
+
+on property:persist.service.adb.enable=1
+ start adbd
+
+on property:persist.service.adb.enable=0
+ stop adbd
+
diff --git a/system.prop b/system.prop
index 0f6244b..42c1499 100644
--- a/system.prop
+++ b/system.prop
@@ -24,8 +24,9 @@ ro.telephony.ril_class=ha3gRIL
persist.sys.isUsbOtgEnabled=true
# Default USB mode
-persist.sys.usb.config=mtp
-
+persist.service.adb.enable=1
+persist.service.debuggable=1
+persist.sys.usb.config=mtp,adb
# Wifi
wifi.interface=wlan0
wlan.wfd.hdcp=disable