UPDATED FOR MARCH SECURITY PATCH! 08/03/2017
Hey folks!
Today I decided to share my actual setup for everyone to try and report back.
Mind that is still WIP, absolutely far from perfect and it's based on my personal preference, since it's built around the way I use the phone. But it can be easily adopted for many people here since it's pretty flexible.
The main goal of this setup is to provide consistency, both in battery and performance. Also, I mind security a bit, this is why I update the phone often; Because of that I want to flash the least possibile .zip files in recovery after updating to the latest security image (I'm lazy and I like things done nice once, and I never do them twice when it's not needed)
With this setup you should go between 10%/h to 15%/h SOT, consistently. I've seen some of my friends dropping to 9%/h, but no guarantees
Also, added bonus: It DOESN'T trips SafetyNet, so you can use Pay and your beloved Pokemon go!
Also note that english isn't my native language, but I try my best to write as readable that I can. Sorry about that.
This require an unlocked bootloader, but not necessary a rooted phone.
The Setup:
1) First things first: Clean your phone from junk around (I suggest a pretty hard wipe) and since this require to be on the stock system (which IMO works best) flash latest N build.
2) Convert your data and cache to F2FS. It's pretty good, and even if in your opinion it doesn't boost performance THAT much, take in mind that it requires no trimming (which EXT4 does need). Mind not converting /system, this is UNSUPPORTED on stock system. It needs a custom rom.
3) Flash "Flash Kernel" from here. You can literally use any kernel you prefer, but I found this rich enough to use it. Mind it does support F2FS, if you converted to it in step 2.
4) Flash Magisk. This way you have root out-of-the-box and safetynet isn't tripped (for you Pay users!) Also, it plays nice with the mods in the next steps. Don't forget to activate "magisk hide" in the app!
5) Flash this magisk mod (increases media volume steps to 30, in call volume steps to 15)
6) Reboot your phone and set it up.
7) Install Magisk App, WakeBlock, and your kernel manager for the kernel you chose. In this setup, I use EX Kernel Manager.
8) Now, from your favourite root file manager go to /cache and create this directory structure: magisk_mount/system/framework/oat/arm64/ then place in the last folder (arm64) this file. It's from this mod, called WakeBlock. (It basically acts like amplify, but doesn't need xposed NOR root)
9) Reboot the phone.
The setup it's done, you can now tweak it as you prefer or just follow the below steps.
2) Convert your data and cache to F2FS. It's pretty good, and even if in your opinion it doesn't boost performance THAT much, take in mind that it requires no trimming (which EXT4 does need). Mind not converting /system, this is UNSUPPORTED on stock system. It needs a custom rom.
3) Flash "Flash Kernel" from here. You can literally use any kernel you prefer, but I found this rich enough to use it. Mind it does support F2FS, if you converted to it in step 2.
4) Flash Magisk. This way you have root out-of-the-box and safetynet isn't tripped (for you Pay users!) Also, it plays nice with the mods in the next steps. Don't forget to activate "magisk hide" in the app!
5) Flash this magisk mod (increases media volume steps to 30, in call volume steps to 15)
6) Reboot your phone and set it up.
7) Install Magisk App, WakeBlock, and your kernel manager for the kernel you chose. In this setup, I use EX Kernel Manager.
8) Now, from your favourite root file manager go to /cache and create this directory structure: magisk_mount/system/framework/oat/arm64/ then place in the last folder (arm64) this file. It's from this mod, called WakeBlock. (It basically acts like amplify, but doesn't need xposed NOR root)
9) Reboot the phone.
The setup it's done, you can now tweak it as you prefer or just follow the below steps.
The Kernel tweaking:
1) Open up EX Kernel App and go to CPU, set both governors to Interactive and tick stick on reboot
2) Go to governor options and choose your governor. I use AmanuensisOne v1.0, which gives me around 6-7h sot. Load it, stick it on reboot and back to CPU.
3) Go to CPU Boost options, and disable everything (set everything to 0/disabled) and tick stick on reboot. Then back to CPU.
4) Enable core_control and disable msm_thermal, stick them on reboot.
5) Go to Memory and Disable UKSM stick on reboot.
6) Go to Miscellaneous set I/O Scheduler to FIOPS, stick on reboot, Readahead to 1024 with stick on reboot, disable fsync, also set it to reboot.
Done!
2) Go to governor options and choose your governor. I use AmanuensisOne v1.0, which gives me around 6-7h sot. Load it, stick it on reboot and back to CPU.
3) Go to CPU Boost options, and disable everything (set everything to 0/disabled) and tick stick on reboot. Then back to CPU.
4) Enable core_control and disable msm_thermal, stick them on reboot.
5) Go to Memory and Disable UKSM stick on reboot.
6) Go to Miscellaneous set I/O Scheduler to FIOPS, stick on reboot, Readahead to 1024 with stick on reboot, disable fsync, also set it to reboot.
Done!
Blocking those nasty wakelocks and save the battery! (aka R.I.P. NlpCollectorWakelock):
It's reccomanded to use the phone for a while before doing this. Wakeblock collects informations on wakelocks only when they fire the first time, so a bit of use it's needed.
1) Open wakeblock app and check if it says "service bound". If it doesn't you may have missed something on the "The setup" part, check point #8.
2) Go to wakelocks and block this wakelocks (the time is expressed in ms in the app - Don't enter spaces, of course.) if you don't have a wakelock, skip it:
- NlpWakeLock -- 600 000ms
- GCoreFlp -- 600 000ms
- RILJ -- 800 000ms
- UrlDispSvcFastWL -- 600 000ms
- CMWakeLock -- 600 000ms
- *net_scheduler* -- 3 600 000ms
- Wakeful StateMachine: GeofencerStateMachine -- 600 000ms
- LocationManagerService -- 600 000ms
- SyncLoopWakeLock -- 600 000ms
- NetworkStats -- 800 000ms
- Icing -- 3 600 000 ms
- ULR_BarometerReading_WakeLock -- 600 000ms
- NfcService:mRoutingWakeLock -- 3 600 000ms
- NlpCollectorWakeLock -- 600 000ms
Take in mind that this wakelocks are blocked without impacting ANY functionality of the phone. You may want to increase the time if don't use geolocation at your own risk
1) Open wakeblock app and check if it says "service bound". If it doesn't you may have missed something on the "The setup" part, check point #8.
2) Go to wakelocks and block this wakelocks (the time is expressed in ms in the app - Don't enter spaces, of course.) if you don't have a wakelock, skip it:
- NlpWakeLock -- 600 000ms
- GCoreFlp -- 600 000ms
- RILJ -- 800 000ms
- UrlDispSvcFastWL -- 600 000ms
- CMWakeLock -- 600 000ms
- *net_scheduler* -- 3 600 000ms
- Wakeful StateMachine: GeofencerStateMachine -- 600 000ms
- LocationManagerService -- 600 000ms
- SyncLoopWakeLock -- 600 000ms
- NetworkStats -- 800 000ms
- Icing -- 3 600 000 ms
- ULR_BarometerReading_WakeLock -- 600 000ms
- NfcService:mRoutingWakeLock -- 3 600 000ms
- NlpCollectorWakeLock -- 600 000ms
Take in mind that this wakelocks are blocked without impacting ANY functionality of the phone. You may want to increase the time if don't use geolocation at your own risk
More tweaks (improve smoothness and perceived UI speed):
This is a highly WIP part, setting anything different might break your system or get your phone into bootloop (happend twice to me). I highly suggest to have a backup if you want to fiddle more with these settings. You are advised. If you find something useful, please share.
1) Download HEBF and L Speed. These two apps have many tweaks to improve UX and saves a little bit more juice.
2) Open up L Speed and set it this way:
- Main tweaks: Activate Kernel sleepers optimization, Improve scrolling, Liquid smooth UI
- Battery: Activate Battery improvement
- LNET Optimizer: Activate all the tweaks and set NET Buffers to small (or big, but it wastes more battery)
- Seeder: Set to Enlarger mode
- Settings: apply on boot delay set to 60 sec.
3) Open up HEBF and set it this way:
- Set user type to "Chuck Norris" and proceed.
- Battery: Activate Google play services drain fix (Master) and usage report
4) Go into Settings > Developer options and scale all animations to 0.5x
1) Download HEBF and L Speed. These two apps have many tweaks to improve UX and saves a little bit more juice.
2) Open up L Speed and set it this way:
- Main tweaks: Activate Kernel sleepers optimization, Improve scrolling, Liquid smooth UI
- Battery: Activate Battery improvement
- LNET Optimizer: Activate all the tweaks and set NET Buffers to small (or big, but it wastes more battery)
- Seeder: Set to Enlarger mode
- Settings: apply on boot delay set to 60 sec.
3) Open up HEBF and set it this way:
- Set user type to "Chuck Norris" and proceed.
- Battery: Activate Google play services drain fix (Master) and usage report
4) Go into Settings > Developer options and scale all animations to 0.5x
Done, if you done all of this correctly you should see a dramatic improvement on battery life and performance.
I still reccomend to use Naptime, or better, Greenify to save some extra juice.
Have a good day, and enjoy your phone!
Please comment with your battery stats or suggestions if you wish to improve this topic.
Last edited: