[Galaxy S II Android Development] HardCorePawn:
As a general note to all... If you are having battery drain issues, posting like the above where you are basically only saying "my battery drain = bad" is pretty much useless... Godyn, apologies for singling out your post, but you've even acknowledged yourself that you need to check the logs!!

BEFORE you post anything regarding battery drain:

1. Install BetterBatteryStats - FREE XDA version in Post 2 on that thread. (NOTE: reboot your phone so it can set a "since boot" reference point)

2. Wait for a few hours (in the meantime, you can use your phone normally, but do try to leave it idle for as long as possible so that you can check wakelocks properly, sometimes best done overnight)

3. Open BetterBatteryStats and check the following.

- Under "Other"

check the "Deep Sleep", "Awake" and "Screen On" times. This will give you an idea of whether your phone is deep sleeping properly. Compare them to the rough times you were using the phone for, and when it was sitting idle.

- Under "Kernel Wakelock" and "Partial Wakelock"

check to see if there are any wakelocks that are taking up insane amounts of time. Don't be all like "OMG, I have AudioOut_3 wakelocks!!!!? WAAAAHHHHH!!!!" or "DORI, Y UR KERNEL NO SLEEP WITH wlan_rx_wake WAKELOCK????", if in 3 hours of measuring, you have Deep Sleep of 2hrs 15mins, Awake Time of 40mins, Screen on of 37mins and you only have 1min and 11s of wakelock like I currently do.

Some of these wakelocks YOU CANNOT eliminate completely... otherwise your phone would be OFF! :p The trick is to make sure that the amount of time is sensible... mmmmKay??

However, if you have 3 hours of measuring and you only have Deep Sleep of 30mins, Awake time of 2 hours and Screen On of 30mins and a wakelock of like 45mins, and your phone was sitting idle with the screen off, then yes... something is very wrong!

4. Once you've identified the wakelocks causing issues:

go the the BetterBatteryStats thread... Do some research... don't forget to SEARCH that thread for your wakelock (chances are at least one other person has had the same issue you're having and will have posted about it already!)... if you can't find it, then post asking for help in that thread (according to the instructions in the threads OP!! Note: requirement for BBS logs recorded for several hours!)...

Most wakelock issues are known, have been solved and the answers are already published!

So, if you've bothered to read this far, you're probably wondering, what the advantage of you doing all of the above is? As opposed to just running to kernel thread posting about bad battery drain and hoping someone posts a magical .zip that you can flash that will magically fix everything...

The answer is this: Next time you get bad battery drain, you'll know how to investigate it and solve your problem that much faster... you'll feel a sense of pride that you've fixed the problem yourself! You can boast to you friends that you are a "super geek problem solver" and your GF/wife/husband/BF/partner/dog will think you are awesome!! :D

Thanks for reading... :good:

(I will now return you to the thread where the next 20+ pages will be reports of bad battery drain with no meaningful info, "what is Mali?", "I am on ROM X, do I want 5.x or 7.x Kernel?", posts of 2 days of battery life with 5 hour screen on time screenshots, people asking what settings to use to get 5 hour screen on time, people asking why "Feature Z" from "Kernel Y" isn't in DorimanX Kernel, "HELP! I flash 7.x on ICS or preMali JB ROM, all I get is black screen!!?!", "can I dual boot with 7.x?" etc etc etc) :rolleyes: