FORUMS
Remove All Ads from XDA

[KERNEL][LP][May 29] ThunderZap 4.16 | Zooom Zoooom!

3,153 posts
Thanks Meter: 15,604
 
Post Reply Email Thread


Code:
#include 
/*
 * I am not responsible for bricked devices, dead SD cards, thermonuclear
 * war, or the current economic crisis caused by you following these
 * directions. YOU are choosing to make these modificiations, and
 * if you point your finger at me for messing up your device, I will
 * laugh at you.
 */

FEATURES:

-Based on latest sources
- Compiled off Linaro 4.9.3!
- Philz Recovery 6.48.4
-Insecured
-/system mounted as rw
-CPU Overclockable upto 1.7Ghz
-GPU Overclockable to 500Mhz
-Optimized RWSEM Algorithms
-LZO compression for faster boot
-Disabled GENTLE_FAIR_SLEEPERS
-Dynamic Fsync control
-Optimized AES and SHA1 routines
-Neon optimizations
-Removed old SHA1 routines
-Optimized git implementation for SHA1
-Lowered vfs cache pressure size to 20
-Enabled ARCH_POWER
-Optimizations to default SLUB allocator
-Patch for depleting entropy requiring no need of frandom or any rngd tweaks
-Tuned CFS parameters
-Asynchronous I/O latency to a solid-state disk greatly increased
-Optimized conservative governor
-Optimizations to Android lowmemorykiller
-Faster NOATIME and NODIRATIME fs mounting flags
-CPU Voltage Control
-Lowered log buffer shift
-O3 Optimizations
-Optimized apply_slack() method for size and speed
-Lock initial TCP window size to 64k (Improves network ping and output)
-Dynamic management of dirty page writebacks
-Philz recovery
- Introducing Intelli_thermal - A new thermal protection mechanism ported to MSM8930 by me, originally developed by faux123 (Replaces stock msm_thermal)
- Introducing ThunderSonic Sound Engine - A sound control driver wholly developed by me
- Introducing Charger Control 2.0 - A charger current rate control driver wholly written by me

- Nullified all the RAM and battery issues by disabling some unnecessary stuff!
- Added zSwap from Linux 3.11 [More RAM love? ]
- Added frontswap
- Added vnswap - a virtual swap page file residing the RAM memory pool.
- Disabled FRAME_POINTER slowing down the kernel
- Added Intelli_active governor
- Tuned the kernel for Cortex-A15
- Disabled lots of debugging
- Added native LZ4 compression support
- Added full support for Android Kitkat in separate version
- Fixed second core frequency overiding issue
- Now powered by AROMA Installer
- Disabled proc fs config storage swelling the kernel
- Added generic input joystick support
- Loads of other code cleanups and arbitrary optimizations
- Introduced in GPU Voltage Control
- Added BFQ IOScheduler
- FIOPS IOScheduler
- Added Assload of new TCP Congestion controls
- Improved IO throughput
- Merged some writeback patches to improve vmscan module
- Added native Samsung F2FS filesystem support
- Linux MM Readahead set to 256k
- Recovery some RAM by reducing android logger memory allocation
- Patches to improve deep sleep
- Disabled useless userspace and powersave governors
- Switched to XZ kernel compression
- Removed ARM tracer debug code


DOWNLOAD:

Mirror 1


GPL Compliance:
http://bit.ly/1cypvyz

Just a statement regarding kernel source: The Kernel Source is of course covered under GPL version 2. Free software does NOT mean no work or time was spent working on it. I have donated a large sum of my free time to this kernel. If you want to include my kernel in your project or use my source code, please mention it in your post, give proper credits.
Opensource does not mean 'Out-of-credit'
Thank you.


Credits:
@DD-Ripper : For amazing logo design!
@faux123- For his various kernel patches and features.
And all others mentioned on my github in contributors tab.

XDA:DevDB Information
ThunderZap Kernel, Kernel for the Sony Xperia L

Contributors
varun.chitre15
Kernel Special Features: Stability coupled with Velocity!

Version Information
Status: Stable

Created 2013-09-22
Last Updated 2015-08-29
The Following 217 Users Say Thank You to varun.chitre15 For This Useful Post: [ View ]
 
 
3rd August 2013, 03:24 PM |#2  
varun.chitre15's Avatar
OP Recognized Developer
Flag Sangli
Thanks Meter: 15,604
 
Donate to Me
More
Reserved
ThunderZap 4.9 - November 7

Code:
- Compatibility with CM12 beta 2
- SELinux enabled and set to permissive
ThunderZap 4.8-r2 - Not released

Code:
- Fix un-bootability issues with some phones
- 1.7 Ghz OC now available for Kitkat variant too
- SELinux enabled and set to permissive
ThunderZap 4.8 - November 22

Code:
- Lollipop compatibility
- ThunderSonic Engine 2.0 - Implemented locking mechanism
- Pushed CPU Clock to 1.7Ghz - (Lollipop only)
- Merged Lollipop patches from CAF
- BFQ IOScheduler updated to v7r6
- Optimized Low memory killer to reduce aggressiveness
- Memory management patches from Nexus 6 kernel
- CPUFreq optimizations from Nexus 6 kernel
- Patches to TCP from upstream
ThunderZap 4.7 - September 14

Code:
- Updated exFAT to latest upstream version
- Huge bunch of Samsung F2FS updates
- TWRP 2.8.0.0New
- Philz Touch 6.57.5 Updated
- Dual recovery is here!New - TWRP+Philz Touch
- Fixed in-recovery 1970 timing mismatch
- Optimizations to cpufreq driver
- New governor: SmartMax: This is my new favorite governor, an ideal choice for optimum performance and battery backup
- New IOScheduler: TripNDroid: My second favorite scheduler after BFQ!
- Optimized GPU flags
- Sysfs interface to control GENTLE_FAIR_SLEEPERS on the fly
- BFQ scheduler optimized for SSD
- Disabled add_random method for improved IO performance
- Moved to Linaro 4.7 from Linaro 4.6
- Enabled aggressive multi-core power savings
- Updated base CAF sources with over 100 new patches that go to VIDC, Adreno GPU driver, qssecom daemon, touchscreen driver etc
- Updated wifi driver from latest CAF sources
- Speedup in /proc/net/unix access
- Optimizations to ext4 filesystem from upstream.
v4.6 - July 10

Code:
Introduced in GPU Voltage Control - instructions on Post #3
- Pushed CPU clock to 1.6Ghz
- Added BFQ IOScheduler v7-r5 (my favorite one)
- Brought back FIOPS IOScheduler
- Added Assload of new TCP Congestion controls 
Code:
    * .westwood (default)
    * .reno
    *. bic
    *. highspeed
    *. hybla
    *. htcp
    *. vegas
    *. veno
    *. scalable
    *. yeah
    *. lp
    *. illinois
- Improved IO throughput
- Merged some writeback patches to improve vmscan module
- Added native Samsung F2FS filesystem support
- Linux MM Readahead set to 256k
- Recovered some RAM by reducing android logger memory allocation
- Patches to improve deep sleep
- Disabled useless userspace and powersave governors
- Switched to XZ kernel compression
- Removed ARM tracer debug ****
- Philz touch updated to 6.48.4
- Merged all CAF kernel changes
- Compatibility to latest CM releases(model number issues)
v4.5-r1 - June 16
Code:
- Merged in all CAF kernel changes
- Philz touch updated
- Compatibility with new CM build
v4.5 - June 14
Code:
- Added compatibility for Kitkat
- CPU freq down to 1.5Ghz
- Philz recovery
- Updated wifi driver
- Updated CAF source to Android 4.4.3
- Fixes to Thundersonic Engine for future app compatibility
- Removed some unused features, rest all features intact!
v4.1-r2 - Mar 20
Code:
- Added compatibility to CM11-M4
- Workaround for internal storage - Now you can have full access to your internal storage at a new mount point in /storage/sdcard2! on any 4.4 ROM


