Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

per process power consumption in Android

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 consumptions of these programs. So, I want a way to measure the power consumption in process level and not in application level as e.g. PowerTutor application does..

Is there an API that can help me develop an application that can do this thing? Can I use /proc/ stats etc.?

any ideas on this?

like image 870
Thanasis Petsas Avatar asked May 18 '11 22:05

Thanasis Petsas


People also ask

How do I check power consumption on Android?

Open the Settings app. From the list, tap Battery or Battery Usage. It will display the list of apps and the battery life they consume.

Which app is consuming more power?

1. Facebook and Messenger According to a report by Avast, Facebook and Messenger are on the top ten list of the apps that consume the most significant amount of resources.

What is power profiles for Android?

Stay organized with collections Save and categorize content based on your preferences. Battery use information is derived from battery use statistics and power profile values.


1 Answers

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

like image 181
neteinstein Avatar answered Oct 18 '22 05:10

neteinstein