I am currently trying to understand the output of my batterystats after following the instructions listed here by Google: https://developer.android.com/studio/command-line/dumpsys#inspect_machine-friendly_output
In the identifiers section there is something call "pwi" or Power Use Item and it mentions that it can be read as label/mAh, but when I look at my output I do not seem to understand what it is telling me.
10254 l pwi uid 84.8 0 51.0 112
Is 84.8 the label and 0 is the mAh? What kind of information can I learn from this?
So what I've been able to find is that the line is being printed in: https://cs.android.com/android/platform/superproject/+/master:frameworks/base/core/java/android/os/BatteryStats.java
search for
POWER_USE_ITEM_DATAusing the search webpage Find button tool. I think what you are seeing isdumpLineon line #4563,which appears to have the right number of fields and the '0' you are referring to is a boolean flag (system process==1 perhaps), otherwise the later items represent mAh. In the code search site, you can click on
ProportionalAttributionCalculatorclass to see the method's source code. I believe that file is where the other battery stats are output, so your output may require context values displayed elsewhere.