[Samsung Galaxy S 5 Unified Development] curiousrom:
S5 klte LineageOS 18.1 Battery Usage @ Idle Test - Sleeps Like a Rock

Dying battery, rogue app(s) always working in the background, bad cellular or wifi signal, cr@ppy setup, etc, etc.

As you can see in the attached GSam screenshot: Used 0% in 7h 24m Δ 0.0%/h.

Notice that it was Held Awake for only 11m 43sec. during that time. So Doze is excellent & my S5 sleeps well.

The other screenshot is of GSam > App Usage > Time Held Awake.

That's for my Galaxy S5 G900M LineageOS 18.1 klte build 2021-08-01 + MindTheGapps + Magisk 23.0 + TWRP 3.5.2_9-0 + 100+ apps, w/ battery profile default: Balanced, apps auto-update disabled in Play Store, sync enabled (GMail, Contacts, Calendar, Keep Notes, WhatsApp, Reddit, Telegram, Edge) & WiFi on.

I'm pretty sure it is not really 0% discharge as there are no decimals except for the %/hour so maybe it's from 81.9 to 81.1% for example but still it's less than 1% of battery usage in 7h 24m of idle time.

How I ran the test:

Install GSam Battery Monitor and give it all the permissions it wants.

GSam > triangle (Delta) menu select > Since Screen Off.

Create a GSam icon shortcut for quick access on the Home desktop.

Disable Ambient Display if you have that so the screen does not turn on when you receive notifications during the idle test. Disable apps auto-update in Play Store > Settings if you have it. Disable automatic backups like for WhatsApp or Google Backup for example. Disable clock alarms.

Clear Recent apps.

Discharge the battery to 92% or less. That's because on many devices the battery discharge faster from 100 to 92% (especially on the S5) and that skews the results. See S5 Battery Charging - Fake 100% for explanations. A trick: charge to 100%, disconnect the device & reboot.

Don't touch including don't move the S5 for at least 6 hours.

As soon as you turn on the phone open GSam, make sure it's set to Since Screen Off & take a screenshot as fast as possible. The reason is that the display on eats a lot of battery & will skew the results.

Then you can explore the different panels in GSam & make additional screenshots if you wish. I find > App Usage > View Time Held Awake and View Num Times Waking Device informative as well as > Charts > Phone Signal.

See GSam user guide which is a little bit dated but informative.

Also attached is a dumpsys deviceidle that was captured right after taking some GSam screenshots were you can read under Idling history:

normal: -7h35m47s174ms (screen) >>> when I turned off the screen

light-idle: -7h31m0s732ms

light-maint: -7h24m31s748ms

light-idle: -7h24m26s373ms

light-maint: -7h14m25s788ms

light-idle: -7h14m20s566ms

light-maint: -6h48m32s671ms

light-idle: -6h48m26s968ms

light-maint: -6h29m2s499ms

deep-idle: -6h28m50s240ms

deep-maint: -5h41m31s580ms

deep-idle: -5h41m1s127ms

deep-maint: -3h43m29s659ms

deep-idle: -3h42m59s169ms

normal: -11m7s404ms (screen) >>> when I turned the screen on.

You can see your device's idle settings & also the idling history with this command in adb:

adb shell dumpsys deviceidle

Or to save a doc in the folder where you are currently running adb:

adb shell dumpsys deviceidle > deviceidle.txt

***

Lower Battery Usage Tips

A recent modem may help: S5 Odin Flashable Modem & Bootloader.

Battery & RAM usage depends a lot on the GApps package you install (if any) and the permissions you give to Google (Web & App Activity, Location History, YouTube History, Ad personalization, etc.) in https://myaccount.google.com/data-and-personalization

The more data you let Google collect, the more active Google Play services as you can see in > Settings > Developer options > Running services.

Also Play Store > Settings > General > disable *Auto-update apps* & do it manually once in a while with the device plugged-in.

In LineageOS 18.1 you can control both network & WiFi per app usage in > Settings > Network & internet > your Mobile network's name > App data usage > tap on app's name.

Or Settings > Apps & notifications > app's name > Mobile data & Wi-Fi.

I freeze the apps that I use rarely & use battery while in the background for no good reasons.

For rogue apps too busy in the background I prevent them from starting at boot with SD Maid > AppControl > app's name > and disable BOOT_COMPLETED. It does not work for all apps but those get frozen.

It pays to check the app's settings if they use battery during idle.

For example Speedtest by Ookla > Settings > disable Network signal scanning and > Analytics & AdChoices > toggle both off. That's good for privacy also.

***