Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,739,262 Members 50,017 Now Online
XDA Developers Android and Mobile Development Forum

[Script][All ROMS][AROMA]Suvi Booster Script V4.0 [6 Nov 2013][Profile Support]

Tip us?
 
bsuhas
Old
(Last edited by bsuhas; 7th November 2013 at 06:40 PM.)
#1  
bsuhas's Avatar
Recognized Developer - OP
Thanks Meter 2840
Posts: 980
Join Date: Dec 2011

 
DONATE TO ME
Default [Script][All ROMS][AROMA]Suvi Booster Script V4.0 [6 Nov 2013][Profile Support]

Suvi Booster Script



V4.0 added on 7Nov2013
V3.4 added on 6Nov2013
uninstaller for all versions added on 5Nov2013
V3 added on 5Nov2013
V2.1 added on 2Nov2013
V2 added on 28Oct2013

What is this script?
This is a init.d script which will manage CPU frequencies, governors, IO scheduler, etc. based on the phone state.

Users are free to use this but ROM developers please DO NOT include this in your ROM. Please direct a link to this thread. This will make things at one place


Why I should use this script?
I have observed annoying LAG in many (almost all) 4.2.2 ROMs. I did some investigation and figured out that if we set the proper CPU governor and frequency then the lags are reduced greatly. I am happy with MIUI rom with this script...I feel like 4.1 ROM smoothness.
Click image for larger version

Name:	Screenshot_2013-10-24-08-35-59.jpg
Views:	2968
Size:	25.2 KB
ID:	2350940

Well, this is not a big thing. I can do it easily. What different specialty this script has?
Its not a big thing to set the frequency and governor but if you do it, it will eat your battery a lot. Running your CPU at full speed and both cores active is gonna take battery down very fast. So I thought that what if the settings are applied ONLY WHEN phone is active. When phone is sleeping, go back to default power saving settings. So we will have performance when needed with good battery backup. So I decided to write a init.d script which will manage this.

But, let me declare this - This script is aimed to improve performance. Expect little more battery drain than normal. If you want performance, you have to bear this. Also properly setting governors and frequencies you can minimize the battery impact.

Features:
  • init.d script, no need any app
  • Sets CPU governor and freques depending on phone state - awake or sleeping
  • High performance when you need the phone
  • Battery saver when phone is not in use
  • Configurable settings - choose your favourite configuration with few simple steps
  • Sets ADJ and MINFREE parameters to get good RAM
  • Supports multiple profiles - like setcpu (coming soon)
  • Aroma installer to choose your suitable configuration.(coming soon)

Will this work only on 4.2.2 or other ROMS as well
It will work on any ROM with proper kernel. In fact this can work on any device

Hmm. Ok how to change to my favorite configurations?
This script is configurable to suit your needs without writing single line of 'code'. There is a configuration file ->

/data/SuviBoosterScript/SuviBoosterConfig.sh (for V2.1 nad above)

/system/etc/SuviBoosterConfig (for V2 and below)
Here you can define your favorite governors for each core, scheduler, frequencies when phone is active and sleeping (yes different frequencies can be set), ADJ and MINFREE parameters, read_ahead_kb value, and some other script specific configurations. Open the file you will get it.

Where to downloads?
Your are not allowed to download unless you click on thanks. Attached here

Any pre-requirements?
Yes. You should be running on a kernel which supports the configurations.
init.d support
Recommended to remove any other script from init.d that manages CPU

How do I know whether the script is applied and working?
run the command on adb shell or terminal emulator to read and monitor log file ->

tail -f /data/SuviBoosterScript/SuviBooster.log (for V2.1 and above)

/data/SuviA110Booster.log (for V2 and below)

The command output should change as you awake or sleep the phone.

How bsuhas is going to enhance this?
Yes. I am planning to enhance the script further - adding condition that while charging, everything runs at full speed. some other setting which will make this script eventually a single point of performance boost of all times. You would not need anything else. I am also embedding this script in Suvi Tool.

(*This is not related to Suvi ROM)

Credits:
Inspired from CPU Editor by smokin1337
also to MarkusMcNugen for the idea
XDA
All A110 users and ROM developers
Special thanks to pratik more for MIUI V5 4.2.2 ROM which made me develop this script
Click 'Thanks' button if my above post helped you.
I work on Suvi ROM, Suvi Tool and Suvi Booster Script
 

