[Moto G4 Guides, News, & Discussion] ricki13th:
Hey everyone, I just wanted to make a guide on how to improve your battery life on a custom nougat rom with solid performance and little to no heating issues. I use this method after many trials and errors after I only got 2.5-3hrs of SOT after leaving stock and flashing custom roms. However, after Magisk 14.3 I no longer got the frequent safety issue that plague me for months and I also notice my battery life starting to improve.

Please Note: I have not tested this on marshmallow custom roms or any stock Moto G4/G4 Plus rom (6.0 and above) but feel free to try and let me know if it works. Also this method could be duplicated on other devices.

Disclaimer: I'm not responsible for any bricked or damage device you used my method. I give all credit to the developers who does a fantastic job creating all the things they do for the root community. Thank you!

Follow the following tips if your on a custom nougat rom (Ex: LineageOS, Resurrection Remix, InvictaOS, etc.).

1. Download a custom Nougat (7.0+) rom for your device and go through the initial set up as normal. (I personally use InvictaOS for my device which is very stable). Note: Do not install any root app that modifies system files!

2. Download the following files: Ex kernel , Addon-su- remove-14.1.zip , Magisk 14.3 (1437).zip.

2. Reboot into recovery and install the latest Ex kernel for nougat. This kernel is quite stable and works universally with most custom roms. (It also keeps the phone sightly cooler during heavy usage).

3. Next, flash the addonsu-remove.zip file to remove any traces of root from your room as it will interfere with Magisk which could result in your device randomly rebooting. Afterwards, flash magisk 14.3.zip (This version of magisk pass safetynet on a consistent basis in my experience). You can now reboot your device.

4. Once your back into your phone, launch magisk manager and check if your pass safetynet (which means you did it right) now head to the download section of the app and install the module for "Sysconfig Patcher". A solid tweak improves screen off time by putting the battery hog known as Google Play Service into doze.

This is a bonus step but it's well worth it if you want to maximize battery life:

5A. Buy the official Ex kernel app from the play store. This allows you more power over your kernel settings than the alternatives. Next download the kernel turnables "lightning blade" in addition to our device, this works on allow phones using a snapdragon 617 processor like the G4/G4 Plus. Download the zip file and follow the instructions in the thread very carefully. This will give you much improved screen on time by using less cores unless necessary to maintain a smooth experience. Additionally, It keeps the phone cooler during heavy usage coupled with ex kernel.

5B. Now you can play around with the kernel settings if you like. My personal settings is more gear to my average daily use. Under CPU tab I change my governor turnable to lightning blade from the previous step, under GPU tab I use Simple_ondemand as the gpu governor. Under memory tab, I disable both KSM and KSM Deferred Timer and enable Low Memory Killer. Then under miscellaneous I change TCP to Westwood, increase the i/o schedule read ahead time to 512, and press wake blocks to toggle all three wake blocks. If you want to keep these changes make sure to hit apply on boot for every changes made within the app. You can undo all this to return to ex kernel's stock settings by clearing ex kernel manager's app data and rebooting.

Important: If you follow my steps above you should have better battery life. Try not to install Magisk modules what is not compatible with Magisk 14.0 and above as it may cause your device to randomly reboot and bootloop when powering on.

Please share your battery stats!