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

Android Q cannot parse battery stats #182

Open
mitchross opened this issue May 13, 2019 · 32 comments
Open

Android Q cannot parse battery stats #182

mitchross opened this issue May 13, 2019 · 32 comments

Comments

@mitchross
Copy link

Android Q does not work with Battery Historian. Here is the error - Note: Could not parse aggregated battery stats.

@fengguoqing
Copy link

I meet same program, have any solutions?

@RoyIronGrey
Copy link

I meet the same problem, too. Anyone know why?

@wangjun7121
Copy link

I meet same program, have any solutions?

@Yjnscorpio
Copy link

I meet same program,have any solutions?

@antgustech
Copy link

Same here.

@ashlylau
Copy link

same problem

@tnthbs
Copy link

tnthbs commented Sep 24, 2019

U could replace the ,0.0, to ,0, in the bugreport.txt and try again.

@antgustech
Copy link

U could replace the ,0.0, to ,0, in the bugreport.txt and try again.

What do you mean? For what value(s)?

@kevinisbest
Copy link

Thanks @tnthbs , it works for me!

@kevinisbest
Copy link

Hi all, the error comes from the mismatch of "0.0" and "0".
My solution is adding an if statement before line

tm, err := strconv.Atoi(t)

if t == "0.0" {
	t = "0"
}

Hope this will help you guys!

@tnthbs
Copy link

tnthbs commented Oct 23, 2019

Hi @kevinisbest ,do u mean the new code should be as below? Have tried but still meet errors
for i, t := range rem {
if t == "0.0" {
t = "0"
}
tm, err := strconv.Atoi(t)

@weijunxq
Copy link

same issue, in my test
never plug out usb can parse
1.adb shell dumpsys batterystats --reset
2.adb bugreport > bugreport.txt

plug out usb cannot parse
1.adb shell dumpsys batterystats --reset
2.plug out usb
3.plug in usb
4.adb bugreport > bugreport.txt

@JosielManzonni
Copy link

JosielManzonni commented Dec 23, 2019

U could replace the ,0.0, to ,0, in the bugreport.txt and try again.

@tnthbs How did u find out it ?!

@Riven0108
Copy link

Riven0108 commented Dec 31, 2019

Android Q does not work with Battery Historian. Here is the error - Note: Could not parse aggregated battery stats.

I meet same program, have any solutions?

You can pull the battery info ( including Coulomb Charge) directly from the bugreport logs with a simple search. Battery Historian not required to read battery log info.

How to do it, see: https://www.reddit.com/r/GooglePixel/comments/ehmuwc/this_is_how_you_can_check_a_rma_refurb_to_see_if/

@sanjiv2001
Copy link

I just followed the steps on that Reddit post. The problem is that the bug report generated by the Android Q phone doesn't even have the battery info in it. I read the entire bug .txt file beginning to end and there's not a single mention of battery capacity anywhere.

@Riven0108
Copy link

Riven0108 commented Jan 1, 2020

I just followed the steps on that Reddit post. The problem is that the bug report generated by the Android Q phone doesn't even have the battery info in it. I read the entire bug .txt file beginning to end and there's not a single mention of battery capacity anywhere.

Then you used the wrong file. I doubt you read it all as mine exceeds 600 pages in Android 10/Q.

You have to use the bugreport.txt file that is inside the bugreport zip archive.

The bugreport.txt file that is not inside the zip archive is empty. Do not use that one.

For example: https://imgur.com/a/QIdFcN7

@sanjiv2001
Copy link

I am 100% sure I am using the right file. I've also done this process multiple times before on previous Android versions and on other Pixel Android Q phones. This is the first time I am getting data on literally all aspects of the phone EXCEPT battery.

@Riven0108
Copy link

Riven0108 commented Jan 1, 2020

I'm

I am 100% sure I am using the right file. I've also done this process multiple times before on previous Android versions and on other Pixel Android Q phones. This is the first time I am getting data on literally all aspects of the phone EXCEPT battery.

Then you are doing something wrong. As I am on Android 10/Q, Dec security update, and I can clearly get battery info.

Screenshot: https://imgur.com/a/QIdFcN7

@sanjiv2001
Copy link

Yea, I checked my process multiple times now and I still don't understand why that chunk of battery information is just missing from the txt file. It might be some sort of bug with the phone. If I figure this out, I'll post my workaround here.

@Riven0108
Copy link

Yea, I checked my process multiple times now and I still don't understand why that chunk of battery information is just missing from the txt file. It might be some sort of bug with the phone. If I figure this out, I'll post my workaround here.

What Q security patch is the device on?

@sanjiv2001
Copy link

December 5th, 2019

@sanjiv2001
Copy link

Also, the bugreport.txt I am getting is much smaller than the usual report I get on most phones. Like you said, it should be in the ballpark of 600 pages, but mine is not this time. (hence why I was able to skim through it all)

@Riven0108
Copy link

Riven0108 commented Jan 1, 2020

December 5th, 2019

That is strange. There are two bugreport.txt files in the bug report output. One is outside the bugreport zip archive, and one is inside the archive.

The one outside is empty and everything is..."cannot be fetched from service manager (null) Warning: Skipping"

In my case the bugreport.txt file inside the archive is like 600 pages long, and is the only one with all the data in it.

I also have a Pixel.

@sanjiv2001
Copy link

I will reset my phone (was planning on it anyways) and retry the same process. I have a feeling there is some sort of error with the software. Regardless, I appreciate the help.

@Riven0108
Copy link

I will reset my phone (was planning on it anyways) and retry the same process. I have a feeling there is some sort of error with the software. Regardless, I appreciate the help.

Do both of the bugreport.txt files contain the same info on your device?

@weijunxq
Copy link

weijunxq commented Jan 6, 2020

docker run -p 9999:9999 gcr.io/android-battery-historian/stable:3.1 --port 9999
this version is working

@nickoe
Copy link

nickoe commented Jan 7, 2020

Yeah, using the 3.1 tag instead of 3.0 do seem to make the bugreport loadable and no critical errors as such in the terminal output, but I see errors in the webui when loading and I can't see any graphs. Using android Q bugreport.

The underlying format for bt has 1 additional field(s) that are not captured.
dct has 5 additional field(s) that are not captured.
dcc has 5 additional field(s) that are not captured.
unknown data category wmct
The underlying format for dc has 4 additional field(s) that are not captured.
unknown data category awl
wl has 6 new fields
wl has 6 new fields
wl has 6 new fields
...

@guliash
Copy link

guliash commented Jan 20, 2020

3.1 working for me too. Thank you @weijunxq!

@Wibblyw
Copy link

Wibblyw commented Jan 21, 2020

Anyone know if 3.1 is running on a public server anywhere? I don't think this one is 3.1
https://bathist.ef.lc

@Kol3sar
Copy link

Kol3sar commented Jan 28, 2020

any plans to fix https://bathist.ef.lc `?

@bjosey
Copy link

bjosey commented Mar 3, 2020

@Kol3sar @Wibblyw
I emailed the owner of https://bathist.ef.lc and they've update the image.

@in509
Copy link

in509 commented Mar 25, 2020

docker run -p 9999:9999 gcr.io/android-battery-historian/stable:3.1 --port 9999
this version is working

Thank you, 3.1 works for me. @weijunxq

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