Android crash & error logs

Collect crash stacks and device logs from an Android phone or tablet so developers can find the cause of a crash, freeze or error.

Before you start

Logcat in Android Studio

  1. Connect the device and accept the Allow USB debugging prompt.
  2. In Android Studio, open View › Tool Windows › Logcat.
  3. Select the device at the top of the Logcat window.
  4. Filter the logs, for example package:mine level:error, or search for FATAL EXCEPTION.
  5. Reproduce the issue. Copy the crash block, from FATAL EXCEPTION to the end of the stack trace, into the bug report.
Android Studio Logcat window showing log lines for an app running on an emulator
Logcat in Android Studio, filtered by the app package.
Capture right awayLogcat keeps only recent messages and clears them quickly. Connect the device as soon as the crash happens, or keep Logcat open while you test.

Logcat from the command line

Clear old logs, start recording, reproduce the issue, then stop with Ctrl+C.

adb logcat -c
adb logcat > logcat.txt

Save only the crash messages from the device:

adb logcat -b crash -d > crash.txt

For freezes and "app not responding" (ANR), collect a full bug report:

adb bugreport bugreport.zip

Without a computer

  1. Open Settings › System › Developer options.
  2. Tap Bug report (or Take bug report) and choose Interactive report.
  3. When the notification says it is ready, tap it and share the zip file.

The name and location of these settings vary by device brand (Samsung, Pixel, Xiaomi and others).

What to include in the report