I always find that Google Play Services is way too aggresive in doing its activities in the background. And its no secret that this main services from google is oftenly one of the main culprit for the sub par battery performance on most stock or even custom ROM across devices.
Starting in Android 6.0, Google has introduced one of my favorite features in battery saving : DOZE (quick read about this Here), it help us to make apps go into a "shallow" hibernation state. Where it use less energy but retain it's functionality.
Thing is, this feature is NOT applicable for Google Play Services. Thus, it cant help you to save the battery from being eaten by Google Play Services. And this is not for no reason of course (read SIDE EFFECT/NOTE section bellow for further explanation)
Quick study (detail, if you are interested Here)reveal that Google put simple configuration is /system/etc/sysconfig/google.xml that WHITELISTING Google Play Services from the DOZE Mechanism.
So to make DOZE able to work on it, we simply need to remove the whitelisting.
This is WHAT THIS MODULE DO - SYSTEMLESSLY (obviously)
By installing this module, you can move Google Play Services from the "App Not Optimised" list to "App Optimised" which mean DOZE mechanism will work its magic on Google Play Services, thus should saving you more juices/batt throughout the day.
OOS (OnePlus) user with Nougat version and above installed wont find this option anymore. Instead, they should go to "Google Play Services" App Info from setting, choose the battery option, and scroll down to "Battery Optimisation" to check the status
Saving energy never come without side effect. Same goes with this method.
By enabling Doze on Google Play Services, it will theoritically delay/pause some it's services. Most noticeable might be the GCM (cloud messaging) services.
App that use this services might experience delay in notification when Doze already kick in.
Although, in my experience (i use this mod on all of my three devices) my notif for LINE, WhatsApp and Telegram (my main comm app) is never been delayed. ( I put all these apps in my whitelist btw)
The one i noticed had slight delay is GMail. But i check my mail regularly throughout the day, so i need no real time notif for that.
As for all other main services like Accounts, Alarm, Location and elses, i never have any issue with them when i got this module active. GPS work fine, Alarm ringing, Account Syncing normally.
-Initial Release
-Template Update
-Code Cleaning
-Template Update for Magisk 13.3
-Template Update for Magisk 14 - PLEASE UPDATE YOUR MAGISK INSTALLATION
-Template Update for Magisk 15 & Adding OREO Support
Find support on my thread @XDA : Here
otonieru@xda-developers - 2018 If you wish to implement the modification into your ROM, please mention me :)