[AKT] Advanced Kernel Tweaks v1.6 FINAL | Insane Battery & Performance(SD820/1|OP3/T)

Which tweak do you use or prefer?

  • GhostPepper

    Votes: 312 21.6%
  • HawkTail

    Votes: 50 3.5%
  • HawkPepper

    Votes: 142 9.8%
  • Kestrel

    Votes: 21 1.5%
  • FairPark

    Votes: 130 9.0%
  • Fusion_B_Delta

    Votes: 53 3.7%
  • Fusion_Speed

    Votes: 56 3.9%
  • Cold_Fusion

    Votes: 25 1.7%
  • Shotgun

    Votes: 83 5.8%
  • Project Zhana

    Votes: 685 47.5%

  • Total voters
    1,442

Mostafa Wael

Recognized Contributor
Jan 11, 2013
6,106
5,564
0
22
Gotham
for those wondering which is better
Also arter97 has commented on Zen I/O sched himself on his kernel's thread when I asked him as well

Zen is based on deadline(additionally merged some stuffs from noop).
I see no fundamental difference between deadline and zen that would make any noticeable difference.
Now I would guess that the author decided to opt to base on deadline since Canonical and other desktop Linux distro makers switched to deadline on SSDs.

However, deadline and noop is not optimized for Android.
Too un-optimized that it's painfully slow once there is a single background write ongoing.
iirc, I even excluded those from the benchmark to make the video shorter.

You would be much better off just with stock scheduler, which is CFQ, and which is surprisingly very fast on Android.

There are other I/O related changes on my kernel that would make more sense/difference in terms of performance like sdcardfs and UFS tunable changes.
 
  • Like
Reactions: habylab and niwia

raven6681

Member
Dec 11, 2013
47
9
0
Athens
People using Nameless_V4_balanced profile and Nameless_V4_battery profile in EX_KM app, I have made a typo in each file for hispeed_freq for BIG cluster, its in as 14784000 in balanced and 10368000, just delete one zero and make it as 1478400 and 1036800 respectively.
Thanks to @The Peterle and @joshuous for pointing out
In battery profile there is only this entry: /sys/devices/system/cpu/cpu2/cpufreq/interactive/hispeed_freq 10368000 with one extra zero
 

Asiier

Senior Member
Nov 23, 2014
541
1,989
133
Miller's Planet
Project Zhana & X.A.N.A v4.3


Well guys, finally, after tons of test and tweaking I come out with Project Zhana in his version 3.0
I hope you guys find it smooth and battery efficient as it's the main goal. Keep in mind that I might release some hotfixes
and other little optimizations since it has only been tested among few people over the Official Slack Channel
With all this been said, let's get into the tweak!!

Update!! So after some weeks months of testing and coding scripts I'm glad to present Project X.A.N.A!!
(and Project Zhana v3.1 v4.2)
Errr what? Project X.A.N.A is the twin sister of Project Zhana but more optimized in terms of battery.
Therefore:
· Project Zhana = Balanced
· Project X.A.N.A = Battery *yes, even more than FairPark*

Strategy:
Project Zhana & X.A.N.A was made for trying to be as efficient as possible without compromising the performance.
Thanks to the discovery on Voltages used by our SD820 I could make a profile that utilizes more the BIG cluster.
My first attempt was to move ALL the load to the BIG cluster, it was against anything that I have learned
about little.BIG CPU but I tried, it turned really good at first, low usage was just amazing...
But on more usage things didn't go that good.
So what I did it was to give a twist to things, but not such twist.
It kind of works like Nameless and Shotgun, @Mostafa Wael and I worked the same idea.
#LITTLE cluster will be running on low-mid frequencies but delivers full performance when is needed.
# BIG Cluster will help LITTLE ease Load, but in a great way than before.
Things can be done faster and more efficient giving us profit in form of battery.
It should run smooth on all scenarios, but you guys tell me.
In addition the script will detect whether you're overclocked and your ROM for applying the right values
You can easily get around 7~9 hours SOT for 24 hours even more If you don't play game
This will, of course, may vary, but it will definitely be better.

