[Galaxy S II Android Development] NePanicPas:
My battery 2 cents

I was on ShoStock. Then I wanted me some KitKat. I tried Render's CM, PacROM, and this one. Battery was better on CM and PacROM but I had other issues. I loved this ROM, so I tried to figure out what was causing the drain.

Before, I would install a ROM, install Nova & TiBU and do all my restores. I decided to do a clean install instead and not restore anything (other than the auto-installs Google Sync does). I don't use Google+. Or Hangouts. I uninstalled them. I've just seen too many horror stories about them. Maybe once I have everything else figured out, I'll nandroid and give them a try.

I don't like having to turn stuff off to have decent battery life. I leave Wifi, Bluetooth, GPS, Data, Sync, and Location Serices on all the time. What I do insist upon is deep sleep. Better Battery Stats and Wakelock Detector are a must. I've learned to kill the following wakelocks: nlpwakelock, nlpcollectorwakelock, RILJ.

Wakelocks and ROMs are funny. I would install a ROM and see wakelock A. I would reinstall and A would be gone. Sometimes to be replaced by wakelock B. Sometimes rebooting would make a wakelock go away. Sometimes it would make it come back or another one appear. Get to know your battery "slope" - the rate at which your battery drains - and keep an eye with BBS & WLD for errant processes that pin the processor or keep the device from sleeping. Terminate, Greenify (which I don't use yet), freeze, or replace those apps if rebooting doesn't solve it.

I found that Google Now kills battery life. I can do without the cards and a path for my daily commute. But even turning it off after installing it didn't help. So I clean installed again and didn't set up Google Now. Much better. I use TweetCaster instead of Twitter and FriendCaster instead of Facebook.

The biggest change came when I swapped the CPU governor from the default (On Demand?) to Pegasusq. Wow. I go to sleep with a full battery, I wake up the next morning with 100% still. While on wifi, battery life is Uh-MAZING. On the weekend at home I can easily go 2 days.

The problem comes when I'm not connected to wifi. 3G battery drain is far worse. But my wife experiences the same thing with a 4.4.2-based MIUI ROM on her Inspire 4G, so I chalk that up to KitKat.

Before blaming the ROM, go slow. Do a clean install with minimal apps until you've established a baseline. I've never seen the need to wait 3-4 charge cycles to see how the phone will behave. It's usually pretty evident as soon as things settle. A reboot at that point wouldn't hurt either.

Then start to reinstall your go-to apps, a few at a time. Keep a log. Keep an eye on your slope. Record the results. If it starts to go south, you should have a good idea of the culprits. Then you can try other kernels if you must. At least you'll have a baseline to compare to. If you flash willy-nilly on a daily basis waiting for that ROM that will take you > 24h from day 1, you'll be looking for a long time.

I'm on 5.1.1 with stock kernel and stable now for a couple of weeks. I've avoided restoring from TiBu unless necessary, and only user data then.

This one's a definite keeper.