1

Is there any way that I can get crash logs from a device which is signed with a public key, but not uploaded in android market? I need a way to get crash logs from a specific device to see why my application is crashing on it. Anyway to do this?

2 Answers 2

2

There are various frameworks for this. ACRA is one of them (http://code.google.com/p/acra/). Another that I frequently use is Bugsense (http://bugsense.com/). There are more also, but I think these two will be perfect for you!

Hope this helps!

Update:

In case you don't want to add any external library, you have to do it by your own. This means that Android in general has a mechanism to catch all uncaught exceptions. This is http://developer.android.com/reference/java/lang/Thread.html#setDefaultUncaughtExceptionHandler%28java.lang.Thread.UncaughtExceptionHandler%29.

There you can catch all uncaught exceptions and handle them as you wish (write to a file, send them, etc). All there libraries internally use this mechanism, but provide a wrapper to the user.

2
  • I saw a couple of libraries/applications which are getting the crash logs, but is there any way without including these jar's/applications on the device to get the logs. I mean to get them from it's default storage path or something like that. Or I have to include/download another application which will do that for me? Dec 19, 2011 at 14:02
  • What if the process crashes ? I saw this log line on my device: 09-04 16:32:14.242: I/dalvikvm(217): Wrote stack traces to '/data/anr/traces.txt'
    – Alex
    Sep 6, 2012 at 15:09
0

One option is installing and running a LogCat application (e.g. aLogcat) on the target phone. This can capture all logcat output - including exceptions - for the overall system and/or the app in question - using a filter.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.