[KERNEL][3.0.101] BraveKernel Refresh for KitKat

Search This thread

Garcia98

Senior Member
Mar 4, 2013
1,094
1,431
github.com
BRAVEKERNEL REFRESH


Here we go with something (re)fresh, this is the thread of a customized kernel for KitKat ROMs (CM11, AOSX, SlimKat...) with some extra features added.
As always, feedback is welcome and highly valuable :D
Please if a bug is already reported do not spam the thread reporting it again, and use XDA DevDB tools for posting features requests and bug reports if it's possible :good:

Main features are these:
- Based in 6.2.A.1.100 source code
- Built with Linaro Toolchain 4.9.3 optimized for Cortex A9
- TWRP 2.8.4.0
- FRandom support
- Improvement in I/O latency
- Interactive governor updated to 3.4
- VFP optimizations
- PowerOn Key emulator
- ABBamp Sound Control v2.5.0
- Mali tweaks and controllers
- Governors and I/O schedulers parameters tweaked
- Cycle Charging control
- Real end-of-charge notification
- FSync control (combined dynamic fsync control)
- Voltage OTG control
- Added extra free kbytes tunable
- Swap and zRAM support
- Disabled dynamic debug
- Tweaked readahead size
- More choices of TCP congestions
- Proportional Rate Reduction for TCP
- Fix for scaling of minimum frequency problem
- Built with optimized -O3 & Neon flags
- SLUB memory allocator
- Ramdisk and kernel compressed with LZO

Available CPU governors:
- Powersave
- Userspace
- OnDemand
- Interactive (default)
- InteractiveQ
- Conservative
- OnDemandQ
- PegasusQ
- LulzActiveQ
- AbyssPlug
- HotPlug
- PegasusQPlus
- SmartAssv2

Available I/O schedulers:
- No-op
- Deadline
- CFQ
- ROW
- BFQ
- SIO
- ZEN
- V(R)
- SIO-Plus (default)

Kernel Downloads for KitKat:



How to install the kernel:
1) Download the kernel zip file to SD card
2) Reboot to recovery
3) Flash the kernel zip file
4) Wipe cache and dalvik cache if you are coming from another kernel
5) Reboot the system

Kernel Manager APP
If you prefer to use a simpler way for installing the kernel you can use this app, it allows you to make a backup of your current kernel and it also displays OTA updates of this kernel, really recommended :good:

Kernel sources (on GitHub):


Changelog:
Code:
[B]08/02/2015 - BraveKernel Refresh v1.3 for KitKat[/B]
- Added minfree tweak in crontab
- Disabled management of not killable processes
- Tweaked adj and minfree values in init.d
- Added memory tweak in crontab
- Tweaked read_ahead_kb values
- Added F2FS support
- Fixed network arrows and speed information
- Fixed root and storage issues
- Added recovery in FOTA partition support
- Added kexec hardboot support
- Added 3 extra MB of usable RAM
- Added dynamic management of dirty page writebacks
- Added Ultra KSM 
- Added entropy tweaks
- Updated BFQ scheduler
- Updated Linaro toolchain
- Improved LZO decompression
- Tweaked LMK
- Improved network speed
- Improved CPU performance
- Improved EXT4 speed
- Improved power management
- Tweaked memory management values
- Enabled clean cache
- Enabled JRCU

[B]21/12/2014 - BraveKernel Refresh v1.0 for KitKat[/B]
- Initial release



Credits and thanks to:
munjeni and cocafe for their awesome work and their kernel sources
AGONTUK for TWRP recovery
CyanogenMod, Kernel.org, Sony, Google, Linaro GCC developers
All my testers :)






XDA:DevDB Information
BraveKernel Refresh, Kernel for the Sony Xperia Go

Contributors
Garcia98
Kernel Special Features: Customized kernel 3.0.101 for KK 4.4.x ROM

Version Information
Status: Stable
Current Stable Version: v1.3
Stable Release Date: 2015-02-08

Created 2014-12-24
Last Updated 2016-06-10
 

Garcia98

Senior Member
Mar 4, 2013
1,094
1,431
github.com
HOW TOs

HOW TO PLAY WITH THIS KERNEL


Terminal emulator or ADB shell is needed.

If any command outputs 'Permission denied', you need su permission.
`???` stands for the number to input.

F2FS:
To enable F2FS:
1) Reboot into recovery
2) Touch Wipe option > Advanced Wipe
3) Select the partition you want to convert to F2FS (Data or Cache)
4) Select Repair or Change File System option
5) Touch Change File System and then select F2FS


Boot time:
To check boot time:
Code:
cat /sys/boottime/kernel

CPU governors:
Performance, Interactive (default), Powersave, Userspace, Conservative, InteractiveQ, PegasusQ, HotPlug, OnDemandQ, OnDemand, AbyssPlug, LulzactiveQ, SmartAssv2

- OnDemand has been patched with cpu idle detection.
- Most of custom governors are based on ondemand/interactive.
- OndemandQ/InteractiveQ will hotplug cpu when screen turns off only.
- If you care about the battery life time, choose HotPlug. It hotplugs cpu frequently.
- Interactive updated to linux-android-3.4 (recommended).
- LulzactiveQ, will hotplug CPU1.


I/O schedulers:
SIO, SIO-Plus, VR, BFQ, CFQ, NO-OP, ZEN, ROW, Deadline

- Default IO scheduler: SIO-Plus
- SIO/ROW/SIO-Plus recommended!


FRandom module:
Code:
insmod /system/lib/modules/frandom.ko
chmod 0666 /dev/frandom
chmod 0666 /dev/erandom
mv /dev/random /dev/random.orig
mv /dev/urandom /dev/urandom.orig
ln -s /dev/frandom /dev/random
ln -s /dev/frandom /dev/urandom

Deepest sleep state:
Stock: 3 Default: 3
Deepest supported is 5.

To change deepest sleep state:
Code:
echo 5 > /d/cpuidle/deepest_state

- HotPlug governors works badly with 5.
- OnDemand works well with 5.
- Please note that it won’t increase the using time but standby time.
- You can add an init.d script to tweak it if you want.

To check the cpuidle state:
Code:
cat /d/cpuidle/stats

zRAM:
zRAM is optimized for Android. It is not lazy anymore. Recommended zRAM instead of SWAP.
Using zRAM will take a little CPU, because it needs to compress/decompress memory.
Recommended compressing about 18% of RAM, about 100MB.

Setup disk size first: (example: 200MB)
Code:
echo $((200 * 1024 * 1024)) > /sys/block/zram0/disksize

- Larger size more RAM will be compressed.
- Too large size might make phone lag

To enable:
Code:
mkswap /dev/block/zram0
swapon /dev/block/zram0

To check how many does it use:
Code:
cat /sys/block/zram0/num_reads
cat /sys/block/zram0/num_writes
cat /proc/meminfo | grep swap

- We can get other info in its sysfs


Swap:
Using a file as swap RAM: (Create a continuity file first)
Code:
su
cd /cache
dd if=/dev/zero of=swapfile bs=1024 count=81920
mkswap swapfile
swapon swapfile

Then we will have 80MB of swap RAM.


Cycle Charging Control:
Similar to BLX by Ezekeel. It can be used to limit the battery charging level.

Example: Limit the battery level at 70% ~ 75%
Enable:
Code:
echo on > /sys/kernel/abb-fg/fg_cyc

Disable:
Code:
echo off > /sys/kernel/abb-fg/fg_cyc

Discharging threshold (battery level %):
Code:
echo dischar=75 > /sys/kernel/abb-fg/fg_cyc

Recharging threshold:
Code:
echo dischar=70 > /sys/kernel/abb-fg/fg_cyc

Real charged notification:
Well, please let me call it notification.
To be honest, it needs to check manually:
Code:
cat /sys/kernel/abb-chargalg/eoc_status

- You can use Root Browser to view these files in /sys/kernel/abb-chargalg
- When it says "First eoc reached", then the UI should show you charged 100%, but it is not the real full charged.
- When it says the real EOC reached, unplug the charger.


POnKey Emulator:
This is the software emulator of power key.

To turn off screen: ( 20 < value(ms) < 520 )
Code:
echo 100 > /sys/kernel/abb-ponkey/emulator

To active the power menu: ( 520 < value(ms) < ∞)
Code:
echo 800 > /sys/kernel/abb-ponkey/emulator

ABBamp Audio:
Please note that listening to too high volume music over 1 hour or more can damage your ears.
Too high volume can make your external speakers/headset overload or damage them.

First, why is it called `AMP`?
Because most of our tweaks are about gain(volume)
Our codec is simple, It doesn't have any hardware EQ (although i want...)

ABBamp sysfs entries are in:
/sys/kernel/abb-codec

- Use Root Browser to view this folder,there are lots files

Tweaks will take effects immediately!
Most tweaks will accept inputs like "on", "off" (no quotes)...
So, say "on" to enable this tweak, then this tweak will apply the value stored/inputed
View (cat) these files, most of them will give you useful information about this tweak.
They will show you the volume in dB of gain

`cd` to /sys/kernel/abb-codec first then do echos, will be more convenient.

AnaGain3 (Headset analog gain path):
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/anagain3

Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/anagain3

Gain control: (min:0 ,max: 15) Lower value,higher volume (default: 0[+4dB])
Code:
echo left=?? > /sys/kernel/abb-codec/anagain3
echo right=?? > /sys/kernel/abb-codec/anagain3

Write both left and right channels:
Code:
echo gain=?? > /sys/kernel/abb-codec/anagain3

HsLDigGain (Headset left digital path gain):
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/hsldiggain

Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/hsldiggain

Gain control: (min:0 ,max: 15) Lower value,higher volume (default: 4[+4dB])
Code:
echo gain=?? > /sys/kernel/abb-codec/hsldiggain

HsRDigGain (Headset right digital path gain):
Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/hsrdiggain

Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/hsrdiggain

Gain control: (min:0 ,max: 15) Lower value,higher volume (default: 4[+4dB])
Code:
echo gain=?? > /sys/kernel/abb-codec/hsrdiggain

Headset Volume Table:

value | volume
0.......+8dB (maximum)
1.......+7dB
2.......+6dB
3.......+5dB
4.......+4dB (tweaks default)
5.......+3dB
6.......+2dB
7.......+1dB
8.......+0dB (device default)
>=9....mute

- If set up digital path +4dB, analog gain +4dB, the result will get over +8dB


HsLowPow (Headset driver low power mode):
This lowpow mode is enabled by device normally.
If you want high performance audio instead of LPA(low power audio) you can disable it.

Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/hslowpow

Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/hslowpow

To tweak the mode (0: disable LP mode, 1: enable LP mode)
Code:
echo mode=? > /sys/kernel/abb-codec/hslowpow

HsDacLowPow (Headset DAC low power mode):
DAC is Digital-to-Analong Converter.
This lowpow mode is enabled by device normally.

Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/hsdaclowpow

Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/hsdaclowpow

To tweak the mode (0: disable LP mode, 1: enable LP mode)
Code:
echo mode=? > /sys/kernel/abb-codec/hsdaclowpow

HsHpEn (Headset high pass filter):
This high pass filter is disabled by device normally.
Enable this can reduce some sub-noise of audio.

Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/hshpen

Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/hshpen

To tweak the mode (0: disable highpass filter, 1: enable highpass filter)
Code:
echo mode=? > /sys/kernel/abb-codec/hshepen

Besides, the file anaconf1 will shows you the status of LPA


ClassDHPG (ClassD high-pass gain):
ClassD is a kind of amplifier.
According to the documents, our ClassD only relate to Handsfree(speaker).
This can increase the high frequencies sound of speaker

Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/classdhpg

Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/classdhgp


Gain control: (min:0 ,max: 10) higher value,higher gain (default: 10[Max gain])
Code:
echo gain=?? > /sys/kernel/abb-codec/classdhpg

ClassDDithWGain:
Gain control for the white component of dithering filter

Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/classdwg

Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/classdwp

Gain control: (min:0 ,max: 10) higher value,higher gain (default: 10[Max gain])
Code:
echo gain=?? > /sys/kernel/abb-codec/classdwg

ADDigGain2:
This is the audio path of mic2(phone mic, not headset mic)
This tweak will enable automatically when mic2 is enabled by device

Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/addiggain2

Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/addiggain2

Gain control: (min:0 ,max: 63) lower value, higher gain (default: [+6dB], max: 00[+31dB])
Code:
echo gain=?? > /sys/kernel/abb-codec/addiggain2

EarDigGain:
This is the digital gain of earpiece

Enable tweaks:
Code:
echo on > /sys/kernel/abb-codec/eardiggain

Disable tweaks:
Code:
echo off > /sys/kernel/abb-codec/eardiggain

Gain control: (min:0 ,max: 15) lower value,higher gain (default: 4[+4dB])
Code:
echo gain=?? > /sys/kernel/abb-codec/classdwg

- It uses the same path of HsLDigGain,please check the volume table of HsLDigGain
- +8 dB might crash the sound of earpiece


ShortCirConf:
Code:
This is a misc tweak
View shortcir this file first

[7] EnShortPWD
0: Automatic switch off on short circuit detection is disabled
1: Automatic switch off on short circuit detection is enabled
[6] EarShortDis
0: Short circuit detection on Ear driver enabled
1: Short circuit detection on Ear driver disabled
[5] HsShortDis
0: Short circuit detection on HsL and HsR drivers enabled
1: Short circuit detection on HsL and HsR drivers disabled
[4] HsPullDEn
0: HsL and HsR outputs are in high impedance
1: HsL and HsR outputs are pulled down to ground
[2] HsOscEn (ABBamp enables it by default)
0: The HS drivers use the system clock
1: The HS drivers use a local oscillator (system clock absent: analog path only)
[1] HsFadDis
0: All intermediate steps are applied between two programmed gains (fading)
1: Gain on HS is applied immediately
[0] HsZcdDis
0: HS gain changes on signal zero cross (unless time-out occurs)
1: HS gain is changed without zero cross control



[CODE]echo ?? ?? > /sys/kernel/abb-codec/shortcir

- The first ?? the slot of each option,the second ?? stands for the value to write to this slot
- View shortcir this file,you will get it[/CODE]


AnaConf4:
This interface controls the enables of analog path
We can use it to disable Speaker in kernel level.
So that you don't have to use the "mute all sound" in system settings,
Because, "mute all sound" will also mute Earpiece, which is inconvenient for us in calls.

Command format: Check anaconf4 first, This interface is a bit different from others:
Code:
echo [Index] [Disable?] > anaconf4

To Disable Speaker:
Code:
echo 5 1 > anaconf4


To Enable Speaker:
Code:
echo 5 0 > anaconf4

Headset Charge Pump:
Code:
echo 0 > chargepump to use fixed 1.8V supply.
echo 1 > chargepump to use dynamic voltage supply, lower power cost.

Lower-power Audio Mode:
Code:
echo on > lpa_mode to enable LPA mode
echo vape=0x?? > lpa_mode to adjust Vape voltage used in LPA mode

Experts!:
This method can work on any ab850x codec platform!
cd /d/asoc/U8500-card/ab8500-codec.0

Play music, reduce the volume.
Now we are going to edit the codec registers.
Code:
echo REG VAL > codec_reg


E.G:
AnaGain3:
Code:
echo 0x16 0x00 > codec_reg

HsDigGain: (left/right channel)
Code:
echo 0x4F 0x00 > codec_reg
echo 0x50 0x00 > codec_reg

Disable all lowpow mode:
Code:
echo 0x04 0x00 > codec_reg

- These hacks will restore when codec power off.



Camera LED Flash:
Turn on torch with more brightness, turning this on for a long time will heat up your device, be careful!

Enable/Disable:
Code:
echo 1/0 > /sys/devices/platform/nmk-i2c.2/i2c-2/2-0053/torch_enable
echo 149600 > /sys/devices/platform/nmk-i2c.2/i2c-2/2-0053/torch_current

FSync control:
Get current status:
Code:
cat /sys/kernel/fsync/mode

FSYNC modes:
0: fsync on
1: fsync off
2: fsync dyn

Disable FSYNC:
Code:
echo 1 > /sys/kernel/fsync/mode

Disabling fsync can improve I/O performance, but it can make the data which hasn't been written lose when a sudden power cut occurs.

Enable Dynamic FSYNC:
Code:
echo 2 > /sys/kernel/fsync/mode

- Dynamic fsync will sync all buffers when screen turns off.
- If there is a heavy I/O load, the screen might get stuck for seconds.


Mali GPU:

Mali debug level:
Disabling can speed up a bit
Code:
echo 0 > /sys/module/mali/parameters/mali_debug_level

- Higher level, more messages will be printed in dmesg, system will slow down


Mali L2 max reads control: (Stock:28kb,Default:48kb(max))
Code:
echo xx > /sys/module/mali/parameters/mali_l2_max_read

- Some values will slow down graphics
- If not sure, keep default


Mali PM sampling rate: (Default: 1000ms)
Code:
echo xx > /sys/module/mali/parameters/mali_pm_sampling_rate

Mali PP scheduler tweaks: (Default: disable)
Code:
echo 1 > /sys/module/mali/parameters/mali_pp_scheduler_balance_jobs

- Enabling this, some places will over ahead, choose by yourself


Mali Utilization sampling rate: (Stock:500ms, Default:1000ms)
How often report a mali utilization.
Code:
echo xxx > /sys/module/mali/parameters/mali_utilization_sampling_rate

- Keep this default if unsure.


Mali utilization control:
(Default: low_to_high 192 high_to_low 64)
Our driver will report a mali utilization frequently.
This utilization(range: 0~255) means the load of mali.
If utilization is bigger than low_to_high, driver will request higher hardware performance(highest APE/DDR OPP).
If utilization is smaller than high_to_low, the driver will store the requested OPP(uses low OPP).
OPP can be understood as freq simply.

To check mali utilization values:
Code:
echo 5 > /sys/module/mali/parameters/mali_debug_level
cat /proc/kmsg | grep -i utilization

When it says SIGNAL_HIGH, it will request highest OPP.
When it says SIGNAL_LOW, it will request lowest OPP.
Press Ctrl+C to stop printing.

You can reduce low_to_high to trigger higher OPP requirement.

For smoothness and less powersaving:
Set low_to_high between 100-192.
Code:
echo 120 > mali_utilization_low_to_high

Mali max preemptive allocated max memory size:
Default is 16mb(16*1024*1024), bigger max size more throughput.
But when this value is too big, no more throughput.
For example: 48mb = 48*1024*1024
Code:
echo 50331648 > /sys/module/mali/parameters/pre_allocated_memory_size_max

Mali OS Kernel memory allocation order:
The lower value, the higher preference of allocating OS memory.
The default value is 6, I decreased it to 9 to fix OS memory allocation failure.
If you feel laggy, try 6 (default by driver)
Code:
echo 6 > /sys/module/mali/parameters/mali_oskmem_allocorder


TCP congestions:
Supported:
cubic(default), westwood, highspeed, vegas, veno, yeah

To check all the available options:
Code:
busybox sysctl net.ipv4.tcp_available_congestion_control

To change to other option:
Code:
busybox sysctl -w net.ipv4.tcp_congestion_control=YOU_WANT_TO


Latency - Download - Upload

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

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

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

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

- In fact, every congestion is designed for different environments.
- Google to learn more!


EGL Driver:
To use Mali hardware egl driver only:
Edit /system/lib/egl.cfg

0 0 android
0 1 mali

To

0 0 mali

Then remove libGLES_android.so

- Recommend to backup these files
- In case it cannot boot,use TWRP file manager to recover changes


Logcat:
Create a new file(empty file) named logger in /data
When this file exists, kernel will load logger.ko for you automatically


Miscellaneous:
To refresh battery stats:
Code:
echo 1 > /sys/kernel/abb-fg/fg_refresh

Almost all tweaks will be restored to default after reboots.
So you can make your tweaks as init.d scripts or make scripts with SManager app to apply them at boot.
 
Last edited:

BelzIgoh

Senior Member
Nov 10, 2012
353
217
Miri, Sarawak
Brave Kernel Xperia Go Test

The test kernel boot fine.
Using the test kernel for a day. Kernel work awesomely.
Only found out that Interactive governor tunables not optimize for xperia go.
The governor not tune according to xperia go cpu, the tuneable are the same with my nexus 5 :eek::eek:
So i change the hispeed freq from 1190400 to 1000000, etc...
Now gonna test the kernel battery life, will let the phone idle for over night and then see the battery usage.
 
  • Like
Reactions: Garcia98

Garcia98

Senior Member
Mar 4, 2013
1,094
1,431
github.com
New release is out!

Version 1.3 of BraveKernel Refresh is out!

This version fixes the few bugs of the previous version and includes many new features like F2FS, look at second post for learning how to use this feature :)

Download the zip below and flash it in recovery or install it using Kernel Manager app ;)

Download:
BraveKernel-Refresh_v1.3-lotus.zip

Changelog:
Code:
[B]08/02/2015 - BraveKernel Refresh v1.3 for KitKat[/B]
- Added minfree tweak in crontab
- Disabled management of not killable processes
- Tweaked adj and minfree values in init.d
- Added memory tweak in crontab
- Tweaked read_ahead_kb values
- Added F2FS support
- Fixed network arrows and speed information
- Fixed root and storage issues
- Added recovery in FOTA partition support
- Added kexec hardboot support
- Added 3 extra MB of usable RAM
- Added dynamic management of dirty page writebacks
- Added Ultra KSM 
- Added entropy tweaks
- Updated BFQ scheduler
- Updated Linaro toolchain
- Improved LZO decompression
- Tweaked LMK
- Improved network speed
- Improved CPU performance
- Improved EXT4 speed
- Improved power management
- Tweaked memory management values
- Enabled clean cache
- Enabled JRCU
 

LvAndzha

New member
Mar 24, 2013
2
1
So far the kernel is working great. Over next week I'll be able to tell the approximate battery drain for my Go.
Only problem is with the recovery - the touch responses are not working as they should, for example, I can't use sliders (to accept zip flash or related) and buttons when pressed act weird. Any clues how to fix this?
 
  • Like
Reactions: Garcia98

BigLionXda

New member
Dec 15, 2014
1
0
BRAVEKERNEL REFRESH


Here we go with something (re)fresh, this is the thread of a customized kernel for KitKat ROMs (CM11, AOSX, SlimKat...) with some extra features added.
As always, feedback is welcome and highly valuable :D
Please if a bug is already reported do not spam the thread reporting it again, and use XDA DevDB tools for posting features requests and bug reports if it's possible :good:

Main features are these:
- Based in 6.2.A.1.100 source code
- Built with Linaro Toolchain 4.9.3 optimized for Cortex A9
- TWRP 2.8.4.0
- FRandom support
- Improvement in I/O latency
- Interactive governor updated to 3.4
- VFP optimizations
- PowerOn Key emulator
- ABBamp Sound Control v2.5.0
- Mali tweaks and controllers
- Governors and I/O schedulers parameters tweaked
- Cycle Charging control
- Real end-of-charge notification
- FSync control (combined dynamic fsync control)
- Voltage OTG control
- Added extra free kbytes tunable
- Swap and zRAM support
- Disabled dynamic debug
- Tweaked readahead size
- More choices of TCP congestions
- Proportional Rate Reduction for TCP
- Fix for scaling of minimum frequency problem
- Built with optimized -O3 & Neon flags
- SLUB memory allocator
- Ramdisk and kernel compressed with LZO

Available CPU governors:
- Powersave
- Userspace
- OnDemand
- Interactive (default)
- InteractiveQ
- Conservative
- OnDemandQ
- PegasusQ
- LulzActiveQ
- AbyssPlug
- HotPlug
- PegasusQPlus
- SmartAssv2

Available I/O schedulers:
- No-op
- Deadline
- CFQ
- ROW
- BFQ
- SIO
- ZEN
- V(R)
- SIO-Plus (default)

Kernel Downloads for KitKat:



How to install the kernel:
1) Download the kernel zip file to SD card
2) Reboot to recovery
3) Flash the kernel zip file
4) Wipe cache and dalvik cache if you are coming from another kernel
5) Reboot the system

Kernel Manager APP
If you prefer to use a simpler way for installing the kernel you can use this app, it allows you to make a backup of your current kernel and it also displays OTA updates of this kernel, really recommended :good:

Kernel sources (on GitHub):


Changelog:
Code:
[B]08/02/2015 - BraveKernel Refresh v1.3 for KitKat[/B]
- Added minfree tweak in crontab
- Disabled management of not killable processes
- Tweaked adj and minfree values in init.d
- Added memory tweak in crontab
- Tweaked read_ahead_kb values
- Added F2FS support
- Fixed network arrows and speed information
- Fixed root and storage issues
- Added recovery in FOTA partition support
- Added kexec hardboot support
- Added 3 extra MB of usable RAM
- Added dynamic management of dirty page writebacks
- Added Ultra KSM 
- Added entropy tweaks
- Updated BFQ scheduler
- Updated Linaro toolchain
- Improved LZO decompression
- Tweaked LMK
- Improved network speed
- Improved CPU performance
- Improved EXT4 speed
- Improved power management
- Tweaked memory management values
- Enabled clean cache
- Enabled JRCU

[B]21/12/2014 - BraveKernel Refresh v1.0 for KitKat[/B]
- Initial release



