Why on earth does the
adb shell dumpsys batterystats command not print regular timestamps? (Like
usagestats does for example, or literally anything else on the planet.)
Instead, it gives you a "RESET TIME" within the file, and the lines after that show how much time has passed since that time. "RESET" times mostly appear just once at the beginning, sometimes however they appear multiple times within the log, sometimes even skipping hours, seemingly at random.
And as if that isn't bad enough.. Let me just show a real-life example:
adb shell dumpsys batterystats
Gives me (among other things of course) this:
0 (9) RESET:TIME: 2020-01-29-01-37-39
Good. So the time starts at
2020-01-29-01-37-39. Alright. Only reset time in the output.
I just turned the screen on. Here is the entry in the log for that:
+21h44m19s484ms (4) 057 +wake_lock=1000:"PhoneWindowManager.mPowerKeyWakeLock" +screen screenwake=1000:"android.policy:POWER"
+21h44m19s. It is now (well, it was when this happened)
"RESET" time of
Okay, down to my actual questions:
- Why does
dumpsys batterystatsnot use normal timestamps?
- How does one read those timestamps? They seem beyond broken.
- Is there a way to change it to "normal" timestamps?
(My goal is to track when exactly the screen (and optionally WiFi) was on and when it was off. If there is any other way to do that besides
batterystats, please leave a comment.)