How to get a coredump / stacktrace in Android device?

I have the same problem, do you have a good way to solve it now?