Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Logging Crash Information

Kevin Brosnan edited this page Jun 19, 2019 · 8 revisions

Using adb logcat to get crash information

To get information about a crash you will need an Android device that reproduces a crash, a computer running Windows, macOS or Linux and a USB cable that connects your device to your computer.

Configuring your phone

  • Enable Developer Mode
    • On stock Android open the Android Settings and use the search at the top to find build number
    • Tap the build number 7 times
    • For other devices use your favorite search engine or YouTube to find steps for your device.
  • Enable Android USB debugging
    • On stock Android Open the Android Settings and use the search at the top to find USB debugging and enable it
  • Connect your device to the computer using a USB cable

Downloading the Android SDK Platform tools

  • Download the Android SDK Platform tools for your operating system
  • Use your operating system tools to extract the zip file that was downloaded

Checking that adb can see your phone and is authorized

  • Connect your device to the computer using a USB cable
  • Open a command prompt or terminal and change to the directory to the platform tools directory that was extracted
  • On Windows run the command adb devices on macOS and Linux run ./adb devices
  • If it returns unauthorized you will need to authorize the phone to connect to the computer by accepting the connection dialog on the phone

Reproducing the crash

  • Connect your device to the computer using a USB cable
  • Open a command prompt or terminal and change to the directory to the platform tools directory that was extracted
  • On Windows run adb logcat -v time on macOS and Linux run ./adb logcat -v time
  • Reproduce the crash
  • Unplug the device
  • copy all the information in the terminal to a plain text document
  • Use https://gist.github.com/ to save the logcat information
  • Add the Gist URL to the issue for the crash

Optional Cleanup

  • It is recommended to disable USB debugging once you are done collecting this information
  • You can remove the Android SDK Platform tools by deleting the folders and zip files