Quick answer: Install Unity's Android Logcat package and open it with Window > Analysis > Android Logcat (Alt+6, or Option+6 on macOS), or run adb logcat -s Unity ActivityManager PackageManager dalvikvm DEBUG. Managed exceptions appear under the Unity tag; native crashes appear as a tombstone under DEBUG. Resolve IL2CPP addresses with the package's Stacktrace Utility and your build's symbol files. For crashes on players' phones, capture them in the game instead.
An Android game that crashes simply disappears: no dialog, no message. Everything you need to know is in the device's system log, logcat, as long as you know how to filter it and read what it says. This guide covers the Unity-specific parts.
Setup
- On the device, enable Developer options (tap Build number seven times) and turn on USB debugging.
- Connect it and run
adb devices; accept the authorisation prompt on the phone. Unity's Android module includes adb in its SDK tools. - Build with Development Build enabled while investigating: you get more logging and readable managed stack traces.
Option 1: the Android Logcat package
Install Android Logcat from the Package Manager and open Window > Analysis > Android Logcat (Alt+6 on Windows, Option+6 on macOS). It lists connected devices, filters by your app's package, priority and tag, and also offers memory statistics, screen capture and recording, and a Stacktrace Utility (under Tools) for resolving native addresses.
Option 2: adb on the command line
# Unity's recommended filter: Unity logs, app lifecycle, the runtime and native crashes
adb logcat -s Unity ActivityManager PackageManager dalvikvm DEBUG
# Only your game's process (start the game first)
adb logcat --pid=$(adb shell pidof -s com.yourcompany.yourgame)
# Clear the log, reproduce, then dump the crash buffer
adb logcat -c
adb logcat -b crash -d
Reading what you find
Managed exceptions
C# exceptions are logged under the Unity tag with the exception type, message and managed stack trace, for example E Unity : NullReferenceException: Object reference not set to an instance of an object followed by the call chain. Unhandled exceptions in Unity usually do not close the app; the game carries on in a broken state, which is why players describe it as “it froze” or “the menu stopped working”.
Native crashes (tombstones)
A crash in native code (the engine, IL2CPP-generated code or a plugin) prints a block under the DEBUG tag that starts with *** *** *** *** *** ***, followed by the signal (for example SIGSEGV), the faulting address and a backtrace of frames like #00 pc 0000000001a2b3c4 /data/app/.../lib/arm64/libil2cpp.so.
Out of memory and ANRs
If the app vanishes without a tombstone, look for ActivityManager lines saying the process was killed (often low memory), or ANR in com.yourcompany.yourgame if the main thread stopped responding.
Resolving IL2CPP addresses
Tombstone frames in libil2cpp.so or libunity.so are addresses until you resolve them against the symbol files from the same build. Enable symbol output in the Android build settings (the option is called Debug Symbols or Create symbols.zip depending on your Unity version), keep the symbols for every build you ship, and paste the backtrace into the Android Logcat package's Stacktrace Utility, or use the NDK's ndk-stack or addr2line.
Crashes on devices you do not have
Logcat only helps on a phone plugged into your machine. For crashes on players' devices, you need the game to report them: Google Play's Android vitals shows native crashes and ANRs reported by the system, and an in-game SDK captures managed exceptions and errors with the stack trace, recent log lines and device. Bugnet's Unity SDK files exceptions, errors and failed asserts from Unity's log automatically, with the last 100 log lines, the OS, CPU, GPU and RAM, and a screenshot. Create a free project to try it, or read about crash reporting for Unity on Google Play.
Frequently asked questions
How do I see Unity logs from an Android device?
Use the Android Logcat package (Window > Analysis > Android Logcat, or Alt+6) or run adb logcat -s Unity ActivityManager PackageManager dalvikvm DEBUG with the device connected by USB with USB debugging on.
Where do Unity C# exceptions appear in logcat?
Under the Unity tag, with the exception type, message and managed stack trace.
How do I read a native crash in logcat?
Look for the tombstone under the DEBUG tag, starting with a line of asterisks, then the signal, the faulting address and a backtrace. Resolve the addresses in libil2cpp.so or libunity.so with the symbol files from the same build.
How do I symbolicate IL2CPP crashes on Android?
Enable symbol output in the Android build settings, keep the symbols for each build, and resolve the backtrace with the Android Logcat package's Stacktrace Utility or the NDK's ndk-stack or addr2line.
How do I get crash logs from players' Android devices?
Check Android vitals in Google Play Console, and add an in-game SDK that captures exceptions and errors automatically with the device and recent logs attached.
Logcat tells you why your phone crashed. Players' phones need the game to tell you.