Google has implemented some battery saving technologies in Android 6.0, and OEMs will have to use them. That's great, but what about tracking your battery usage? Some device makers are famous for obscuring or completely removing certain stats (eg. HTC doesn't display screen-on time). That won't be allowed in Android 6.0, according to the Marshmallow Compatibility Definition Document (CDD).

The CDD has a whole section on transparent accounting for power usage. Here's the relevant text.

8.4. Power Consumption Accounting

A more accurate accounting and reporting of the power consumption provides the app developer both the incentives and the tools to optimize the power usage pattern of the application.

  • Therefore, device implementations MUST be able to track hardware component power usage and attribute that power usage to specific applications. Specifically, implementations:
    • MUST provide a per-component power profile that defines the current consumption value for each hardware component and the approximate battery drain caused by the components over time as documented in the Android Open Source Project site [Resources, 123].
    • MUST report all power consumption values in milliampere hours (mAh)
    • SHOULD be attributed to the hardware component itself if unable to attribute hardware component power usage to an application.
    • MUST report CPU power consumption per each process's UID. The Android Open Source Project meets the requirement through the uid_cputime kernel module implementation.
  • MUST make this power usage available via the adb shell dumpsys batterystats shell command to the app developer [Resources, 124].
  • MUST honor the android.intent.action.POWER_USAGE_SUMMARY intent and display a settings menu that shows this power usage [Resources, 125].

Having the full battery stats available and consistent will make it much easier to compare devices and know what's using the most power. For all we know, OEMs are hiding battery draining apps and services from battery stats in Lollipop and earlier, but that'll stop in Marshmallow. Well, assuming they want Google certification, which of course they do.

Source: Compatibility Definition Document (PDF)