Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,731,757 Members 47,725 Now Online
XDA Developers Android and Mobile Development Forum

[MOD] [TWEAKS] Thunderbolt Mod for Smoothness, Performance & Battery improvements

Tip us?
 
Perseus71
Old
(Last edited by Perseus71; 2nd February 2014 at 05:47 PM.)
#1  
Perseus71's Avatar
Recognized Contributor - OP
Thanks Meter 3325
Posts: 5,625
Join Date: Feb 2011
Location: Atlantis

 
DONATE TO ME
Default [MOD] [TWEAKS] Thunderbolt Mod for Smoothness, Performance & Battery improvements

Introduction -

This thread is intended to introduce Thunderbolt! Mod by @pikachu01 to Galaxy SIII users. (I did ask for and got Moderator permission due to perceived duplicate nature of the thread.)

First and foremost, here is the Original Thunderbolt thread. I do not take credit for the mod. All thanks go to @pikachu01.

Practically all the D2TMO/D2ATT/D2SPR/D2VZW users are using one version or other of Jelly Bean. So, although the original thread covers anything from Gingerbread to Jelly bean, I wish to provide a simple set for JB specific usage. Another reason for this thread is to explain what this mod does so that the average user understands what's going to happen and also be able to distinguish with other Mods. I have personally used this mod and given that I understand the underlying principle, I strongly recommend this mod.

Benefits -
  • Better performance through Linux kernel tweaks catered for Android OS and flash memory.
  • Better battery life through usage of screenstate_scaling whereby it switches thresholds/VM tunables depending on your screen state.
  • Better performance for database writes as fsync is not utilized any more.
  • Better network throughput from TCP tweaks and 3G tweaks.
  • Less RAM usage through zipaligning of all the apps.
  • Reduced /dbdata, /data, /sdcard usage of *.db files and faster database access through defragmentation of sqlite db files (a lot of apps use Database to store data like Swype dictionaries, Game saves etc)
  • Faster disk access through remount script (noatime, disable barrier etc)
What does it do -

I will try to explain as simply as possible what the mod does. This will help clarify for the first timers as well as experts.
 

  1. Partition Remount Each Partition is Remounted with the Noatime option set. This will avoid a Write operation whenever Android reads from disc. Thus improving performance significantly.
  2. Optimizing SQLITE Database SQLITE is a lightweight database used extensively in Android apps. Its the basis for saving application data and images. For each app, there is a separate instance. With significant write activity, the database gets fragmented and is not on consecutively arranged on the Flash storage. If this is optimized, read operations as well as write operations of every application will significantly boost. Thus improving overall smoothness. However, if you have a lot of applications and each application having lot of data in the database, (For ex. Games, TiBU or Social Media) optimization operation will take some time. Fortunately you don't have to do this frequently. Even once a week will do wonders.
  3. APK Re-Alignment Each application comes packaged as APK or Android PacKage file. These are internally packaged as an archive. Within the archive, uncompressed data needs to be aligned with respect to beginning of the file. When aligned in this way, the files are read quicker and executed efficiently. This contributes to a smooth experience. Quiet a few apps on Google Play are not aligned when you install. This will eventually contribute to a sluggish and less than optimal experience. Aligning the files once a week will help avoid this. If you tend to install new apps frequently, you might be better off putting this file in init.d, so this will be executed at each boot.
  4. Network Parameter tweaking In Build.prop, size values of buffers should be increased given higher RAM sizes on these phones. This tweak is pretty well known to most of the people on XDA.
  5. Scheduler Tweaking This only applies to Kernels that implement CFS Scheduler. Users of KT747 Kernel can ignore this as that kernel does not implement CFS. For those who have it, tweaking the Scheduler parameters knowing the files are zipaligned, will render smoother experience.
Download & Installation -

I highly recommend taking a Nandroid backup before proceeding to flash this mod.


Download Link for the JellyBean Thunderbolt! Mod zip file download Link
- JellyBean Version.

  1. Copy the zip file to your SD Card (internal or external).
  2. Install Script manager from Google Play Store. Also optionally install Terminal Emulator (Only needed to verify successful install).
  3. Flash the Thunderbolt! zip in Recovery and then reboot the device.
  4. If you experince Boot Loops, please flash the undo script or restore your Nandroid. Let me know.
  5. Open Script Manager.
    1. Launch S98screenstate_scaling as Root (The Skull icon). If it executes successfully, set it to run at Boot (The Wheel Icon).
      NOTE - This script is not compatible with some Roms. Please test it to see if it works with your Rom before setting it to run at boot.
    2. Launch S98system_tweak as Root (The Skull icon). If it executes successfully, set it to run at Boot (The Wheel Icon).
    3. Launch /etc/bolt_scripts/remountNexus4 as Root (The skull icon) and as Boot (The wheel icon).
      Note - Given this re-mount is not for US versions of Galaxy S III, you may get errors on the subsequent screen. Ignore them and hit back button.
    4. Launch /etc/bolt_scripts/sqlite_optimize as Root (The skull icon).
      Note - This script can be used at anytime you want except at boot so do not set that way (the wheel icon) or from inside init.d. Given it's a very long running script, it will inordinately held up boot up process.
    5. Launch /etc/bolt_scripts/s70darky_zipalign as Root (The skull icon).
      Note - This script can be used anytime you want including as Boot (Wheel icon) or within init.d folder. If you copy it to init.d set its permission to rwx-rwx-rwx. Also note, this script is located under bolt_scripts since users with a large set of apps may experience quiet a bit of delay during boot up.
    6. Launch /etc/bolt_scripts/CFS/S98CFS as Root (The skull icon) and as Boot (The wheel icon).
    7. Launch /etc/bolt_scripts/S98TCPbuffers as Root (The skull icon) and as Boot (The wheel icon).
That's it. Enjoy!

PLEASE DO NOT FORGET TO THANKS @pikachu01 at his original thread here.

Reverting/Undoing ThunderBolt!
  • To revert ThunderBolt!, download the ThunderBolt! Restore.zip
  • Do note that reflashing your ROM will remove ThunderBolt! as well.
The Following 11 Users Say Thank You to Perseus71 For This Useful Post: [ Click to Expand ]
 
Perseus71
Old
(Last edited by Perseus71; 19th August 2013 at 12:38 AM.)
#2  
Perseus71's Avatar
Recognized Contributor - OP
Thanks Meter 3325
Posts: 5,625
Join Date: Feb 2011
Location: Atlantis

 
DONATE TO ME
How to find out if it works

Use File Explorer/ Root Explorer/Root Browser, and navigate to

/system/etc/init.d/

There you should find (among other things) s98system_tweak file. That indicates successful flashing of the mod.

The longer method to confirm success, requires executing some commands via Terminal Emulator. Explore these inside the hidden text bellow if you wish.

 

The way to validate success and effectiveness of this mod is checking on how often the Kernel writes to internal SD card. For one, android scheduler does not perform an immediate write operation when the app requests it. It rather waits till its buffer is full and then does the write. Secondly, given its solid state storage, it is extremely fast compared to your computer. So what we are doing here is modifying the Buffer size in accordance with your Ram. The more the ram, the bigger the buffer.

The third parameter, vfs_cache_pressure actually tells the kernel to favor File System Cache. So the ram will fill up for the File system cache, thus increasing application performance.

So to test, using Terminal Emulator, do the following Steps. Press Enter after each to execute them individually.

To enter superuser mode and then execute,
Code:
SU
sysctl -a | grep vm
You will get a screen like this.


You are looking for the values highlighted in the screen.

If your phone has 1GB Ram or less, you should see values like bellow,

Code:
vm.dirty_background_ratio = 10 
vm.dirty_ratio = 20 
vm.vfs_cache_pressure = 50
Since Galaxy SIII has 2 GB Ram, you should expect to see values like this

Code:
dirty_background_ratio = 5 
dirty_ratio = 10
vfs_cache_pressure = 50
With the phone screen off, you may use ADB to run the same commands.

Code:
su 
sysctl -a | grep vm
ADB should get these values with the phone screen turned off.

For devices with 1GB RAM devices or below, you should see in the output,

Code:
dirty_background_ratio = 20 
dirty_ratio = 40 
vfs_cache_pressure = 100
For Galaxy S III, given it has 2 GB Ram, you should see,
Code:
dirty_background_ratio = 10 
dirty_ratio = 20 
vfs_cache_pressure = 100
The Following User Says Thank You to Perseus71 For This Useful Post: [ Click to Expand ]
 
Perseus71
Old
(Last edited by Perseus71; 12th September 2013 at 03:17 AM.)
#3  
Perseus71's Avatar
Recognized Contributor - OP
Thanks Meter 3325
Posts: 5,625
Join Date: Feb 2011
Location: Atlantis

 
DONATE TO ME
Q&A REGARDING THE MOD -

Please note, there are also following MODs compatible with Galaxy SIII, that I am aware of. However they differ from this mod. So I have given a short Summary of the distinction between those mods and this one.

1. How is this different from Crossbreeder ? So which Mod is better ?

Crossbreeder by @idcrisis is a mod that focuses on better implementation of DNS Catching and Parallalization of DNS queries. It also improves on tethering and blocks Ads. Last but not the least, it also modifies Entropy levels like Seeder.