v4.1 - Mar 10
Code:
- Removed GPU OC, ROW & FIOPS IOscheduler
- Updated TWRP to latest 2.7.0.0
- TWRP : Working implementation of reboot recovery
- Fixed the shutdown and logolooping problems
v4.0 - Mar 06 - Major release
Code:
- Introducing Intelli_thermal - A new thermal protection mechanism ported to MSM8930 by me, originally developed by faux123 (Replaces stock msm_thermal)
- Introducing ThunderSonic Sound Engine - A sound control driver wholly developed by me
- Introducing Charger Control 2.0 - A charger current rate control driver wholly written by me
- Nullified all the RAM and battery issues by disabling some unnecessary stuff!
- Upgraded sources to 3.4.82 [More than 3000 new improvements]
- Added SELinux support
- Overclocked upto 1.7Ghz - With the second core overiding issue almost vanished we don't have any issue with higher OC 
- Added support for Microsoft XBox 360 Xpad controller (experimental)
- Added zSwap from Linux 3.11 [More RAM love? ]
- Added frontswap
- Added vnswap - a virtual swap page file residing the RAM memory pool.
- Disabled FRAME_POINTER slowing down the kernel
- Asynchronous Fsync from HTC kernels
- Added Intelli_active governor
- Added ROW IOScheduler
- Added FIOPS IOScheduler
- GPU OC upto 533Mhz
- Enabled hardware real-time clock write access - Fixes mismatched timestamps in recoveries and their backups
- Tuned the kernel for Cortex-A15
- Disabled lots of debugging
- Added native LZ4 compression support
- Added full support for Android Kitkat in separate version
- CD-ROM emulation via sysfs lun file (Thanks to @FrozenCow)
- Fixed second core frequency overiding issue
- Added TWRP 2.6.3.0(latest) in separate version
- Updated CWM to 6.0.4.7(latest)
- Now powered by AROMA Installer
- Disabled proc fs config storage swelling the kernel
- Added generic input joystick support
- CWM Recovery changes: Completely working reboot recovery implementation
- Loads of other code cleanups and arbitrary optimizations
v3.1 - Dec 28
Code:
- Disabled Memory compaction - should fix overusage of RAM issue
- Optimized and reduced voltage table by 62mV
- Merged 15.3.A.1.12 sources - Kernel is now future compatible with the new firmware
- Boosted the display panel frame-rate slightly for more smooth UI
- Added back the Westwood TCP Congestion control and set it as default - Should manage all Network traffic more efficiently!
v3.0 - Nov 28
Code:
*. Major update - Read changelog here
v2.0-rc1 - Aug 07
Code:
*. Voltage table fixed causing phone freeze
v2.0 - Aug 03
Code:
*. Initial release
The Following 19 Users Say Thank You to varun.chitre15 For This Useful Post: [ View ]
3rd August 2013, 03:24 PM |#3  
varun.chitre15's Avatar
OP Recognized Developer
Flag Sangli
Thanks Meter: 15,604
 
Donate to Me
More
FAQs

Well lets begin, almost all features can be controlled using the TricksterMOD

How to access recovery?

Keep pressing volume down button when you see Thunderzap logo

Now special things about this!-
1. You can also use camera key to boot into recovery! hell yeah! BUT remember, NOT to use it for your first recovery boot. Make first recovery boot only using vol down key! Remember this. If you do so, phone will stuck up on ThunderZap logo and your key combo will get swapped and remapped to Volume up and you would need to use Vol up to boot into recovery until the next kernel flash.

2. You can also reboot to recovery from your Android OS directly! Yes I have done it! But same criteria as above! not to use that way for first boot. After you are done with first recovery boot you can use camera key, terminal way anytime!!

So how to use the terminal way?
Open terminal emulator[NOT adb shell]
Gain su permissions and type
Code:
start-cwm
And within a minute you will be in CWM!



How to determine which TCP congestion to use??

Quote:

Latency - Download - Upload

cubic:
1st run: 15ms - 10,75Mbps - 7,82Mbps
2nd run: 14ms - 10,84Mbps - 8,06Mbps

reno:
1st run: 13ms - 15,51Mbps - 6,73Mbps
2nd run: 13ms - 14,73Mbps - 8,51Mbps

bic:
1st run: 12ms - 10,38Mbps - 8,61Mbps
2nd run: 13ms - 10,78Mbps - 8,62Mbps

westwood:
1st run: 11ms - 17,65Mbps - 8,30Mbps
2nd run: 13ms - 13,28Mbps - 8,29Mbps

highspeed:
1st run: 13ms - 10,76Mbps - 7,94Mbps
2nd run: 16ms - 14,42Mbps - 8,52Mbps

hybla:
1st run: 14ms - 11,19Mbps - 7,44Mbps
2nd run: 14ms - 13,47Mbps - 7,56Mbps

htcp:
1st run: 14ms - 13,24Mbps - 7,03Mbps
2nd run: 15ms - 10,85Mbps - 8,00Mbps

vegas:
1st run: 14ms - 8,49Mbps - 6,62Mbps
2nd run: 14ms - 12,00Mbps - 7,07Mbps

veno:
1st run: 13ms - 9,58Mbps - 8,13Mbps
2nd run: 13ms - 8,50Mbps - 7,64Mbps

scalable:
1st run: 18ms - 12,01Mbps - 8,73Mbps
2nd run: 14ms - 13,96Mbps - 8,23Mbps

lp:
1st run: 14ms - 14,90Mbps - 8,68Mbps
2nd run: 14ms - 13,44Mbps - 8,72Mbps

yeah:
1st run: 14ms - 13,37Mbps - 8,28Mbps
2nd run: 17ms - 13,89Mbps - 8,14Mbps

illinois:
1st run: 13ms - 12,93Mbps - 8,24Mbps
2nd run: 16ms - 13,97Mbps - 6,46Mbps

See above chart and decide which to use! But westwood has been set as default!
Some of them from above chart won't be present, so watch only those which are present in feature list.


Q. How to use vibration intensity control?

echo "your-value" > /sys/devices/virtual/timed_output/vibrator/level
Values range is 12-31. None other



Q. How to use ThunderSonic Engine?
It is a sound control driver. There are two interfaces which you can control
1. Headphone boost - I made this feature because louder volume than max volume in earphones rushes more adrenaline in me making music more enjoyable.
Turning this On will give you instant significant volume boost in earphones which is greater than what you get when the volume is max. Just make the volume maximum and turn this ON and you will notice it

How to turn on:
In terminal emulator/ adb shell, get su permissions and then type
Code:
echo 1 > /sys/kernel/thundersonic_engine/headphone_boost
and use 0 to turn off

2. Speaker boost - In crowded areas I felt speakers of XL fall short in terms of volume magnitude. So I made this to increase speaker volume speakers beyond its limit and now my phone sounds even louder than those dirt cheap china phones
This is 8-leveled boost interface. That means there are 8 boost levels. The default is 3 on TZ
How to turn on
Code:
echo X > /sys/kernel/thundersonic_engine/speaker_boost
where X can be any value from 4 to 8 depending upon the volume boost you require To reset back to default use value 3

Use above features with caution. Using headphone boost for a long time may damage your ears. And do not use speaker boost for a long time. If for some songs you hear crackling of speakers then reset its boost level to 3 or a relatively lower level of 4 or 5



Q. How to use charger control?
1. AC current control: In times of hurry I felt the charging times to be too long and so I made this. With this you can control the charging current rate through wall charger.

Before doing anything you first need to enable the master switch of the control or else the values you write will be negelected

How to enable master switch
Code:
echo 1 > /sys/kernel/charger_control/enabled
After this you can use custom current values like this
Code:
echo X > /sys/kernel/charger_control/custom_ac_current
where X can be any value in mA (Milliamperes) I use 1600 i.e 1600mA which completes my phone's charging from 3% to 100% in around 1 hour 30 mins.
The stock current ranges from 1000-1100mA and takes around 2 hour 30 mins to 3 hours. Avoid using values higher than 2200.

2. USB current control: Everyone knows the charging rate from PC via USB is damn slow. Many new PC's have newer USB ports which can offer current rates higher than 1500mA but still our kernel only pulls 500mA. I made this to control it yourself
As usual you need master switch enabled to write the new values.

How to use
Code:
echo X > /sys/kernel/charger_control/custom_usb_current
where X can be any value in Milliamperes. I use 1500 i.e 1500mA


Q. How to use GPU Voltage Control?
Currently there are no GPU voltage controlling apps. The upcoming ThunderZap control app supports that.

Obtain current voltage values
Code:
cat /sys/devices/system/cpu/cpu0/cpufreq/gpu_mv_table

Output will be something like this:
 945 mV
 1050 mV
 1150 mV
Change these values:
Code:
echo "930 1000 1100" > /sys/devices/system/cpu/cpu0/cpufreq/gpu_mv_table

This will change the voltages as below
930 mV
1000 mV
1150 mV


Q. I am having abnormal battery drain

Most of the time the kernel isn't responsible for this.
a) Make sure you are on stock frequency of 1Ghz. Sometimes the frequency is getting overridden to 1.5Ghz even if you didn't set that. To avoid such situations use frequency lock option from Trickstermod kernel app.
b) The kernel is not pre-undervolted any more. You can undervolt it on your own. Optimum value is 75mV. Don't undervolt more than that



Q. How to use extra modules provided

Best way is to use init.d script to load them on boot.
e.g If you want to use the NTFS file system module. You have to first place the ntfs.ko module provided in /system/lib/modules. Then you need to create an init.d script in /system/etc/init.d with any name say 99modules with following code
Code:
#!/system/bin/sh
insmod /system/lib/modules/ntfs.ko
Next you need to give that file all permissions and reboot the phone and you are done!
P.S: Loading external modules affects battery life of the phone.
The Following 54 Users Say Thank You to varun.chitre15 For This Useful Post: [ View ]
3rd August 2013, 03:25 PM |#4  
varun.chitre15's Avatar
OP Recognized Developer
Flag Sangli
Thanks Meter: 15,604
 
Donate to Me
More
reserved
The Following 52 Users Say Thank You to varun.chitre15 For This Useful Post: [ View ]
3rd August 2013, 03:45 PM |#5  
Inactive Recognized Developer
Thanks Meter: 3,487
 
More
Good work.
All the best.
The Following 12 Users Say Thank You to rachitrawat For This Useful Post: [ View ] Gift rachitrawat Ad-Free
3rd August 2013, 04:17 PM |#6  
Shivam Kuchhal's Avatar
Senior Member
Flag New Delhi
Thanks Meter: 1,713
 
More
Smile
Good job man.
Best of luck!
The Following 2 Users Say Thank You to Shivam Kuchhal For This Useful Post: [ View ] Gift Shivam Kuchhal Ad-Free
3rd August 2013, 04:24 PM |#7  
varun.chitre15's Avatar
OP Recognized Developer
Flag Sangli
Thanks Meter: 15,604
 
Donate to Me
More
Post #3 updated with all controlling stuff!
Enjoy!
The Following 13 Users Say Thank You to varun.chitre15 For This Useful Post: [ View ]
3rd August 2013, 04:57 PM |#8  
Inactive Recognized Developer
Thanks Meter: 3,487
 
More
I've some concerns :-

1) As you can see from screenshot, default boot frequency of cpu0 is 1188 MHz while of cpu1 jumps to 1566MHz on load.
This is one of few reasons I disabled overclock in my kernel. One should enable intelliplug and disable mp decision to fix this.

Code:
su
stop mpdecison
2) Eco-Mode? Isn't it for quad core devices? Turning it off disables two cores. And we've only two.

3) Intelliplug works well.

4) Your voltage table is wrong. 1242MHz runs at lower voltage than 1188MHz. It's also irregular.
for example all 384,432,486 MHz run at same voltages.

5) Your ramdisk.cpio contains another ramdisk.cpio + pack script. Remove these junks.

6) xz -e offers best compression ratio but it's way slower than lzop (which in turn has poorest compression ratio).
So, xz compressed kernel is light weight but takes longer time ( usually 3-4 seconds more to decompress fully) than lzop compressed one.
You can see benchmark comparsion of gzip,xz,lzma etc here
In all xz compressed kernel doesn't boot fast in any way.

That's it for now
Attached Thumbnails
Click image for larger version

Name:	uploadfromtaptalk1375545075891.jpg
Views:	7834
Size:	58.8 KB
ID:	2162290  
The Following 7 Users Say Thank You to rachitrawat For This Useful Post: [ View ] Gift rachitrawat Ad-Free
3rd August 2013, 05:12 PM |#9  
varun.chitre15's Avatar
OP Recognized Developer
Flag Sangli
Thanks Meter: 15,604
 
Donate to Me
More
Quote:
Originally Posted by Rachit Rawat

I've some concerns :-

1) As you can see from screenshot, default boot frequency of cpu0 is 1188 MHz while of cpu1 jumps to 1566MHz on load.
This is one of few reasons I disabled overclock in my kernel.

2) Eco-Mode? Isn't it for quad core devices? Turning it off disables two cores. And we've only two.

3) Intelliplug works well.

4) Your voltage table is wrong. 1242MHz runs at lower voltage than 1188MHz. It's also irregular.
for example all 384,432,486 MHz run at same voltages.

1. True (I will be releasing a 1.2Ghz version of kernel tomorrow who are not that much concerned with gaming)

2. This is true as well. But this works with dual core too according to my last 20 days testing and I have noticed gradual improvement in battery backup. I will contact faux123 to reconfirm my observations.

4. Thanks! Didn't observe that. Will fix it with tomorrow's minor update

Sent from my Sony Xperia L (C2104) using Tapatalk 4 beta
The Following 6 Users Say Thank You to varun.chitre15 For This Useful Post: [ View ]
3rd August 2013, 05:25 PM |#10  
varun.chitre15's Avatar
OP Recognized Developer
Flag Sangli
Thanks Meter: 15,604
 
Donate to Me
More
@Rachit Rawat
Quick fix for the issue 1 of cpu1 getting maxed out!
Do this- Change freq to any other step and put it back to original. Now try doing a heavy task and see where cpu1 is getting capped at!

Just try it out

Sent from my Sony Xperia L (C2104) using Tapatalk 4 beta
The Following 7 Users Say Thank You to varun.chitre15 For This Useful Post: [ View ]
3rd August 2013, 05:50 PM |#11  
Inactive Recognized Developer
Thanks Meter: 3,487
 
More
Quote:
Originally Posted by varun.chitre15

@Rachit Rawat
Quick fix for the issue 1 of cpu1 getting maxed out!
Do this- Change freq to any other step and put it back to original. Now try doing a heavy task and see where cpu1 is getting capped at!

Just try it out

Sent from my Sony Xperia L (C2104) using Tapatalk 4 beta

why not just turn on intelliplug and disable mpdecision?
The Following User Says Thank You to rachitrawat For This Useful Post: [ View ] Gift rachitrawat Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes