[TOOL] [PROJECT] New bugreport analysis tool - open source project by Sony Ericsson

Search This thread

KalleD

Senior Member
May 6, 2011
98
611
Hi all,
ChkBugReport is a tool that helps you analyze your crash files. Because this tool is such a great help for our internal developers at Sony Ericsson, and as a part of our ambition to step up our open source activities, we want to give all of you the chance to use it by making it open source. Pál Szász (XDA username: pal.szasz), a software developer at Sony Ericsson, is the creator of this tool and will monitor this thread for questions, discussions and suggestions. Feel free to have a look at the open source project and contribute to make it even better!
https://github.com/sonyericssondev/ChkBugReport

For the full story follow the full story in Developer World
/Karl-Johan Dahlström
Sony Ericsson Developer Program
 

pal.szasz

Inactive Recognized Developer
Jan 17, 2012
54
103
I haven't thought about IDE integration. What do you have in mind exactly?

What I'm working on is automatically opening the result in a browser when processing done (already in the source code, although I tested only in osx at the moment).

Another functionality in progress (not uploaded yet) is to use ADB to automatically save a bugreport. So you would just execute
Code:
chkbugreport --browser adb://
and it will save the bugreport, analyze it and open the result in a browser (as a bonus a screenshot is saved as well).

When this would be implemented I think it would be easy to add it as an external tool in eclipse and launch it from there.
 

pedrodh

Retired Recognized Developer
Oct 19, 2009
194
226
www.pedronveloso.com
I haven't thought about IDE integration. What do you have in mind exactly?

What I'm working on is automatically opening the result in a browser when processing done (already in the source code, although I tested only in osx at the moment).

Another functionality in progress (not uploaded yet) is to use ADB to automatically save a bugreport. So you would just execute
Code:
chkbugreport --browser adb://
and it will save the bugreport, analyze it and open the result in a browser (as a bonus a screenshot is saved as well).

When this would be implemented I think it would be easy to add it as an external tool in eclipse and launch it from there.

One possible IDE integration would be for the report to have linkable parts to the source code when applicable.
Also selecting the process from a windows, having UI buttons starting and stopping the capture of profiling data would be a bonus.

Anyway, the application works very well, and thumbs up for open sourcing this tool ;).


BTW in my case I've came across some missing resources when generating output:

Code:
Writing chapter: Trace charts/Thread-17 (Thread-18)...
Writing chapter: Main thread activity...
Writing footer...
Cannot find resource: /style.css
Cannot find resource: /icons.png
Cannot find resource: /ftrace-legend-dred.png
Cannot find resource: /ftrace-legend-black.png
Cannot find resource: /ftrace-legend-yellow.png
Cannot find resource: /ftrace-legend-red.png
Cannot find resource: /ftrace-legend-cyan.png
Cannot find resource: /ftrace-legend-dcyan.png
Cannot find resource: /pcy_p0.png
Cannot find resource: /pcy_p1.png
Cannot find resource: /pcy_p2.png
Copying extra resources...
Cannot find resource: /pcy_p3.png
Cannot find resource: /pcy_p4.png
Cannot find resource: /pcy_un.png
Cannot find resource: /pcy_rt.png
Cannot find resource: /pcy_fg.png
Cannot find resource: /pcy_bg.png
Cannot find resource: /main.js
Cannot find resource: /jquery.js
Cannot find resource: /jquery.cookie.js
Cannot find resource: /jquery.jstree.js
Cannot find resource: /jquery.hotkeys.js
Cannot find resource: /jquery.tablesorter.js
Cannot find resource: /jquery.tablednd.js
Cannot find resource: /themes/classic/d.png
Cannot find resource: /themes/classic/dot_for_ie.gif
Cannot find resource: /themes/classic/throbber.gif
Cannot find resource: /themes/classic/style.css
Cannot find resource: /themes/blue/desc.gif
Cannot find resource: /themes/blue/bg.gif
Cannot find resource: /themes/blue/style.css
Cannot find resource: /themes/blue/asc.gif
DONE!
 
Last edited:

pal.szasz

Inactive Recognized Developer
Jan 17, 2012
54
103
Regarding the resource errors: did you used the precompiled binary or compiled the source code yourself? If it's the later one, how did you compile it? While developing I use eclipse, and I have the "res" folder added a source folder as well. This way the contents of the res folder will be copied to the jar. If you compiled it in some other way, then probably the resources from "res" where not packed into the jar. Building with the ant file should work as well ("ant -f chkbugreport.xml" if I remember correctly)

Regarding the IDE integration: yes, linking/binding the source code would be nice. For tracing data there is already something in progress: running "chkbugreport -t adb://" will show a window to select a process and start/stop it's profiling, but since that code uses code from the android sdk, I need to check how I can link the two codes together (since one of the codes is GPL, the other is Apache) before I can publish it.
 

pal.szasz

Inactive Recognized Developer
Jan 17, 2012
54
103
I uploaded the changes for adb support. Now an extra jar file is needed: ddmlib.jar. You can find this either in the source code repo, or in the android sdk (a recent one is needed).

I updated the wrapper script as well, to use ddmlib.jar. However if the ddmlib.jar is missing, then the tool will still work like before, simply the new functionality will be missing, which is:

Code:
chkbugreport --browser adb://

The above command will run the bugreport tool on the phone (if it's connected to the PC, of course), processes it and open the result in the browser. As extra bonus, a screenshot is saved as well ;-)


Code:
chkbugreport --browser -t adb://

This will show a window, where you can select which process to trace. Click START then STOP, and the tracefile will be created and processed (and opened in the browser). BUT: there are some limitations:

* adb must be run as root (the tracefile is saved to the /data partition), which means either run en ENG build or USERDEBUG (but then you must first execute "adb root")
* it seems that the fileformat for traceview files have changed, the tool currently supports only version 1, so this will not work if you have a recent android version. I'll fix this later.
 

pedrodh

Retired Recognized Developer
Oct 19, 2009
194
226
www.pedronveloso.com
Regarding the resource errors: did you used the precompiled binary or compiled the source code yourself? If it's the later one, how did you compile it? While developing I use eclipse, and I have the "res" folder added a source folder as well. This way the contents of the res folder will be copied to the jar. If you compiled it in some other way, then probably the resources from "res" where not packed into the jar. Building with the ant file should work as well ("ant -f chkbugreport.xml" if I remember correctly)

Regarding the IDE integration: yes, linking/binding the source code would be nice. For tracing data there is already something in progress: running "chkbugreport -t adb://" will show a window to select a process and start/stop it's profiling, but since that code uses code from the android sdk, I need to check how I can link the two codes together (since one of the codes is GPL, the other is Apache) before I can publish it.

I compiled my own using IDEA, but since I didn't get any errors during compilation (I think) I didn't assume I was missing something in the compilation process.

About the other changes, why not output the traces to /sdcard ? Since that one is always R/W to all users should work right? I say this without actually having looked at the code behind the magic, so perhaps is not a valid suggestion.
 

pal.szasz

Inactive Recognized Developer
Jan 17, 2012
54
103
I am planning to add support for that as well (i.e. the user can select where to save the tracelogs). AFAIK the sdcard is only readable for everyone by default, apps need to have a certain permission (something with WRITE_EXTERNAL_STORAGE) in order to be able to write to sdcard. But if you are debugging your own app, that's not a problem.
 

cdesai

Inactive Recognized Developer
Jan 16, 2011
2,296
4,088
IN YOUR HEAD
The shell user does have permissions to write to sdcard, so if you're doing that via adb it should be good. :)

Sent from my GT-P1000
 

pal.szasz

Inactive Recognized Developer
Jan 17, 2012
54
103
Last edited:

jacksparao

Senior Member
May 4, 2012
864
661
India
appzinventors.wordpress.com

Scaredandscard

New member
Feb 15, 2016
1
0
Is there anyone here that can look at a bug report that popped up on my friend's phone and be able to tell who hacked her phone? She is in bitter custody battle and we are trying to prove it is the ex doing this with intent for court purposes. Please help! If willing please respond and I will give a private email address to private message due to complex circumstances and we all fear for child and our lives. Thanks in advance.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    Hi all,
    ChkBugReport is a tool that helps you analyze your crash files. Because this tool is such a great help for our internal developers at Sony Ericsson, and as a part of our ambition to step up our open source activities, we want to give all of you the chance to use it by making it open source. Pál Szász (XDA username: pal.szasz), a software developer at Sony Ericsson, is the creator of this tool and will monitor this thread for questions, discussions and suggestions. Feel free to have a look at the open source project and contribute to make it even better!
    https://github.com/sonyericssondev/ChkBugReport

    For the full story follow the full story in Developer World
    /Karl-Johan Dahlström
    Sony Ericsson Developer Program