Credits and thanks to:
munjeni and cocafe for their awesome work and their kernel sources
AGONTUK for TWRP recovery
CyanogenMod, Kernel.org, Sony, Google, Linaro GCC developers
All my testers :)






XDA:DevDB Information
BraveKernel Refresh, Kernel for the Sony Xperia Go

Contributors
Garcia98
Kernel Special Features: Customized kernel 3.0.101 for KK 4.4.x ROM

Version Information
Status: Stable
Current Stable Version: v1.3
Stable Release Date: 2015-02-08

Created 2014-12-24
Last Updated 2015-02-08

Hello author kernel . I apologize for my English , I do not know him at all , I use a translator from google. I'm from Russia , the kernel on my phone is slow . after the installation has decreased the amount of RAM . please in the development of the next version of the kernel fix it
 

BelzIgoh

Senior Member
Nov 10, 2012
353
217
Miri, Sarawak
Hello author kernel . I apologize for my English , I do not know him at all , I use a translator from google. I'm from Russia , the kernel on my phone is slow . after the installation has decreased the amount of RAM . please in the development of the next version of the kernel fix it

Your total RAM decrease or low free RAM?
For my Xperia GO, total RAM available is 390MB.
Usually 272MB used, 118MB free.
 

Attachments

  • Screenshot_2015-02-17-17-41-18.png
    Screenshot_2015-02-17-17-41-18.png
    51 KB · Views: 281

Top Liked Posts

  • There are no posts matching your filters.
  • 10
    BRAVEKERNEL REFRESH


    Here we go with something (re)fresh, this is the thread of a customized kernel for KitKat ROMs (CM11, AOSX, SlimKat...) with some extra features added.
    As always, feedback is welcome and highly valuable :D
    Please if a bug is already reported do not spam the thread reporting it again, and use XDA DevDB tools for posting features requests and bug reports if it's possible :good:

    Main features are these:
    - Based in 6.2.A.1.100 source code
    - Built with Linaro Toolchain 4.9.3 optimized for Cortex A9
    - TWRP 2.8.4.0
    - FRandom support
    - Improvement in I/O latency
    - Interactive governor updated to 3.4
    - VFP optimizations
    - PowerOn Key emulator
    - ABBamp Sound Control v2.5.0
    - Mali tweaks and controllers
    - Governors and I/O schedulers parameters tweaked
    - Cycle Charging control
    - Real end-of-charge notification
    - FSync control (combined dynamic fsync control)
    - Voltage OTG control
    - Added extra free kbytes tunable
    - Swap and zRAM support
    - Disabled dynamic debug
    - Tweaked readahead size
    - More choices of TCP congestions
    - Proportional Rate Reduction for TCP
    - Fix for scaling of minimum frequency problem
    - Built with optimized -O3 & Neon flags
    - SLUB memory allocator
    - Ramdisk and kernel compressed with LZO

    Available CPU governors:
    - Powersave
    - Userspace
    - OnDemand
    - Interactive (default)
    - InteractiveQ
    - Conservative
    - OnDemandQ
    - PegasusQ
    - LulzActiveQ
    - AbyssPlug
    - HotPlug
    - PegasusQPlus
    - SmartAssv2

    Available I/O schedulers:
    - No-op
    - Deadline
    - CFQ
    - ROW
    - BFQ
    - SIO
    - ZEN
    - V(R)
    - SIO-Plus (default)

    Kernel Downloads for KitKat:



    How to install the kernel:
    1) Download the kernel zip file to SD card
    2) Reboot to recovery
    3) Flash the kernel zip file
    4) Wipe cache and dalvik cache if you are coming from another kernel
    5) Reboot the system

    Kernel Manager APP
    If you prefer to use a simpler way for installing the kernel you can use this app, it allows you to make a backup of your current kernel and it also displays OTA updates of this kernel, really recommended :good:

    Kernel sources (on GitHub):


    Changelog:
    Code:
    [B]08/02/2015 - BraveKernel Refresh v1.3 for KitKat[/B]
    - Added minfree tweak in crontab
    - Disabled management of not killable processes
    - Tweaked adj and minfree values in init.d
    - Added memory tweak in crontab
    - Tweaked read_ahead_kb values
    - Added F2FS support
    - Fixed network arrows and speed information
    - Fixed root and storage issues
    - Added recovery in FOTA partition support
    - Added kexec hardboot support
    - Added 3 extra MB of usable RAM
    - Added dynamic management of dirty page writebacks
    - Added Ultra KSM 
    - Added entropy tweaks
    - Updated BFQ scheduler
    - Updated Linaro toolchain
    - Improved LZO decompression
    - Tweaked LMK
    - Improved network speed
    - Improved CPU performance
    - Improved EXT4 speed
    - Improved power management
    - Tweaked memory management values
    - Enabled clean cache
    - Enabled JRCU
    
    [B]21/12/2014 - BraveKernel Refresh v1.0 for KitKat[/B]
    - Initial release



    Credits and thanks to:
    munjeni and cocafe for their awesome work and their kernel sources
    AGONTUK for TWRP recovery
    CyanogenMod, Kernel.org, Sony, Google, Linaro GCC developers
    All my testers :)






    XDA:DevDB Information
    BraveKernel Refresh, Kernel for the Sony Xperia Go

    Contributors
    Garcia98
    Kernel Special Features: Customized kernel 3.0.101 for KK 4.4.x ROM

    Version Information
    Status: Stable
    Current Stable Version: v1.3
    Stable Release Date: 2015-02-08

    Created 2014-12-24
    Last Updated 2016-06-10
    5
    HOW TOs

    HOW TO PLAY WITH THIS KERNEL


    Terminal emulator or ADB shell is needed.

    If any command outputs 'Permission denied', you need su permission.
    `???` stands for the number to input.

    F2FS:
    To enable F2FS:
    1) Reboot into recovery
    2) Touch Wipe option > Advanced Wipe
    3) Select the partition you want to convert to F2FS (Data or Cache)
    4) Select Repair or Change File System option
    5) Touch Change File System and then select F2FS


    Boot time:
    To check boot time:
    Code:
    cat /sys/boottime/kernel

    CPU governors:
    Performance, Interactive (default), Powersave, Userspace, Conservative, InteractiveQ, PegasusQ, HotPlug, OnDemandQ, OnDemand, AbyssPlug, LulzactiveQ, SmartAssv2

    - OnDemand has been patched with cpu idle detection.
    - Most of custom governors are based on ondemand/interactive.
    - OndemandQ/InteractiveQ will hotplug cpu when screen turns off only.
    - If you care about the battery life time, choose HotPlug. It hotplugs cpu frequently.
    - Interactive updated to linux-android-3.4 (recommended).
    - LulzactiveQ, will hotplug CPU1.


    I/O schedulers:
    SIO, SIO-Plus, VR, BFQ, CFQ, NO-OP, ZEN, ROW, Deadline

    - Default IO scheduler: SIO-Plus
    - SIO/ROW/SIO-Plus recommended!


    FRandom module:
    Code:
    insmod /system/lib/modules/frandom.ko
    chmod 0666 /dev/frandom
    chmod 0666 /dev/erandom
    mv /dev/random /dev/random.orig
    mv /dev/urandom /dev/urandom.orig
    ln -s /dev/frandom /dev/random
    ln -s /dev/frandom /dev/urandom

    Deepest sleep state:
    Stock: 3 Default: 3
    Deepest supported is 5.

    To change deepest sleep state:
    Code:
    echo 5 > /d/cpuidle/deepest_state

    - HotPlug governors works badly with 5.
    - OnDemand works well with 5.
    - Please note that it won’t increase the using time but standby time.
    - You can add an init.d script to tweak it if you want.

    To check the cpuidle state:
    Code:
    cat /d/cpuidle/stats

    zRAM:
    zRAM is optimized for Android. It is not lazy anymore. Recommended zRAM instead of SWAP.
    Using zRAM will take a little CPU, because it needs to compress/decompress memory.
    Recommended compressing about 18% of RAM, about 100MB.

    Setup disk size first: (example: 200MB)
    Code:
    echo $((200 * 1024 * 1024)) > /sys/block/zram0/disksize

    - Larger size more RAM will be compressed.
    - Too large size might make phone lag

    To enable:
    Code:
    mkswap /dev/block/zram0
    swapon /dev/block/zram0

    To check how many does it use:
    Code:
    cat /sys/block/zram0/num_reads
    cat /sys/block/zram0/num_writes
    cat /proc/meminfo | grep swap

    - We can get other info in its sysfs


    Swap:
    Using a file as swap RAM: (Create a continuity file first)
    Code:
    su
    cd /cache
    dd if=/dev/zero of=swapfile bs=1024 count=81920
    mkswap swapfile
    swapon swapfile

    Then we will have 80MB of swap RAM.


    Cycle Charging Control:
    Similar to BLX by Ezekeel. It can be used to limit the battery charging level.

    Example: Limit the battery level at 70% ~ 75%
    Enable:
    Code:
    echo on > /sys/kernel/abb-fg/fg_cyc

    Disable:
    Code:
    echo off > /sys/kernel/abb-fg/fg_cyc

    Discharging threshold (battery level %):
    Code:
    echo dischar=75 > /sys/kernel/abb-fg/fg_cyc

    Recharging threshold:
    Code:
    echo dischar=70 > /sys/kernel/abb-fg/fg_cyc

    Real charged notification:
    Well, please let me call it notification.
    To be honest, it needs to check manually:
    Code:
    cat /sys/kernel/abb-chargalg/eoc_status

    - You can use Root Browser to view these files in /sys/kernel/abb-chargalg
    - When it says "First eoc reached", then the UI should show you charged 100%, but it is not the real full charged.
    - When it says the real EOC reached, unplug the charger.


    POnKey Emulator:
    This is the software emulator of power key.

    To turn off screen: ( 20 < value(ms) < 520 )
    Code:
    echo 100 > /sys/kernel/abb-ponkey/emulator

    To active the power menu: ( 520 < value(ms) < ∞)
    Code:
    echo 800 > /sys/kernel/abb-ponkey/emulator

    ABBamp Audio:
    Please note that listening to too high volume music over 1 hour or more can damage your ears.
    Too high volume can make your external speakers/headset overload or damage them.

    First, why is it called `AMP`?
    Because most of our tweaks are about gain(volume)
    Our codec is simple, It doesn't have any hardware EQ (although i want...)

    ABBamp sysfs entries are in:
    /sys/kernel/abb-codec

    - Use Root Browser to view this folder,there are lots files

    Tweaks will take effects immediately!
    Most tweaks will accept inputs like "on", "off" (no quotes)...
    So, say "on" to enable this tweak, then this tweak will apply the value stored/inputed
    View (cat) these files, most of them will give you useful information about this tweak.
    They will show you the volume in dB of gain

    `cd` to /sys/kernel/abb-codec first then do echos, will be more convenient.

    AnaGain3 (Headset analog gain path):
    Enable tweaks:
    Code:
    echo on > /sys/kernel/abb-codec/anagain3

    Disable tweaks:
    Code:
    echo off > /sys/kernel/abb-codec/anagain3

    Gain control: (min:0 ,max: 15) Lower value,higher volume (default: 0[+4dB])
    Code:
    echo left=?? > /sys/kernel/abb-codec/anagain3
    echo right=?? > /sys/kernel/abb-codec/anagain3

    Write both left and right channels:
    Code:
    echo gain=?? > /sys/kernel/abb-codec/anagain3

    HsLDigGain (Headset left digital path gain):
    Enable tweaks:
    Code:
    echo on > /sys/kernel/abb-codec/hsldiggain

    Disable tweaks:
    Code:
    echo off > /sys/kernel/abb-codec/hsldiggain

    Gain control: (min:0 ,max: 15) Lower value,higher volume (default: 4[+4dB])
    Code:
    echo gain=?? > /sys/kernel/abb-codec/hsldiggain

    HsRDigGain (Headset right digital path gain):
    Enable tweaks:
    Code:
    echo on > /sys/kernel/abb-codec/hsrdiggain

    Disable tweaks:
    Code:
    echo off > /sys/kernel/abb-codec/hsrdiggain

    Gain control: (min:0 ,max: 15) Lower value,higher volume (default: 4[+4dB])
    Code:
    echo gain=?? > /sys/kernel/abb-codec/hsrdiggain

    Headset Volume Table:

    value | volume
    0.......+8dB (maximum)
    1.......+7dB
    2.......+6dB
    3.......+5dB
    4.......+4dB (tweaks default)
    5.......+3dB
    6.......+2dB
    7.......+1dB
    8.......+0dB (device default)
    >=9....mute

    - If set up digital path +4dB, analog gain +4dB, the result will get over +8dB


    HsLowPow (Headset driver low power mode):
    This lowpow mode is enabled by device normally.
    If you want high performance audio instead of LPA(low power audio) you can disable it.

    Enable tweaks:
    Code:
    echo on > /sys/kernel/abb-codec/hslowpow

    Disable tweaks:
    Code:
    echo off > /sys/kernel/abb-codec/hslowpow

    To tweak the mode (0: disable LP mode, 1: enable LP mode)
    Code:
    echo mode=? > /sys/kernel/abb-codec/hslowpow

    HsDacLowPow (Headset DAC low power mode):
    DAC is Digital-to-Analong Converter.
    This lowpow mode is enabled by device normally.

    Enable tweaks:
    Code:
    echo on > /sys/kernel/abb-codec/hsdaclowpow

    Disable tweaks:
    Code:
    echo off > /sys/kernel/abb-codec/hsdaclowpow

    To tweak the mode (0: disable LP mode, 1: enable LP mode)
    Code:
    echo mode=? > /sys/kernel/abb-codec/hsdaclowpow

    HsHpEn (Headset high pass filter):
    This high pass filter is disabled by device normally.
    Enable this can reduce some sub-noise of audio.

    Enable tweaks:
    Code:
    echo on > /sys/kernel/abb-codec/hshpen

    Disable tweaks:
    Code:
    echo off > /sys/kernel/abb-codec/hshpen

    To tweak the mode (0: disable highpass filter, 1: enable highpass filter)
    Code:
    echo mode=? > /sys/kernel/abb-codec/hshepen

    Besides, the file anaconf1 will shows you the status of LPA


    ClassDHPG (ClassD high-pass gain):
    ClassD is a kind of amplifier.
    According to the documents, our ClassD only relate to Handsfree(speaker).
    This can increase the high frequencies sound of speaker

    Enable tweaks:
    Code:
    echo on > /sys/kernel/abb-codec/classdhpg

    Disable tweaks:
    Code:
    echo off > /sys/kernel/abb-codec/classdhgp


    Gain control: (min:0 ,max: 10) higher value,higher gain (default: 10[Max gain])
    Code:
    echo gain=?? > /sys/kernel/abb-codec/classdhpg

    ClassDDithWGain:
    Gain control for the white component of dithering filter

    Enable tweaks:
    Code:
    echo on > /sys/kernel/abb-codec/classdwg

    Disable tweaks:
    Code:
    echo off > /sys/kernel/abb-codec/classdwp

    Gain control: (min:0 ,max: 10) higher value,higher gain (default: 10[Max gain])
    Code:
    echo gain=?? > /sys/kernel/abb-codec/classdwg

    ADDigGain2:
    This is the audio path of mic2(phone mic, not headset mic)
    This tweak will enable automatically when mic2 is enabled by device

    Enable tweaks:
    Code:
    echo on > /sys/kernel/abb-codec/addiggain2

    Disable tweaks:
    Code:
    echo off > /sys/kernel/abb-codec/addiggain2

    Gain control: (min:0 ,max: 63) lower value, higher gain (default: [+6dB], max: 00[+31dB])
    Code:
    echo gain=?? > /sys/kernel/abb-codec/addiggain2

    EarDigGain:
    This is the digital gain of earpiece

    Enable tweaks:
    Code:
    echo on > /sys/kernel/abb-codec/eardiggain

    Disable tweaks:
    Code:
    echo off > /sys/kernel/abb-codec/eardiggain

    Gain control: (min:0 ,max: 15) lower value,higher gain (default: 4[+4dB])
    Code:
    echo gain=?? > /sys/kernel/abb-codec/classdwg

    - It uses the same path of HsLDigGain,please check the volume table of HsLDigGain
    - +8 dB might crash the sound of earpiece


    ShortCirConf:
    Code:
    This is a misc tweak
    View shortcir this file first
    
    [7] EnShortPWD
    0: Automatic switch off on short circuit detection is disabled
    1: Automatic switch off on short circuit detection is enabled
    [6] EarShortDis
    0: Short circuit detection on Ear driver enabled
    1: Short circuit detection on Ear driver disabled
    [5] HsShortDis
    0: Short circuit detection on HsL and HsR drivers enabled
    1: Short circuit detection on HsL and HsR drivers disabled
    [4] HsPullDEn
    0: HsL and HsR outputs are in high impedance
    1: HsL and HsR outputs are pulled down to ground
    [2] HsOscEn (ABBamp enables it by default)
    0: The HS drivers use the system clock
    1: The HS drivers use a local oscillator (system clock absent: analog path only)
    [1] HsFadDis
    0: All intermediate steps are applied between two programmed gains (fading)
    1: Gain on HS is applied immediately
    [0] HsZcdDis
    0: HS gain changes on signal zero cross (unless time-out occurs)
    1: HS gain is changed without zero cross control
    
    
    
    [CODE]echo ?? ?? > /sys/kernel/abb-codec/shortcir

    - The first ?? the slot of each option,the second ?? stands for the value to write to this slot
    - View shortcir this file,you will get it[/CODE]


    AnaConf4:
    This interface controls the enables of analog path
    We can use it to disable Speaker in kernel level.
    So that you don't have to use the "mute all sound" in system settings,
    Because, "mute all sound" will also mute Earpiece, which is inconvenient for us in calls.

    Command format: Check anaconf4 first, This interface is a bit different from others:
    Code:
    echo [Index] [Disable?] > anaconf4

    To Disable Speaker:
    Code:
    echo 5 1 > anaconf4


    To Enable Speaker:
    Code:
    echo 5 0 > anaconf4

    Headset Charge Pump:
    Code:
    echo 0 > chargepump to use fixed 1.8V supply.
    echo 1 > chargepump to use dynamic voltage supply, lower power cost.

    Lower-power Audio Mode:
    Code:
    echo on > lpa_mode to enable LPA mode
    echo vape=0x?? > lpa_mode to adjust Vape voltage used in LPA mode

    Experts!:
    This method can work on any ab850x codec platform!
    cd /d/asoc/U8500-card/ab8500-codec.0

    Play music, reduce the volume.
    Now we are going to edit the codec registers.
    Code:
    echo REG VAL > codec_reg


    E.G:
    AnaGain3:
    Code:
    echo 0x16 0x00 > codec_reg

    HsDigGain: (left/right channel)
    Code:
    echo 0x4F 0x00 > codec_reg
    echo 0x50 0x00 > codec_reg

    Disable all lowpow mode:
    Code:
    echo 0x04 0x00 > codec_reg

    - These hacks will restore when codec power off.



    Camera LED Flash:
    Turn on torch with more brightness, turning this on for a long time will heat up your device, be careful!

    Enable/Disable:
    Code:
    echo 1/0 > /sys/devices/platform/nmk-i2c.2/i2c-2/2-0053/torch_enable
    echo 149600 > /sys/devices/platform/nmk-i2c.2/i2c-2/2-0053/torch_current

    FSync control:
    Get current status:
    Code:
    cat /sys/kernel/fsync/mode

    FSYNC modes:
    0: fsync on
    1: fsync off
    2: fsync dyn

    Disable FSYNC:
    Code:
    echo 1 > /sys/kernel/fsync/mode

    Disabling fsync can improve I/O performance, but it can make the data which hasn't been written lose when a sudden power cut occurs.

    Enable Dynamic FSYNC:
    Code:
    echo 2 > /sys/kernel/fsync/mode

    - Dynamic fsync will sync all buffers when screen turns off.
    - If there is a heavy I/O load, the screen might get stuck for seconds.


    Mali GPU:

    Mali debug level:
    Disabling can speed up a bit
    Code:
    echo 0 > /sys/module/mali/parameters/mali_debug_level

    - Higher level, more messages will be printed in dmesg, system will slow down


    Mali L2 max reads control: (Stock:28kb,Default:48kb(max))
    Code:
    echo xx > /sys/module/mali/parameters/mali_l2_max_read

    - Some values will slow down graphics
    - If not sure, keep default


    Mali PM sampling rate: (Default: 1000ms)
    Code:
    echo xx > /sys/module/mali/parameters/mali_pm_sampling_rate

    Mali PP scheduler tweaks: (Default: disable)
    Code:
    echo 1 > /sys/module/mali/parameters/mali_pp_scheduler_balance_jobs

    - Enabling this, some places will over ahead, choose by yourself


    Mali Utilization sampling rate: (Stock:500ms, Default:1000ms)
    How often report a mali utilization.
    Code:
    echo xxx > /sys/module/mali/parameters/mali_utilization_sampling_rate

    - Keep this default if unsure.


    Mali utilization control:
    (Default: low_to_high 192 high_to_low 64)
    Our driver will report a mali utilization frequently.
    This utilization(range: 0~255) means the load of mali.
    If utilization is bigger than low_to_high, driver will request higher hardware performance(highest APE/DDR OPP).
    If utilization is smaller than high_to_low, the driver will store the requested OPP(uses low OPP).
    OPP can be understood as freq simply.

    To check mali utilization values:
    Code:
    echo 5 > /sys/module/mali/parameters/mali_debug_level
    cat /proc/kmsg | grep -i utilization

    When it says SIGNAL_HIGH, it will request highest OPP.
    When it says SIGNAL_LOW, it will request lowest OPP.
    Press Ctrl+C to stop printing.

    You can reduce low_to_high to trigger higher OPP requirement.

    For smoothness and less powersaving:
    Set low_to_high between 100-192.
    Code:
    echo 120 > mali_utilization_low_to_high

    Mali max preemptive allocated max memory size:
    Default is 16mb(16*1024*1024), bigger max size more throughput.
    But when this value is too big, no more throughput.
    For example: 48mb = 48*1024*1024
    Code:
    echo 50331648 > /sys/module/mali/parameters/pre_allocated_memory_size_max

    Mali OS Kernel memory allocation order:
    The lower value, the higher preference of allocating OS memory.
    The default value is 6, I decreased it to 9 to fix OS memory allocation failure.
    If you feel laggy, try 6 (default by driver)
    Code:
    echo 6 > /sys/module/mali/parameters/mali_oskmem_allocorder


    TCP congestions:
    Supported:
    cubic(default), westwood, highspeed, vegas, veno, yeah

    To check all the available options:
    Code:
    busybox sysctl net.ipv4.tcp_available_congestion_control

    To change to other option:
    Code:
    busybox sysctl -w net.ipv4.tcp_congestion_control=YOU_WANT_TO


    Latency - Download - Upload

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

    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

    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

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

    - In fact, every congestion is designed for different environments.
    - Google to learn more!


    EGL Driver:
    To use Mali hardware egl driver only:
    Edit /system/lib/egl.cfg

    0 0 android
    0 1 mali

    To

    0 0 mali

    Then remove libGLES_android.so

    - Recommend to backup these files
    - In case it cannot boot,use TWRP file manager to recover changes


    Logcat:
    Create a new file(empty file) named logger in /data
    When this file exists, kernel will load logger.ko for you automatically


    Miscellaneous:
    To refresh battery stats:
    Code:
    echo 1 > /sys/kernel/abb-fg/fg_refresh

    Almost all tweaks will be restored to default after reboots.
    So you can make your tweaks as init.d scripts or make scripts with SManager app to apply them at boot.
    5
    New release is out!

    Version 1.3 of BraveKernel Refresh is out!

    This version fixes the few bugs of the previous version and includes many new features like F2FS, look at second post for learning how to use this feature :)

    Download the zip below and flash it in recovery or install it using Kernel Manager app ;)

    Download:
    BraveKernel-Refresh_v1.3-lotus.zip

    Changelog:
    Code:
    [B]08/02/2015 - BraveKernel Refresh v1.3 for KitKat[/B]
    - Added minfree tweak in crontab
    - Disabled management of not killable processes
    - Tweaked adj and minfree values in init.d
    - Added memory tweak in crontab
    - Tweaked read_ahead_kb values
    - Added F2FS support
    - Fixed network arrows and speed information
    - Fixed root and storage issues
    - Added recovery in FOTA partition support
    - Added kexec hardboot support
    - Added 3 extra MB of usable RAM
    - Added dynamic management of dirty page writebacks
    - Added Ultra KSM 
    - Added entropy tweaks
    - Updated BFQ scheduler
    - Updated Linaro toolchain
    - Improved LZO decompression
    - Tweaked LMK
    - Improved network speed
    - Improved CPU performance
    - Improved EXT4 speed
    - Improved power management
    - Tweaked memory management values
    - Enabled clean cache
    - Enabled JRCU
    4
    Merry Christmas and happy holidays to all of you! :)
    3
    Does it work on stock 6.2.A.1.100? If yes, controindications?

    No, it just works with KitKat ROMs

    Sent from my D5503 using XDA Free mobile app