Update!! The strategy behind Project X.A.N.A is the same as Project Zhana, so all said above gets applied too.
The main feature of Project X.A.N.A is the HMP Tweaks, this time we not only take advantage of them
but also we modify them for "correcting" the BIG cluster utilization and therefore making the whole tweak much more efficient.
Expect even more SOT


==================================================================================================================​



Disclaimer: This was build on RR (CM based ROM) using EX Kernel and test on a variety on different ROMs and Kernels.
None of my testers complaint about stutters or lags, but there is always a first time

Changelogs:
Old changes:
**Release of version 3.0**
#Too many changes for them to be said.
#But for the following version I'll give you guys the changelog

**Update to version 3.1 | Zhana **
#Updating target_loads values for a better escalation. This will also help to avoid certain inefficient freq ( I'm talking about you 1036MHz )
#Updating above_hispeed_delay so the CPU thinks twice are bumping into high-freq when is not needed
#Some corrections on typos
#Removing Sleepers

**Release of Project X.A.N.A**
#HMP Usage

**Update to Project Zhana & X.A.N.A v3.1.1**
#Minor bug fixed (Noop not getting applied)
#Adding init.d support, so you guys just have to apply the profile and forget about everything

**Update to Project Zhana & X.A.N.A v3.2**
#BUG Fixing
#Android Nougat support


**Update to Project Zhana & X.A.N.A v3.3**
# Few changes over target_loads
# Modifications over HMP values. Providing more performance and possibly more battery
# Improved performance and battery.
# BUG Fixes:
· I/O Settings
· Typos
# Disable Adaptive LMK
# 2 new options:
· Disable Tweaks
· Delete Tweaks
**Update to Project Zhana & X.A.N.A v4.0**

HUGE UPDATE!!!

#Now Project Zhana used custom HMP values for giving more performance and battery
#Slightly reworked target_loads
#Ditching on go_hispeed_onload for BIG cluster too
#Rework on HMP values
#Adjust the profiles for the increment of load found on Nougat
Changes over almost every tuneable​
#Some changes for the I/O settings, LMK
#Now using msm-adreno-tz as GPU governor for better performance and battery life

#Fixed all BUGs from the previous version
#Rework on how I/O settings get applied, so no matter you are encrypted or decrypted, using OBs or CM build, they will get applied
Huge thanks to @Senthil360 for that​


**Update to Project Zhana & X.A.N.A v4.2**

#Touches on target_loads @ high frequencies
#Rework on HMP values on X.A.N.A (I ****ed up and BIG cluster was getting too much load for no reason)
#Keep adjusting for the load increase on N
Changes over almost every tuneable
#Some changes for the I/O settings, LMK
Now back at 512Kb read-ahead

#Fixed all BUGs from the previous version
#Now supporting su.d
#Changing the ROM detection from CM to Lineage OS

**Update to Project Zhana & X.A.N.A v4.4**

#Now the X.A.N.A. and Zhana are less similar
#Zhana will be more balanced and X.A.N.A. more battery efficient
#Changes over target_loads and pretty much all tuneables
#Some corrections for OP3T
#Skiping 1036 Mhz as is not efficient
#Adjusted loads distribution

It won't be a HUGE change from the last version to this one, but I think you guys will find it better :D

This update aims to Nougat, after all, we all going to end using Nougat
If you are still on MM and you feel like version 3.3 works better, let me know. But all my testers say that 4.0 4.2 works much better ( battery and performance wise)

And on Nougat there is no way 3.3 works better than 4.0-4.2 as I have personally tried a ****ing lot!


What this tweak does??.