What Thunderbolt does, is more on installed Apps and disk I/O improvement. So those two MODs can co-exist just fine and do not conflict or have overlapping functionality.

2. How is Thunderbolt different from V6 SuperCharger Mod by @zeppelinrox ?

V6 Supercharger focuses on invincibility of the Android Launcher. This could be any Launcher you are using as default. It also tweaks significantly to Android's Low Memory Management (AKA Low Memory Killer). This latter will significantly improve Multitasking capabilities.

As you see, this too is quiet different from what Thunderbolt does. So there is no overlap or competition per se. You can implement both at the same time.

2. How is Thunderbolt different from Operation Killjoy Mod by @Exit_Only ?

I am investigating the compatibility. Until then Unless noted, the two are not compatible with each other.
Note - If I have not mentioned a compatible Mod, then please let me know and I will be more than happy to post it here.
The Following User Says Thank You to Perseus71 For This Useful Post: [ Click to Expand ]
 
Supamike88
Old
#4  
Supamike88's Avatar
Senior Member
Thanks Meter 41
Posts: 667
Join Date: Nov 2010
Running Dandroid. I flashed the mod and it gets stuck on bootscreen

Sent from my SGH-T999 using xda app-developers app
 
Perseus71
Old
#5  
Perseus71's Avatar
Recognized Contributor - OP
Thanks Meter 3325
Posts: 5,625
Join Date: Feb 2011
Location: Atlantis

 
DONATE TO ME
Quote:
Originally Posted by Supamike88 View Post
Running Dandroid. I flashed the mod and it gets stuck on bootscreen

Sent from my SGH-T999 using xda app-developers app
Thanks for testing.

Do you have a lot of applications installed on your phone ? Also at what step did it get stuck at boot screen ?

Please note, as I said earlier in the thread, while executing boot up script, the phone may appear to be stuck at Boot screen but will eventually come back. It is very important to know at what step it got stuck at boot.
 
Kama45
Old
#6  
Senior Member
Thanks Meter 26
Posts: 144
Join Date: Jul 2010
Is this compatible with Killjoy?

Sent from my SGH-T999 using Tapatalk 2
 
Perseus71
Old
#7  
Perseus71's Avatar
Recognized Contributor - OP
Thanks Meter 3325
Posts: 5,625
Join Date: Feb 2011
Location: Atlantis

 
DONATE TO ME
Quote:
Originally Posted by Kama45 View Post
Is this compatible with Killjoy?

Sent from my SGH-T999 using Tapatalk 2
If you are referring to the Touchwiz Killjoy Rom, yes I believe so.

Please note, given that rom is Touchwiz, the Remount script in op may not work. So please do not set it to run at Boot.
 
Supamike88
Old
#8  
Supamike88's Avatar
Senior Member
Thanks Meter 41
Posts: 667
Join Date: Nov 2010
Quote:
Originally Posted by Perseus71 View Post
Thanks for testing.

Do you have a lot of applications installed on your phone ? Also at what step did it get stuck at boot screen ?

Please note, as I said earlier in the thread, while executing boot up script, the phone may appear to be stuck at Boot screen but will eventually come back. It is very important to know at what step it got stuck at boot.
I downloaded the mod, rebooted into recovery, flashed the mod, rebooted and waited for it to load but it never got past the splash screen. I waited for about 5 minutes

Sent from my SGH-T999 using xda app-developers app
 
LuigiBull23
Old
#9  
LuigiBull23's Avatar
Recognized Contributor
Thanks Meter 5222
Posts: 5,490
Join Date: Jan 2013
Location: Holyoke

 
DONATE TO ME
I believe he's referring to the Operation Killjoy script by Team Kernelizer member @Exit_Only and if that's the case then unless stated otherwise, this will not work alongside Killjoy. As of right now the only approved script package to run with Killjoy is Croossbreeder.


 
Quote:
ROM: Liquidsmooth v3.0 (Nightly 3/13) ~ LiquidSmooth [Q&A/T]
Kernel: KT-SGS4 ~ Ktweaker Shop / Ktweaker User Guide
Radio: MDL
Recovery: TWRP 2.6.3.0
Mods: Xposed + Greenify + Project Comatose - Rebirthing profile
Andriod Terminology / Development Guide
The Following User Says Thank You to LuigiBull23 For This Useful Post: [ Click to Expand ]
 
Kama45
Old
#10  
Senior Member
Thanks Meter 26
Posts: 144
Join Date: Jul 2010
Thank you, Luigi. I was referring to Operation Killjoy.

Tags
sql optimization, system accelerator, tweak
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes