Android app to generate bugreport

kencorbin picture kencorbin · Oct 7, 2013 · Viewed 8.1k times · Source

Occasionally users of our Android app is run into an obscure problem in the Google infrastructure that Google is trying to track down. And naturally the Engineer working on it wants to see some bugreport output when this happens. Which brings us down to the old problem of how do I get a non-techie end user to generated and send in a bugreport. Installing the SDK, configuring for a Windows system so that can do an adb bugreport doesn't sound feasible.

I've been looking around for a simple app that will do this, with no success. So I tried adding that capability to my own app. And this is where I need help. If I use the shell command to access my device, I can generate reports with something simple as sh -c 'bugreport | gzip > bugreport.gz' But if I try to execute this from my app, bugreport just displays an error message Failed to connect to dumpstate service I'm guessing that I am missing some odd permission, but have no idea what it might be.

Anyone have any ideas what I can try?

Answer

stinepike picture stinepike · Oct 7, 2013

If I am not wrong, you want to see the error log when the application is crashed. For this you can integrate ACRA library with the code. This can generate the runtime uncaught errors and that can be sent to email or specific server.