If you’re an owner of a Sony Smartphone and have received the Android 7.0 Nougat update, then you’re probably aware of the battery drain issue. Upon opening Settings->Battery, users will be able to see all the apps and tasks that are draining their device’s battery. With the Nougat update, it seems that “Phone Idle” eats up a larger percentage of the battery than what it used to.
Turns out that Sony miscalibrated the Virtual Memory Values which is the cause of the battery drain. You’ve probably gotten used to Android Nougat and are reluctant to flash back Android Marshmallow, so here’s a tutorial on how to fix and even improve your device’s battery;
- Stock Nougat running on your Sony Device
- A Root Explorer that can edit text
Steps to fix battery drain
- Open your Root Explorer and navigate to /system/etc and open the file called init.qcom.post_boot.sh.
- Scroll down to the end of the file and add the following lines of code:
echo 'N' > /sys/module/msm_thermal/parameters/enabled echo '1' > /sys/module/msm_thermal/vdd_restriction/enabled echo '0' > /proc/sys/vm/laptop_mode echo '60' > /proc/sys/vm/overcommit_ratio echo '70' > /proc/sys/vm/vfs_cache_pressure echo '20' > /proc/sys/vm/dirty_ratio echo '10' > /proc/sys/vm/dirty_background_ratio echo '2000' > /proc/sys/vm/dirty_expire_centisecs echo '3000' > /proc/sys/vm/dirty_writeback_centisecs
- Save the file.
- Reboot your device.
Note: This has been tested on the Z5 Premium and may or may not work on other Sony Devices.
via: XDA Developers