Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,772,899 Members 48,816 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 355
Posts: 1,055
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:	214
Size:	236.3 KB
ID:	2729008   Click image for larger version

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

Name:	Screenshot_2014-05-06-21-04-16.png
Views:	161
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.4.2 v20A
Solid Kernel 0.2V
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 355
Posts: 1,055
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.4.2 v20A
Solid Kernel 0.2V
 
itsdacj
Old
#3  
itsdacj's Avatar
Senior Member
Thanks Meter 18
Posts: 121
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 - CM11 4.4.4 - Solid Kernel (For now, always switching ROM).
  • iPad Mini (Non Retina) - 16GB - White - iOS 8 Beta 5.
 
hasan4791
Old
#4  
hasan4791's Avatar
Senior Member - OP
Thanks Meter 355
Posts: 1,055
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.4.2 v20A
Solid Kernel 0.2V
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


Replace Your Stock Phone App with Reactiv Dialer

Your smartphone’s dialer app is obviously one of the most frequently used apps you … more

How to Factory Reset your Samsung Gear Live Android Wear SmartWatch – XDA Developer TV

Do you want to Factory Reset your Samsung Gear … more

Get Your Special xda:devcon ’14 Hotel And Conference Rate While It Lasts

By now you’ve definitely heard about XDA’s … more

Google Chromecast Rootable Once Again!

Over the six months, theGoogle Chromecasthas gained a considerable amount of official functionality. … more