Code:
# Interactive governor tweaking, as usual. You shouldn't modify this values unless you know what you are doing
# Input boost tweaking. The script detects If you are not using a CM-Based ROM an applied higher values, but you may modify this following the instructions from the OP.
# Disable Touchboost and BCL
# Enable Core Control and Disable MSM Thermal Throttling allowing for longer sustained performance
# Tweaks for other various Settings. You may change all of them, but they are really optimized.
   · I/O Values
   · TCP Values
   · Memory
   [STRIKE]· Disable Sleepers[/STRIKE]
# GPU Tweaking. You might change this If you suffer lag in games

#HMP Values This will "correct" the BIG Cluster utilization and take full advantage of it

INSTRUCTIONS!!
This tweak DOES NOT EXKM profile as it's impossible for some tweaks to work using them.
It used init.d script or BASH script It now uses a flashable zip file with init.d support
Therefore it's install and execute like any other init.d or BASH script, If you don't know how to do it Google it
Since I care about you I have made 2 videos on how to do it, you what people say "If a Picture is worth a thousand words, then a Video worth a Million"

Update!! I have unified both profiles into a simple flashable .zip file, so everything is easier and cleaner!
Also, it provides you with more options which are bound to satisfy your usage.

· HOW TO INSTALL!!

  1. Download the tweak
  2. Enter into Recovery and flash the tweak
  3. Boot to system
  4. Open your terminal app and introduce:
    Code:
    su
    AKT
  5. Select Balanced or Battery section as Project Zhana & X.A.N.A will be found there
  6. Select the profile you prefer
  7. Done!

Update!! Now the profile has init.d support. UPDATE! Now it also have su.d emulation
This means that the profile WILL be applied after every boot (As long as you use a init.d emulator like KA) So you don't have to do anything extra, just apply and enjoy


In case you want to use the previous version.
This might come handy as well for know to apply the init.d profiles that come with the file The profiles will automatically apply to the init.d folder.


  • You may use only 1 of the method explained ahead, there is no need for using both of them.
  • Init.d can be applied on every boot by using apps as KA or Init.d enabler
    there is no way to applied the BASH on boot, but it only takes 10 seconds to execute it.

Therefore, use the method you like the most.


INIT.D SCRIPT:


BASH SCRIPT:


In case you cannot see the videos:
INIT.D | BASH


Keep in mind that I recorded this some time ago, so what is shown won't be exactly the same, but it's just so you guys get the concept.


Explanation for each variant:
  • Project Zhana Balanced (Default): The Project Zhana that you know and love.
  • Project Zhana Battery: Same as above, but with lower Input boost values and some tweak on target_loads, above_hispeed_delay and GPU
  • Project X.A.N.A Battery (Default): This is default version of X.A.N.A
  • Project X.A.N.A Balanced: The same as above but with higher Input boost and some tweaks for I/O and GPU, for a better performance.
  • Project X.A.N.A Extrem Battery: If you are using this profile and you suffer lag don't even think on complaining since I won't listen. This is made for really light usage. No Input Boost, Battery saving I/O and GPU ...

BEFORE YOU POST ANY COMPLAINS!!

Make sure that all the settings have been properly applied, there is no longer a problem with resetting target_loads, but make sure that all have been applied.
And then check this:
MY DEVICE LAGS!!! WHY?!?!
First of all, it's a "normal" thing, as I have stated before, all these tweaks have been done for fit my usage or certain usage which is most likely not the same as yours. Because this, when the are put on a certain scenario the might stutter or lag just a bit (If you are experimenting huge lags, you have done something wrong)
And yes, this can be fixed. We have a couple of ways of fixing it:
  • Try another tweak, for example;
    If you are using Project X.A.N.A Battery, try using Balanced option...
  • Our first one is modifying the Input boost (not touchboost) most of our tweaks have an already established Input boost clock speeds and time, you can incise does too a bit. For example, we have 960(Mhz) for all the CPU at 40ms you could bump it up to ~1036(Mhz) and 42ms, don't modify too much this values since it will potentially increase your battery drain.
  • Our second tool for fixing lags is min_sample_time, my recommendation is to increase the value by 5000 each time till you no longer suffer any stutter or lag.
