Is there a way to see the power consumption of an Android process? I have a rooted HTC Hero, and I have developed some native programs in C language. I want to see the power
As said here: Android Battery usage profiling
There is a private API, PowerProfile, for retrieving battery consumption on a subsystem level (see http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.2_r1.1/com/android/internal/os/PowerProfile.java). Also take a look at the code for the fuel gauge you find in Android's settings on how they calculate power consumption: http://google.com/codesearch/p?hl=en#ohAXAHj6Njg/src/com/android/settings/fuelgauge/PowerUsageSummary.java
AppScope is an application energy metering framework for Android smartphones using kernel activity monitoring. AppScope provides an accurate and detailed both per-application and per-process energy estimation solution.
The current release supports HTC Nexus One only and can be found here.
For more information and technical details about the AppScope framework you can read the AppScope paper presented at USENIX ATC '12, here.