Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

How to see individual app battery status when batterystats are taken for specific package? #36

Open
Gaurav504 opened this issue Oct 6, 2015 · 8 comments

Comments

@Gaurav504
Copy link

  1. adb shell dumpsys batterystats --reset
    then performed operations after disconnecting the device to power source/USB.

Generated the bug report:
2. adb shell dumpsys batterystats --charged/unplugged {package_name} > bugreport.txt

Created HTML:
3. python historian.py bugreport.txt > battery.html

This does not create 'battery.html' for a specific package.
if I don't give the package name. it works fine.

But my requirement is to generate battery.html file only for specific packages.

Are there suggestions on how should I do it?

Thanks in Advance.

@tfarhan133
Copy link

Seems you are using Historian 1.0
Do Battery Historian 2.0 setup and use this to see the logs for specific package.
I have recently done it on my windows machine. Its working great.

https://github.com/google/battery-historian

@Gaurav504
Copy link
Author

It is 2.0. I have configured 2 days back on Windows.
It generates the bugreport file for specific package.
But while creating html, it shows 'Bugreport does not contain battery information'.
Though I am able to see the info in text file.

@tfarhan133
Copy link

I did'nt try to generate bug report for some specific package uptil now.
But i generate over all report using following command then open it new
Historian 2.0 web page and that page showing me the app wise stats just
like this screen shot.
https://github.com/google/battery-historian/blob/master/screenshots/viz.png

adb bugreport > bugreport.txt

On Tue, Oct 6, 2015 at 4:51 PM, Gaurav504 [email protected] wrote:

It is 2.0. I have configured 2 days back on Windows.
It generates the bugreport file for specific package.
But while creating html, it shows 'Bugreport does not contain battery
information'.
Though I am able to see the info in text file.


Reply to this email directly or view it on GitHub
#36 (comment)
.

--------
Regards,

Muhammad Farhan Khan
Senior Software Engineer

Arbisoft (Pvt.) Ltd.
www.arbisoft.com

@tfarhan133
Copy link

And i following this tutorial for windows.
http://ph0b.com/battery-historian-2-0-windows/

On Tue, Oct 6, 2015 at 5:04 PM, Muhammad Farhan Khan <
[email protected]> wrote:

I did'nt try to generate bug report for some specific package uptil now.
But i generate over all report using following command then open it new
Historian 2.0 web page and that page showing me the app wise stats just
like this screen shot.
https://github.com/google/battery-historian/blob/master/screenshots/viz.png

adb bugreport > bugreport.txt

On Tue, Oct 6, 2015 at 4:51 PM, Gaurav504 [email protected]
wrote:

It is 2.0. I have configured 2 days back on Windows.
It generates the bugreport file for specific package.
But while creating html, it shows 'Bugreport does not contain battery
information'.
Though I am able to see the info in text file.


Reply to this email directly or view it on GitHub
#36 (comment)
.

--------
Regards,

Muhammad Farhan Khan
Senior Software Engineer

Arbisoft (Pvt.) Ltd.
www.arbisoft.com

--------
Regards,

Muhammad Farhan Khan
Senior Software Engineer

Arbisoft (Pvt.) Ltd.
www.arbisoft.com

@Gaurav504
Copy link
Author

That's working for me as well.

But I'm more interested more in App level information.

As mentioned, with this command we can generate the report for specific package also
adb shell dumpsys batterystats --unplugged your.package.name > dump.txt

That's what i'm looking for.

@tfarhan133
Copy link

You still can see wakelocks, service, network and power consumption stats
per app.

But i have not generated the chart for one app.

I think you are looking for that, that would be great to see, let me know
if got successfull ;)

Happy Analyzation!

On Wed, Oct 7, 2015 at 3:28 PM, Gaurav504 [email protected] wrote:

That's working for me as well.

But I'm more interested more in App level information.

As mentioned, with this command we can generate the report for specific
package also
adb shell dumpsys batterystats --unplugged your.package.name > dump.txt

That's what i'm looking for.


Reply to this email directly or view it on GitHub
#36 (comment)
.

--------
Regards,

Muhammad Farhan Khan
Senior Software Engineer

Arbisoft (Pvt.) Ltd.
www.arbisoft.com

@Gaurav504
Copy link
Author

Sure.

@albertchristian92
Copy link

hi sir, I am new in battery historian actually. I have problem in battery historian installation on Windows operating system. because it cannot shows the chart like this:
http://prntscr.com/a3uqr9

I follow this tutorial:
http://ph0b.com/battery-historian-2-0-windows/

and have an error like this:
http://prntscr.com/a3upkp

do you have any idea to solve my errors? please help me. Thanks a lot.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants