For AOSP 5.1.1 Lollipop Users
UPDATE 01, October, 2015 ::::
I am Back with More Information about Wakelocks and battery drains.
Lollipop has a famous Mobile Radio Active bug that has been coming to light recently. This is one of the biggest battery drainers in Android Lollipop and there is no official fix from Google as far as I know. There's a lot of info flying around in XDA about patches and such but those patches do not fix the core problem. They only help report the correct battery usage. This is NOT the fault of your custom ROM Maker, or Manufacturer. This is Google's fault, and as expected, they know about this issue but are prolonging a fix. The bug happens when Android OS will continually try to access the Radio in your phone even if no request for data are being transmitted. So far as I know. If someone has better information, make a thread or post, and pm me.
Once there is an absolute solution available and has been proven to work, I will update this thread.
In the past couple months. I tried Every software you can throw at Android, but its misbehavior, and limiting users, continues to escalate as version numbers go up. Lollipop coupled with Google Play Services has been one such Problem.
Lollipop has a constant need for your data. Mix this with Google Play Services, and you have a battery recipe of 5 hours max on a Modern fairly powerful device.
For those of you on Lollipop AOSP Builds 5.1.1 Suffering from Battery Drains. There are a Few Options which I will list that can help you figure out your issues. This MAY or MAY NOT work for your ROM.
Root users Only - Install the following. (Please note in some cases, SELinux in your ROM should be set to Permissive)
1 -
AFWall+ from Fdroid :
https://f-droid.org/repository/browse/?fdid=dev.ukanth.ufirewall
Set it to BLACKLIST Mode - and Block Data Access from Apps that do not need it. Be Careful.
2 -
AdAway from Fdroid https://f-droid.org/repository/browse/?fdid=org.adaway
3 - Your ROM should have Privacy Guard or App Ops - Long Press on the App then Deny/Ignore *Location, *Wakeup *Keep awake for Pesky Apps like Google Play Services and Google PlayStore. You can also disable Autostart for some apps.
Apps like Greenify, Xposed, etc, will cause more problems for average users than they are worth. More often than not, these type of Apps limit functionality if the User does not know exactly how to use them.
4 - Use Disable Service to Disable Useless Services from Google Play Services *CAUTIONARY, Leave it alone if you don't know what you are doing* - I personally disable the following by using Search in Disable Service:
Ad*, Fit*, Wear*, Youtube, Kids, Cast, Games, GoogleNetworkLocation*(cautionary) - This may or may not save Ram when loading Services but I do this because I do not like Google Bloat.
If you use Google maps, you may want to leave Googlenetwork location. Do not disable "Network Location Service".
Do NOT Disable System Update Service as this will causing pesky Google Services to hold thousands of Wakelocks.
5 - In Developer Options, enable Captive Portal Detection. This will disallow Data connection unless a Connection to Google Servers can be established. Essentially, this will save Data usage caused by some rebel Apps. [This setting is ON by default even if it is not in your ROM]
6 - If you do not have a Data plan but you have MMS Messaging, you can create a new APN that allows ONLY MMS. [If your APN does not stick, and keeps reverting back to another auto selected APN, delete all APNs and only keep the Default APN, edit it > APN Type > remove everything except for MMS, no worries, all APNs can be restored to defaults later if need be.
7 - If you do not use Google Maps, in Location, set it to Device Only.
8 - Install Wake Lock Detector - it should give you information on what is causing the Wakelock. Usually it is an App that uses the System or Google Play Services to request Data, and hits multiple times. [Lollipop has a pesky mobile radio active bug, which should have been fixed by now, check with your ROM dev]
9 - Remove unncessary Syncs - *I leave Contacts, and Calendar on.
10 - In the Dialer, if you do not use Google's lookup services, you can uncheck Forward/Reverse lookups. Now the Phone/dialer will not hold unnecessary wakelock when you have no data connection. Your provider automatically sends This data when a phone call is received anyway and this service is mostly useless unless you are constantly connected.
Not Rooted users can also try
*NO ROOT Firewall. *This will make a VPN Connection but its internal only. It gives fine grain control over Data transfer but by itself it does not prevent Google Services from playing dirty and continually turn on the CPU. It saves bandwidth.
https://play.google.com/store/apps/details?id=app.greyshirts.firewall
Its a little complicated but once you understand it, its fairly simple and can help save unnecessary data hits and even prevent ads loading up on your limited mobile data plans.
APN AND MOBILE DATA SETTINGS [Lollipop]
Starting with Lollipop, Mobile Data HAS to be on for you to get MMS. Apps cannot turn on Mobile Data when they need to. Google wants you connected Constantly. The problem is When there is a bad signal, Not only will your Phone continue to try to search for a Connection, it will also continually try to Sync data and constantly Search for your GPS / AGPS location keeping your CPU awake and draining your battery.
1) If you do not have a Data Plan, and would still like to get MMS, Get your proper APN settings from your Carrier.
Edit your APN and in
APN Type remove Default,Suppl and leave MMS.
2) If you do have a Data Plan, but you don't want Google to constantly be connecting, Restrict Background Mobile Data by going into Data Usage > Scroll down and you will see Google Play Services and Play Store. Select them and Restrict Background Data. Also make sure in AppOps or Privacy Guard to turn off Wake Up and Keep Awake (I personally disable Location and Auto start) as well but that is my personal preference only. I prefer syncing manually.)
This will prevent further battery drains unless you want Google to sync on your Data plan.
Conclusion :
,
If I have more information I will update this thread. Please read instead of filling up threads with useless, and unnecessary questions. Google first for information.
OH NOES! My Phone is messed up, Plllleeeez HAAAALP is NOT going to Help you.
I wish everyone the best in solving their Google problems.