[HD2 Android NAND Development] themadproducer:
Battery Drain

Battery Drain guys.

If there is one thing that I stubbornly became good at finding, it's mystery battery drains and stuck drains. I am not on Dx rom but use his kernels. Last night I found my 59ma+ battery drain issue to be a profile in Tasker.

I want to lend you my experience. It's easy to blame the rom or the kernel, but as Dx himself does not have these issues as stated a few posts back....and usually, if the Dev doesn't have the drain, then it's 3rd party app, or specific to your setup which will not be the same as his...EVEN WITH a stock bare bone installation.

So if you have read this far, here are the steps to take...(yes even the EXPERIENCED users can benefit from this) It's worked for me 100% every time.

1) be prepared to dig in and be methodical. No stone left unturned. Don't ASSUME anything. DO A CWM BACKUP.

2) THE FIRST thing you should try, is AIR PLANE mode.. This will tell you if any radio module or app that uses radio...is misbehaving. It is a quick way to weed out half the usual suspects. Use Current Widget to test (step 3) It has specific drain alert features.

3) Download the FREE app Current Widget. Set it for 30sec intervals. Set the high drain alert threshold to 20ma+ and consecutive duration for 5min. This means a 5min period will contain 10 readings. If you get 10 readings in a row that are 20ma+, then the alarm will go off. This will confirm that you have a stuck drain of sorts. This will also tell you when your drain issue has been resolved...when you go through a 12hr period in standby without an alert. The alarm feature (in this scenario) is meant to be used with screen off in standby. No other app will do this for you...until someone copies the idea of course!!!

4) So lets say you can confirm that you have a stuck drain....even if it's periodic. If it lasts 5 minutes...and it happens many times a day, or if it's just plain stuck on high drain, then you need to isolate the problem.

5) HIGHLY RECOMMEND you purchase Titanium Backup. I know I know, you can't afford the bloody 7 bucks or whatever it is. BUT it is a MUST have tool for guys like us. It's a modding assistant tool from the Gods. It has at least 5 major uses that have become indispensable for me. The feature you will want to use is the FREEZE/DEFROST.

For those who have never used this feature, this is what you do. (as it pertains to trouble shooting.)

If I have a 60ma drain confirmed and it won't go away, then I start freezing 10 apps at a time in Titanium. Freezing them does not delete or harm them. It just puts them into suspended animation...as if they were DELETED from your rom. After each group of 10 apps have been frozen, then diligently run the drain test with Current Widget for as long as it takes. (in my case, 5 minutes would tell me if I still had the drain) If the drain stops, then you know it's one of the 10 apps causing it. Now you take 5 of those apps and DEFROST them. See if the drain has come back or not. If not then defrost 3 of the 5 etc etc etc until you pin down the culprit.

If it's not in the first 10 frozen apps, try the next 10. So now you would have 20 frozen apps and son and so on. If all your apps are frozen, then you CAREFULLY...I mean SUPER CAREFULLY, start deciding which core SERVICES you can start freezing. A while back, the drain issue for me turned out to be GOOGLE MAPS/NAV. At the time, I just kept them FROZEN to bypass the issue. VIOLA! Since then, I have defrosted maps and updated and I no longer have the drain.

6) If you find out that it is a particular app...like Maps...or SMS etc., then you have a few choices to make like...

a) delete data/cache for that app

b) backup the app with Titanium and re-install the app, test again, then if all is good, restore data to that app

c) delete the app and find an alternative

d) test the app and see if there is a trigger scenario that causes the drain...a feature or a switch etc.

e) continue to blame Dorimanx (just kidding)