Skip to content
space2 edited this page Sep 28, 2012 · 4 revisions

HOME > How to use it

Open in browser

By simply adding the --browser argument, chkbugreport will try to open the result in the default browser. You can make this the default behaviour by adding openBrowser=true to ~/.chkbugreport (create the file if needed)

File formats

ChkBugReport tries to be as flexible as possible regarding the file format:

  • It should support any line endings (even crazy ones like 0x0d 0x0d)
  • It should handle gzipped bugreports
  • It should handle zipped bugreports (it will scan the zip for the first file which looks like a bugreport)

Android version

Please note that the format of the bugreport changes with each android version, so some version might not be supported completely. Also the contents (i.e. which data is saved) varies from phone to phone, so some information might be missing.

Tables

Some of the tables support sorting: if there is such a hint before the table, you can click on the columns to sort the data alphabetically. You can hold down Shift to sort on multiple columns.

Some other tables might support reordering (there will be a hint/note regarding this before the table), in which case you can drag rows and move them up or down.

The data of some tables are exported as CSV (comma separated values) files as well, in which case you can open them up in excel or open office and do your own statistics/filtering/sorting/etc.

If ChkBugReport can find the sqlite jdbc driver in the classpath (for example sqlitejdbc-v056.jar), then the data of some tables (and some other data as well, like stacktraces) will be imported into a newly created SQLite database as well.

Analyzing logs

You don't need to have a full bugreport to use this tool. You could download a logger application from the market, which will continuously save the system/main/event logs on the sdcard. This way you can get usage data from several hours.

When you want to process the logs, extract them from the sdcard and execute:

$ chkbugreport dummy --no-limit -sl:systemlog.txt -el:eventlog.txt

  • The dummy argument is used only to generate an output filename
  • The --no-limit tells chkbugreport to not trunkate the log files. By default chkbugreport trunkates log files bigger then 1MB, in order to avoid generating too huge reports (or running out of memory). Sometimes this is what you want as well, if the crash/exception is at the end of the log. However in this case we want to process the whole log file.
  • The -sl:file argument will load the system/main log. If you have the main log in a separate file, you can load it with -ml:file
  • The -el:file argument will load the event log

Of course the generated report will be much more limited, since a lot of information is missing (for example the name of processes), so chkbugreport tries to guess what it can. But even only from the logs many information can be extracted, for example the battery usage.

# ##
Clone this wiki locally