Still having lag?
  • Get rid of unnecessary (background-)apps
  • Try a different IO-Scheduler
  • Try another profile

My phone still uses too much battery
  • Make sure that you have disabled touchboost.
  • Set brightness to a lower level.
  • Use a dark / black theme
  • Don't play games all day
  • Try other tweak, for example;
    If you are using Project Zhana Balanced, try using Battery option...

Here are some results that me and other tester have gotten:



New!!
And here is a full cycle that I got.

I need to give a little explanation on this.
The cycle latest for 3 days with 5 hours SOT
This was during a week of exams so I didn't have time to play with my phone.
You WON'T achieve this just with the tweak, since it also involves a lot of Deep Sleep optimization, but for that screen, on time the profile will do miracles.
This could have been even better, around 4 days or usage or maybe 7 hours SOT, since I lost 14% during the first night due to a failure on my WiFi, which caused huge wakelock during that time.
During this test I was running BJRR 08/11 with EX Kernel 0.36, this doesn't mean that either of those is the best in terms of battery.
The battery drain:
· Light usage ~7%/h
· Medium usage ~9%/h
· Light Gaming (Clash Royale) ~12.5%/h
· Heavy Gaming (I haven't test this for too much) ~ 15%/h
Screenshots:


New!!
14 hours SOT!!

 
Last edited:

pramyhoga

Senior Member
Dec 28, 2013
401
103
0
Surabaya
'Project Zhana v3.0'

Well guys, finally, after tons of test and tweaking I come out with Project Zhana in his version 3.0
I hope you guys find it smooth and battery efficient as it's the main goal. Keep in mind that I might release so hotfixes
and other little optimizations since it has only been tested among few people over the Official Slack Channel
We all this been said, let's get into the tweak!!

Strategy:
Project Zhana was made for trying to be as efficient as possible without compromising the performance.
Thanks to the discovery on Voltages used by our SD820 I could make a profile that utilizes more the BIG cluster.
My first attempt was to move ALL the load to the BIG cluster, it was against anything that I have learned
about little.BIG CPU but I tried, it turned really good at first, low usage was just amazing...
But on more usage things didn't go that good.
So what I did it was to give a twist to things, but not such twist.
It kind of works like Nameless and Shotgun, @Mostafa Wael and I worked the same idea.
#LITTLE cluster will be running on low-mid frequencies but delivers full performance when is needed.
# BIG Cluster will help LITTLE ease Load, but in a great way than before.
Things can be done faster and more efficient giving us profit in form of battery.
It should run smooth on all scenarios, but you guys tell me.
In addition the script will detect whether you're overclocked and your ROM for applying the right values
You can easily get around 7~9 hours SOT for 24 hours even more If you don't play game
This will, of course, may vary, but it will definitely be better.

==================================================================================================================



Disclaimer: This was build on RR (CM based ROM) using EX Kernel and test on a variety on different ROMs and Kernels.
None of my testers complaint about stutters or lags, but there is always a first time

**Release of version 3.0**
#Too many changes for them to be said.
#But for the following version I'll give you guys the changelog.


INSTRUCTIONS!!
This tweak DOES NOT EXKM profile as it's impossible for some tweaks to work using them.
It used init.d script or BASH script* I'll add a flashable version as well *
Therefore it's install and execute like any other init.d or BASH script, If you don't know how to do it Google it
Since I care about you I have made 2 videos on how to do it, you what people say "If a Picture is worth a thousand words, then a Video worth a Million"

INIT.D SCRIPT:


BASH SCRIPT:


Keep in mind that I record this some time ago, so what is shown won't be exactly the same, but it's just so you guys get the concept.

BEFORE YOU POST ANY COMPLAINS!!

Make sure that all the settings have been properly applied, there is no longer a problem with resetting target_loads, but make sure that all have been applied.
And then check this:


Here are some results that me and other tester have gotten:


DOWNLOADS:
INIT.D SCRIPT
BASH SCRIPT

Here is where I post my BETA updates, I usually update it every day
But I do add some crazy stuff since it's used for testing and might not be stable
Great! Trying it now
 
  • Like
Reactions: trippmcnealy

Senthil360

Inactive Recognized Developer
Jun 19, 2015
1,329
3,536
0
Kanyakumari
after executing the script from kernel auditor, what about the profile applied on exkm app?

Sent from my ONEPLUS A3003 using Tapatalk
If you run the script , you need not apply the profile from EX_KM

---------- Post added at 01:53 PM ---------- Previous post was at 01:52 PM ----------

A question about the bash script / init.d, are the settings applied automatically on reboot?
If device has init.d support, then yes it will be applied after a reboot or else emulate init.d from kernel adiutor or run manually
 

Asiier

Senior Member
Nov 23, 2014
541
1,989
133
Miller's Planet
after executing the script from kernel auditor, what about the profile applied on exkm app?

Sent from my ONEPLUS A3003 using Tapatalk
Great question! Also curious.
Any of your testers have success with stock/stock based roms?
You are the tweak master @Asiier !
As @Senthil360 said, once the script is applied, the old profile doesn't matter, the name might be still showing on EXKM, but the values are from Project Zhana.
 
  • Like
Reactions: clintonbugz

QuantumRZ

Senior Member
May 23, 2014
546
125
73
Can i appy these profiles with kernel adiutor app ?
I know i can open the profiles as texts but which values are big cluster and which little cluster ?

OnePlus 3 - RR | systemless root | xposed
 

Asiier

Senior Member
Nov 23, 2014
541
1,989
133
Miller's Planet
Where are videos? Links?
The are in the post...
But here are the links anyways.
https://youtu.be/Bk2hwtdawXA
https://youtu.be/CHK_CLZzB4A

Can i appy these profiles with kernel adiutor app ?
I know i can open the profiles as texts but which values are big cluster and which little cluster ?

OnePlus 3 - RR | systemless root | xposed
If the profile is made for EXKM, no you need to use EXKM
If the profile uses init.d script, yes you may use KA for apply it
If the profiles uses BASH script or It it's a flasheable .zip, no app is needed for applying the profile. But afterwards you can modify the values with the app you prefer.
 

QuantumRZ

Senior Member
May 23, 2014
546
125
73
If the profile is made for EXKM, no you need to use EXKM
If the profile uses init.d script, yes you may use KA for apply it
If the profiles uses BASH script or It it's a flasheable .zip, no app is needed for applying the profile. But afterwards you can modify the values with the app you prefer.
I am using shotgut 1.7.6.
In the OP it only has EXKM Profiles.
But there is also one init.d script, is thr script outdated ?

I have to copy the script to /system/su.d/ to have an effect ?



OnePlus 3 - RR | systemless root | xposed
 

Asiier

Senior Member
Nov 23, 2014
541
1,989
133
Miller's Planet
I am using shotgut 1.7.6.
In the OP it only has EXKM Profiles.
But there is also one init.d script, is thr script outdated ?

I have to copy the script to /system/su.d/ to have an effect ?



OnePlus 3 - RR | systemless root | xposed
As far as I know Shotgun only has EXKM profile

But other profiles as Nameless or Project Zhana uses init.d scripts

And as you are using Systemless root /su.d folder shouldn't be present and therefore you should be using /init.d folder
 
  • Like
Reactions: QuantumRZ

=dave=

Senior Member
Dec 15, 2010
292
180
0
As far as I know Shotgun only has EXKM profile

But other profiles as Nameless or Project Zhana uses init.d scripts

And as you are using Systemless root /su.d folder shouldn't be present and therefore you should be using /init.d folder
I can find both su.d and init.d folders..in which should I copy the profile then?
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone