Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android App power consumption

Tags:

android

How to check the power consumption in each applications in Android?
At least the power consumption should be relative when compared with different applications and these applications might be using any of the services like WIFI,GPS,LCD,wakelock, etc.

Are there any APIs in android regarding the same in order to measure the power consumption for the applications using the above resources?

like image 996
user1696978 Avatar asked Sep 25 '12 10:09

user1696978


People also ask

How do I stop apps from consuming power?

On Android, go to Settings > Data Usage to see which apps are using the most data. Tap on the app you'd like to restrict and disable background data. For some apps, you may be able to turn on Battery Restriction, and be sure to turn on Battery Optimization.

How do I check on apps that are using power?

Settings > Battery > Usage details Open Settings and tap on the Battery option. Next select Battery Usage and you'll be given a breakdown of all the apps that are draining your power, with the most-hungry ones at the top.


2 Answers

There is a research paper called “Accurate Online Power Estimation and Automatic Battery Behavior Based Power Model Generation for Smartphones”. For this paper the researchers developed a tool called PowerTutor, the sources of which you can find here. It should be mentioned that your device has to be rooted to use this application.

like image 157
Yury Avatar answered Oct 11 '22 17:10

Yury


First, the powertutor from Google Play is out of date. I've checked the source code of it, and find that the power estimation model is for some old mobile models. The value from power tutor is way smaller than the actual power consumption.

Therefore, I would recommend you to use Battery Historian which is developed by google used to estimate battery consumption of each App. But it's written in Python/Go. It will illustrate the hardware invocation in a html file. And you can find battery consumption of each App in a corresponding text file.

Battery Historian Example

like image 26
Xudong Ran Avatar answered Oct 11 '22 17:10

Xudong Ran