Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,730,261 Members 52,542 Now Online
XDA Developers Android and Mobile Development Forum

[UPDATE]-[SHELL_CMD] MOD Stock Kernel<4.1.2>CM Stock kernel<4.4.4><ROOT Required>

Tip us?
 
hasan4791
Old
(Last edited by hasan4791; 18th July 2014 at 06:36 PM.)
#1  
hasan4791's Avatar
Senior Member - OP
Thanks Meter 312
Posts: 962
Join Date: Nov 2011
Location: Bangalore
Thumbs up [UPDATE]-[SHELL_CMD] MOD Stock Kernel<4.1.2>CM Stock kernel<4.4.4><ROOT Required>

We've ECO MODE option in CM StocK kernel too...But need to use script for enabling

Hi all... After long time again with some useful stuffs...
LG has made some good features in our Stock kernel and the Most useful one is ECO Mode.
ECO Mode is a option to manage cores (dual core/Quad core mode) but we need to enable/disable it manually which is a drawback.
So I wanted to share some Useful Shell commands,using that You can actually MOD your kernel thro shell commands and can automate the Eco mode options too...
I recommend you guyss to install AutomateIT app
and SHELL plugin too to automate some features

Before that I wanted to explain WHY we are doing this
we all know LG Optimus G is a powerful mobile but we all are lagging with Battery backup..Right??
  1. After Screenoff or in idle mode GPU should down to 128mhz which is not happening. Checked with adb shell
  2. Ondemand governor for CPU is not optimizing the core properly so we need manual intervention
SHELL CMDs: (ROOT REQUIRED)
1. Change CPU max frequency

echo "freq_value" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

eg: echo "1512000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

2. Change CPU min frequency

echo "freq_value" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

eg: echo "328000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

3. Change CPU Governor

echo "governor" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

eg: echo "performance" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

4. Display Current CPU freq

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq

5. Change GPU max frequency

echo "gpu_freq" > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/max_gpuclk

eg: echo "128000000" > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/max_gpuclk

6. Display GPU Clock frequency

cat /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/gpuclk

4. Core Management (single/Dual/Quad core mode)

echo "core_count" > /sys/devices/platform/lge_kernel_driver/eco_cpu

eg: echo "2" > /sys/devices/platform/lge_kernel_driver/eco_cpu

Here you can use values of 1,2 and 4 and when changing values, I would recommend Ecomode should be enabled always by default.

CORE Management:


Here I want to show, How to manage the core based on individual app automatically using those above commands.
I'm currently using AutomateIT Pro app with Shell plugin addon to automate some of these features.
Use this simple example and explore the app and above commands to customize the core by yourself.

High Perf apps config:

App start config:
1. Select the Trigger "Application status trigger"(Enable checkbox to trigger when app starts) and select the app here
2. Select the Action "Shell Command Action" and paste the following codes (Enable Root checkbox)
echo "1512000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo "performance" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "4" > /sys/devices/platform/lge_kernel_driver/eco_cpu
echo "400000000" > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/max_gpuclk
3. Give it some name and save
App close config:
1. Select the Trigger "Application status trigger"(Disable checkbox to trigger when app closes) and select the app here
2. Select the Action "Shell Command Action" and paste the following codes (Enable Root checkbox)
echo "1242000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "2" > /sys/devices/platform/lge_kernel_driver/eco_cpu
echo "128000000" > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/max_gpuclk
3. Give it some name and save
Similarly When screen off you can enable single core mode and min GPU which saves some battery juice.

Hope this one is quite helpful and will be updated when required.
Like this thread get me Thanks and 5 stars..
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2014-05-06-21-03-55.png
Views:	205
Size:	236.3 KB
ID:	2729008   Click image for larger version

Name:	Screenshot_2014-05-06-21-04-07.png
Views:	173
Size:	240.9 KB
ID:	2729009   Click image for larger version

Name:	Screenshot_2014-05-06-21-04-16.png
Views:	158
Size:	219.6 KB
ID:	2729010  


Guide to Track Android Device|Antitheft|Secure Droid
Don't FORGET to click Thanx...

Works:

Device:

LG Optimus G(E-975) Indian Version
Stock Rom 4.1.2 v10f
Kernel 3.4.0
The Following 6 Users Say Thank You to hasan4791 For This Useful Post: [ Click to Expand ]
 
hasan4791
Old
#2  
hasan4791's Avatar
Senior Member - OP
Thanks Meter 312
Posts: 962
Join Date: Nov 2011
Location: Bangalore
Reserved for future..!!


Guide to Track Android Device|Antitheft|Secure Droid
Don't FORGET to click Thanx...

Works:

Device:

LG Optimus G(E-975) Indian Version
Stock Rom 4.1.2 v10f
Kernel 3.4.0
 
itsdacj
Old
#3  
itsdacj's Avatar
Senior Member
Thanks Meter 15
Posts: 100
Join Date: Oct 2013
Location: Northants
Reserved!


Sent from my iPad Mini (1st Gen) running iOS 7.1
HURRY UP JAILBREAK, STOCK IOS SUCKS
MY DEVICES
  • LG Optimus G - Ported L Preview by Kevinjoa - Stock Kernel (For Now).
  • iPad Mini (Non Retina) - 16GB - White - Jailbroken - iOS 7.1.1.
Kevinjoa: http://forum.xda-developers.com/member.php?u=5095490
L Preview Port Thread: http://forum.xda-developers.com/opti...mus-g-t2807660
 
hasan4791
Old
#4  
hasan4791's Avatar
Senior Member - OP
Thanks Meter 312
Posts: 962
Join Date: Nov 2011
Location: Bangalore
OP updated for CM 11 Stock kernels too...!!

Also Mokee ROM users, Please check for the eco_cpu file in /sys/devices/platform/lge_kernel_driver/eco_cpu.
If this file is present, then eco mode will also work for you guyzz...


Guide to Track Android Device|Antitheft|Secure Droid
Don't FORGET to click Thanx...

Works:

Device:

LG Optimus G(E-975) Indian Version
Stock Rom 4.1.2 v10f
Kernel 3.4.0
The Following User Says Thank You to hasan4791 For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Cast Your Device Screen the Way it Was Meant to be with Second Screen

Not too long ago here on the XDA Portal, we covered how Google had made … more

Samsung Gear Live Unboxed the XDA Way – XDA Developer TV

XDA Developer TV Producer AdamOutleris known for his XDA Unboxingseries where … more

Make Your Own DIY Capacitive Stylus

The XDA Portal is a place where we like to talkabout things that are interesting, fun, and sometimes … more