[ANDROID] Crash debugging

Overview

This article explains what to do if your packed Unreal project crashed and you want to know what happend.

Setup

The easiest way is to have "Android studio" installed.

If not, download it here.

After download and installation, verify that your settings looks like in the picture below

(Hint: Make sure you have the same android version checked as your phone uses. In this example it is "Android 7.0 (Nougat)")

Add android platform-tools path to your system environmental "path"

For easier debugging on your windows system, add the path to your android sdk platform tools to the path variable.

If you have done it right, open a command prompt end type "adb".

    • If you got "command not found" you did something wrong

  • If your window is flooded with text you are ready for the next step

Verify that your phone is connected to the computer your are working with

In a command window, type "adb devices".

Below is a screenshot how it should look like.

(Hint #1: Make sure you are using a fresh command prompt window after adding the android sdk path to your system environmental.)

(Hint #2: Make sure your device is using the USB mode "share images" )

Some helpful scripts

The file "ADB_TOOLS.RAR" attached to this article contains two windows scripts (*.bat files) for an even easier workflow:

  • adb_logcat_clean.bat - purge the current log on the connected device

    • adb_logcat_dump.bat - dump the current log from the connected device to a "logcat.log" file

Step by step usage instructions

    1. install the apk to the connected device

    2. execute "adb_logcat_clean.bat" to get a minimalized dump

    3. execute the "adb_logcat_dump.bat" right after the crash on the device occur

    4. analyse the created "logcat.log" to find the issue