[Galaxy S II Android Development] ol1ver:
High power drain?

Hi all, and first off, thanks for the great effort put into this so far. It is even after so many years still greatly appreciated.

Now, while my daily driver atm still is a n7100 running an unofficial lineageos 14; I recently got an i9100 returned to me. I did upgrade it to cyanogenmod back in the day (android 4.4.4).

Fast forward 5? years, and I decided to give the i9100 a new lease on live, and maybe even use it as my new daily driver, as the n7100 doesn't have a lineageos 16 (yet).

FIrst, some background info.

So using the instructions in the starting post, I did get a little confused on which instructions are now accurate. I understand we want the new TWRP for needed features, and we need the 3.3* version, but the only zip was the 3.0* version. The 3.3 version available was a .img. Also, it was said that we can do everything with repit; yet there are odin and PIT instructions. Ignoring for a moments the mysteries of PIT (some claim it is 'special' partitioning information, but it really seems like it is just GPT information that ODIN/Heimdall/Loki? writes to the eMMC). It seemed like the re-pitting would be needed for my old (or stock) ROMs. As there where only ODIN instruction (and I don't have windows) I tried doing it using heimdall. Flash the PIT + TWRP img in one go. The PIT seemed to have worked fine, the recovery partition errored out that it couldn't finish. I can't rember if I did the same with the 'boot.img'; though I highly doubt it.

Sure enough, after a reboot, the old CM recovery popped up; which doesn't work with repit.

Now, I know there is a lot of 'secrecy' and 'skillz' with various tools in the android world, especially here at XDA, so I do apologize for going at this the complete inappropriate way :)

From the CM recovery, I logged in over adb, and copied over the boot.img (from the ROM zip; which in turn is the kernel + iniramfs + stuff). I then used dd to copy the boot.img to the kernel partition (I may have done the same with the TWRP 3.3.1-1 cpio.lzop image to the recovery partition, can't remember). After a reboot, I did now have the "new" kernel, with isorec which now also loaded the TWRP 3.3.1-1 recovery appropriately (So the heimdall flash error my have been a fluke and flash did succeed, but without isorec, wasn't booted). With TWRP 3.3.1-1 now in hand, I could repit and flash the ROM normally.

I do have to mention that I examined the eMMC partition just after PITing, and the sizes where right (but obviously the file-systems where not). So I'm still not sure why the PITing is really needed, as repit does repartition and reformat ... Further I should note, that I did format my data partition as f2fs and the old sdcard as swap. The 'hidden' (preload) partition, which only holds samsung stock crapware, is also happily minimalized ;) Iinitially setup the 16GB SD card that I had as 'internal (f2fs)' but it complained about it being 'too slow' so I kept it as 'portable' (vfat) for now.

With los16 now running on the phone, I was quite content. Having installed no apps, and just playing around with the base OS to see new features and gauge performance. Wifi was working, but spotty (dropping in/out often), trying to connect etc. I haven't checked dmesg/logs here yet. I am using a spare (data-only) sim-card from my ISP (not making the switch with my normal sim just yet), and I do have 4G connectivity which was up and stable.

I did notice a huge drain on the battery. The battery is original, from 2012, so very well may be the cause, but I also noticed, leaving the battery on airplane mode overnight, the available % actually went up :) The first evening, I played with the phone and in 4 hours (with probably 3-ish hours being just standby) The battery went from 100% to 50-ish% rather quickly. I could almost see 1% loss per minute. I left the phone on my night-stand over night (5 hours) and the phone was at 2% in the morning and shut down after a few minutes. So one could argue, bad battery, lots of other usage.

The second night, I played with a full charge a bit, which went from 100% to 82% in half an hour or so. I then turned it into airplane mode, and left it on the nightstand for 8-ish hours. In the morning, the battery level actually went up (90%) which indicates to me, high power drain. E.g. the power gets drained very quickly, and after stopping the high power drain, the battery can recover (voltage goes back up, charge shows higher).

The phone is now again on my nightstand, with only 4g connected, but no wifi. and swap these parameters over night.

My guess for now is the wifi, as it was having trouble connecting (both on 5g0 and 2g4) sometimes it would work, sometimes it just tried to connect and then dropped back to 'saved'. The failure to connect may be draining the battery hard.

If it is the wifi, I'll repeat the test with wifi-only with the phone right next to the accesspoint; and will also check logs.

Since the kernel is super old (3.0) it may thus be worth it to start looking in backporting the wifi driver, as it has received some fixes over the years; but this is too soon to tell.

p.s. sorry for the long post :(