Unable to view HTML trace report generated by Syst

2019-02-05 14:12发布

I am trying to generate trace reports with Systrace tool in the Android SDK, but I cant view the report in the browser. It is blank and does not contain any information. I read in some forums that I need to open the report in Chrome browser, I opened it with Chrome as well but the report is blank.

I have enabled USB Debugging from the Developer Options and device is running Android 4.2 and I am using DDMS tool from the Android SDK to generate the traces.

http://developer.android.com/tools/help/systrace.html

12条回答
\"骚年 ilove
2楼-- · 2019-02-05 14:28

You can try my sample trace.html file to check if your Chrome version is okay or not. https://github.com/tngotran/systrace-android/blob/master/trace.html

Also here is a link to the official trace.html sample from Google https://source.android.com/devices/tech/debug/perf_traces.zip

By the way, from my experience, the command tool python systrace.py can create an output file trace.html without error, but result is an empty file (even the file size is larger than 5Mb or more).

We have to:

  1. Run the command adb root from your terminal to restart adbd as root
  2. Run the python systrace.py again

Then check your created report .html file in Chrome :)

查看更多
Animai°情兽
3楼-- · 2019-02-05 14:29

I solved this issue just by updating the SDK, use the SDK manager select tools and platform tools for update and you're done. Python script doesn't work on Windows. However even if the trace.html is generated and it can be seen, when data overflows, it is not possible to see the bottom part of the page. This because wasd navigation is not enough making the use of the scroll bar needed.

To do this you need to:

  • If you're in Linux modify the Python script and eliminate the overflow:hidden wherever is found.
  • If you're using SDK, edit the trace.html and eliminate the overflow:hidden wherever is found.

Hope it helps, it'll be nice that someone in Google can fix this on the source.

查看更多
戒情不戒烟
4楼-- · 2019-02-05 14:29

I just found the my trace.html, which failed to open in IE/Firefox/Chrome, opened fine in the latest Opera (on my Windows PC).

查看更多
做自己的国王
5楼-- · 2019-02-05 14:34

Suggestion: Try to trace an emulator (they are for development)


The issue may be manufacture customization to the Android OS, making the problem potentially a device configuration issue caused by the manufacture.

There are several answers that may be helpful here.

None of these worked for me... but because of answer https://stackoverflow.com/a/52379567/1815624

I found that it would load data by using the linked trace files:

Also here is a link to the official trace.html sample from Google https://source.android.com/devices/tech/debug/perf_traces.zip

Using adb root did not work.

On a different device it worked flawlessly right off as well as using an emulator.

查看更多
【Aperson】
6楼-- · 2019-02-05 14:42

Update your SDK using SDK manager, select tools and platforms tools to be updated. Follow the normal procedure, and that's it. Chrome is recomended to see results.

查看更多
地球回转人心会变
7楼-- · 2019-02-05 14:43

I also faced similar issues while trying to open a Systrace generated html file (around 10 MB ) on Firefox 37.0.1. However the same file works brilliantly on Chromium Version 37.0.2062.120 Ubuntu 12.04 (281580) (64-bit).

查看更多
登录 后发表回答