My devices
- Micromax A110 Canvas 2
- Samsung Galaxy 3 i5801
My work -
One of the best ROMs for the Micromax A110 -
Suvi ROM
A generic android suit for windows (PC,Java) - Suvi Tool
A CPU manager script which boost your phones performance(init.d script) - Suvi Booster Script
The Following 147 Users Say Thank You to bsuhas For This Useful Post: [ Click to Expand ]
 
bsuhas
Old
(Last edited by bsuhas; 1st November 2013 at 08:35 PM.)
#2  
bsuhas's Avatar
Recognized Developer - OP
Thanks Meter 2840
Posts: 980
Join Date: Dec 2011

 
DONATE TO ME
Logs will be collected in a file -
/data/SuviBoosterScript/SuviBooster.log (for V2.1 and above)

/data/SuviA110Booster.log (for V2 and below)

run the command on adb shell or terminal emulator to read and monitor log file
tail -f /data/SuviBoosterScript/SuviBooster.log (for V2.1 and above)

tail -f /data/SuviA110Booster.log (for V2 and below)

Code:
Select Code
[26-10-2013 01:50:28 PM] setting /sys/devices/virtual/bdi/7:7/read_ahead_kb = 1024
[26-10-2013 01:50:28 PM] setting /sys/devices/virtual/bdi/default/read_ahead_kb = 1024
[26-10-2013 01:50:28 PM] setting /proc/sys/fs/lease-break-time = 10
[26-10-2013 01:50:28 PM] SuviBooster Script End, background script will continue
[26-10-2013 01:50:28 PM] Waiting for wake
[26-10-2013 01:50:28 PM] Current file size is 4 K
[26-10-2013 01:50:28 PM] setting /sys/devices/system/cpu/cpu1/online = 1
[26-10-2013 01:50:28 PM] Second core is now 1
[26-10-2013 01:50:28 PM] setting /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor = performance
[26-10-2013 01:50:28 PM] setting /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor = hybrid
[26-10-2013 01:50:38 PM] Waiting for sleep
[26-10-2013 01:51:24 PM] setting /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor = ondemand
[26-10-2013 01:51:24 PM] setting /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq = 667333
[26-10-2013 01:51:24 PM] setting /sys/devices/system/cpu/cpu1/online = 0
[26-10-2013 01:51:24 PM] Second core is now 0
[26-10-2013 01:51:24 PM] Waiting for wake
[26-10-2013 01:51:28 PM] setting /sys/devices/system/cpu/cpu1/online = 1
[26-10-2013 01:51:28 PM] Second core is now 1
[26-10-2013 01:51:28 PM] setting /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor = performance
[26-10-2013 01:51:28 PM] setting /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq = 1001000
[26-10-2013 01:51:28 PM] setting /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor = hybrid
[26-10-2013 01:51:38 PM] Waiting for sleep
Look into this file for troubleshooting. Send me this file if you feel some problem.
Click 'Thanks' button if my above post helped you.
I work on Suvi ROM, Suvi Tool and Suvi Booster Script
 

My devices
- Micromax A110 Canvas 2
- Samsung Galaxy 3 i5801
My work -
One of the best ROMs for the Micromax A110 -
Suvi ROM
A generic android suit for windows (PC,Java) - Suvi Tool
A CPU manager script which boost your phones performance(init.d script) - Suvi Booster Script
The Following 21 Users Say Thank You to bsuhas For This Useful Post: [ Click to Expand ]
 
bsuhas
Old
(Last edited by bsuhas; 6th November 2013 at 06:01 PM.)
#3  
bsuhas's Avatar
Recognized Developer - OP
Thanks Meter 2840
Posts: 980
Join Date: Dec 2011

 
DONATE TO ME
Configuration guide

The config file has some parameters which you can edit. File is present at
/data/SuviBoosterScript/SuviBoosterConfig.sh (for V2.1 and above)

/system/etc/SuviBoosterConfig (for V2 and below)

or you can edit the file in the zip before flashing.


New folder structure (from V2.1 onward).
/data/SuviBoosterScript/
- SuviBooster.log (log file)
- SuviBoosterConfig.sh (configuration file)
- current_version.txt (current version, do not edit)
- SuviBoosterScriptV2.1.sh (main script engine, do not edit)


#!/system/bin/sh
#Suvi Booster Script config file
#Users are free to use this but ROM developers please DO NOT include this in your ROM
#Dont forget to say thanks to bsuhas here

#The default settings here are suitable for Micromax A110 (which I have) - dual core 1GHz, 512MB RAM
#Please change values if you have any other device

#CPU Core 1 when screen is ON/Awake
GOVERNOR_CPU1="performance"
MAX_FREQ_CPU1="1001000"
MIN_FREQ_CPU1="250250"

#CPU Core 1 when screen is OFF/Sleep
SLEEP_GOVERNOR_CPU1="ondemand"
SLEEP_MAX_FREQ_CPU1="667333"
SLEEP_MIN_FREQ_CPU1="250250"

#Recomended to be "1" for dual core devices however, set to "0" if you don't want the script to turn the second core on/off
#Set to "0" for single core devices
SECOND_CORE_ON_OFF="1"

#CPU Core 2 when screen is ON/Awake
GOVERNOR_CPU2="hybrid"
MAX_FREQ_CPU2="1001000"
MIN_FREQ_CPU2="250250"

#CPU Core 2 when screen is OFF/Sleep
SLEEP_GOVERNOR_CPU2="ondemand"
SLEEP_MAX_FREQ_CPU2="667333"
SLEEP_MIN_FREQ_CPU2="250250"

IO_SCHED="cfq"

#######Advanced properties below. Do not touch if you dont know them######
#Memory mgmt
ADJ_PARAMS="0,1,2,4,7,15"
MINFREE_PARAMS="2048,4096,8192,16384,24576,32768"
READAHEAD_KB="1024"

#Read this file only one time (at boot) (="1") or every time device wakes up (="0")
#Recommended to be "1". If you are trying out different configuration and want it to be applied without reboot then set to "0"
CONFIG_READ_ONE_TIME="1"

#Interval in seconds for script to pause when checking device is awake or sleep.
#This interval will not matter much. Recommended not to change
WAKE_SLEEP_CHECK_INTERVAL="10"
Click 'Thanks' button if my above post helped you.
I work on Suvi ROM, Suvi Tool and Suvi Booster Script
 

My devices
- Micromax A110 Canvas 2
- Samsung Galaxy 3 i5801
My work -
One of the best ROMs for the Micromax A110 -
Suvi ROM
A generic android suit for windows (PC,Java) - Suvi Tool
A CPU manager script which boost your phones performance(init.d script) - Suvi Booster Script
The Following 15 Users Say Thank You to bsuhas For This Useful Post: [ Click to Expand ]
 
bsuhas
Old
(Last edited by bsuhas; 7th November 2013 at 06:44 PM.)
#4  
bsuhas's Avatar
Recognized Developer - OP
Thanks Meter 2840
Posts: 980
Join Date: Dec 2011

 
DONATE TO ME
Changelog
Suvi Booster Script V4.0 (7Nov2013)
  • AROMA
  • Built in profiles as per your needs, select from Aroma installer
  • New SBS logo
  • Aroma installer is all-in-one place for different profiles and uninstaller -
  • Profiles build-in -
    • Performance & Powersave
    • Hybrid & Powersave
    • Ondemand & Hybrid
    • Ondemand & Powersave
    • Performance & Hybrid
    • Sakuractive & Hybrid
    • Sakuractive & Powersave
  • Fixed sqlite3 binary on MIUI roms (maybe for all?)
  • Support to delete existing init.d tweaks
  • Other tweaks -
  • perfect mount options
  • Kernel VM management
  • Kernel scheduler, less aggressive settings
  • Misc tweaks for battery life
  • EXT4 tweaks - remove journalism
  • Defrags database files
  • Disable normalize sleeper
  • maybe some other ....


Suvi Booster Script V3.4 (6Nov2013)
  • Performance improvements (of script)
  • CPU1 and CPU2 settings are overlapped due to a bug (not in script but its MTK). Hence removed CPU2 governor and frequency settings.
  • 'performace' when awake, 'powersave' when sleep. Improve speed when active and saves battery when sleep.
  • guaranty to boost performance.....

Suvi Booster Script V3 (5Nov2013)
  • Performance improvements (of script)
  • No more background loop. Loop runs in main process.
  • Lags now reduced....(I hope so)
  • CONSIDER_BATTERY_STATUS="0" by default. to improve charging time
  • Sleep governors changed to conservative and powersave for CPU core 1 and 2 respectively - To improve battery life

Suvi Booster Script V2.1 (2Nov2013)
  • New folder structure.
    /data/SuviBoosterScript/
    - SuviBooster.log (log file)
    - SuviBoosterConfig.sh (configuration file)
    - current_version.txt (current version, do not edit)
    - SuviBoosterScriptV2.1.sh (main script engine, do not edit)
  • Re-factored code. More developer friendly
  • Prevents parallel execution. (due to bug in ROM). Script engine will ensure that its only one instance is running.
  • Permission issue fix. Run the script SuviBoosterConfig.sh once as root and then reboot.


Suvi Booster Script V2 (28Oct2013)
  • Added battery intelegence.
    #Consider the battery status in the script. like -
    #When charging, don't apply sleep setting freq and governors.
    #When battery is below 15 (see the BATTERY_MIN_LIMIT below) do not apply awake freq and governors
    #Set it to 0 if you want the script to ignore the battery status

    CONSIDER_BATTERY_STATUS="1"
    #The minimum battery percentage below which the battery saving profile is applied
    BATTERY_MIN_LIMIT="15"
  • Improved read_ahed_kb settings
  • Removed file monior loop. Now log file is cleared every 1000th execution of main loop.
Click 'Thanks' button if my above post helped you.
I work on Suvi ROM, Suvi Tool and Suvi Booster Script
 

My devices
- Micromax A110 Canvas 2
- Samsung Galaxy 3 i5801
My work -
One of the best ROMs for the Micromax A110 -
Suvi ROM
A generic android suit for windows (PC,Java) - Suvi Tool
A CPU manager script which boost your phones performance(init.d script) - Suvi Booster Script
The Following 22 Users Say Thank You to bsuhas For This Useful Post: [ Click to Expand ]
 
khan_frd2002
Old
(Last edited by khan_frd2002; 26th October 2013 at 09:59 AM.)
#5  
khan_frd2002's Avatar
Senior Member
Thanks Meter 1369
Posts: 1,104
Join Date: Nov 2011
Location: Dressosa

 
DONATE TO ME
Quote:
Originally Posted by bsuhas View Post
Last one....thanks for patience.
@bsuhas.... Here is My review after Using it 10 mins
I must say it works perfect no lag at all
scrolling is smooth transition is smooth
Great Work Bro

As I know its just beginnings but some suggestions from my side
add some dalvik tweak in script ( as it good for gamers and give more smoothness)
and also try to update the update script so that it will delete all the init.d script which is already there (as i have to delete the init.d tweaks myself before installing)

Other Than All Good.....
The Following 3 Users Say Thank You to khan_frd2002 For This Useful Post: [ Click to Expand ]
 
sheshuvadrevu
Old
#6  
Senior Member
Thanks Meter 396
Posts: 411
Join Date: Dec 2012
Location: Hyderabad

 
DONATE TO ME
This is what all 4.2 Roms desperately need... This is what I have suggested to someone who felt 4.2 roms are laggy, i suggested him CPU Tuner app which does the same thing what this script does... It will sure help many roms to show their real power... Thanks Brother!

I will come up with the review soon...
The Following User Says Thank You to sheshuvadrevu For This Useful Post: [ Click to Expand ]
 
showstopper1
Old
#7  
showstopper1's Avatar
Senior Member
Thanks Meter 1974
Posts: 1,277
Join Date: Nov 2011
Flashed juz now,
Noticable changes in smoothness and performance
Will test battery and report soon
Wonderful work @bsuhas
Feeling the power of the script.
Sent from my A110 using xda app-developers app
█ Galaxy s3
The Following User Says Thank You to showstopper1 For This Useful Post: [ Click to Expand ]
 
vinod210383
Old
#8  
Member
Thanks Meter 17
Posts: 77
Join Date: May 2013
Downloading and testing.

Will update the results and output.

Hope this one will change my mind to switch back to 4.1.



---------- Post added at 02:13 PM ---------- Previous post was at 02:12 PM ----------

Downloading and testing.

Will update the results and output.

Hope this one will change my mind to switch back to 4.1.

The Following 3 Users Say Thank You to vinod210383 For This Useful Post: [ Click to Expand ]
 
shekhar1986
Old
#9  
shekhar1986's Avatar
Senior Member
Thanks Meter 107
Posts: 192
Join Date: Aug 2013
Location: delhi
@bsuhas sir will this conflict with sir andiroxu 3.4.69 kernel .
can i use it on that as PX is already included in that kernel
The Following User Says Thank You to shekhar1986 For This Useful Post: [ Click to Expand ]
 
snhykoba
Old
#10  
snhykoba's Avatar
Member
Thanks Meter 27
Posts: 68
Join Date: Sep 2013
Location: Somewhere in the earth
Sir..
- is this script works on 4.1.x ROMs..
- I am already in andirox 3.4.69. I set hybrid governer and cfg with no frill app.. may I remove setting..
- I am using 300 mob swap ram file with init.D folder.. may I remove this..
¡ Don't Forget To Hit The Thanks Button If You Like My Work Or If I Helped You!


Never underestimate the power of human stupidity

The Following User Says Thank You to snhykoba For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes