Join CTO Moataz Soliman as he explores the potential impact poor performance can have on your bottom line. 👉 Register Today

ebook icon

User Guides

General

Using Deobfuscation to Get Better Android Crash Reports

When an app crashes, a crash report highlighting the app conditions leading up to the crash is generated. With Instabug’s crash reporting tool you can have detailed crash reports sent to your dashboard instantly. Each Instabug crash report captures a detailed report of the running environment, the different threads’ states, the steps to reproduce the crash, and the network request logs.

Moreover, each Instabug report will include all the stack trace information on all the running threads. Instabug will highlight the most important frames in the stack trace. These highlighted frames are your app's frames. And in order for these crashes to be readable, deobfuscation is required.

What is deobfuscation?

In a crash report, stack traces are sent with only memory addresses resembling the included frames. Compiling a release build for your app will strip the debug symbols. Deobfuscation is the process of transforming these stack traces' active memory addresses into something human-readable in terms of methods and functions.

How to deobfuscate crashes

In order to deobfuscate your crashes, you need to upload a reference for the debug symbols that got stripped. This reference is called a mapping file. These debug symbols will attribute the unreadable memory addresses to their function and method names.

How to upload mapping files

Each app is unique and to ensure the best possible output, the mapping files should be attributed to the latest version of your app. Make sure your app is selected. You can upload a mapping file manually or automatically.

Manually

In order to upload your mapping file to Instabug’s dashboard, you need to find it. If your app is built with Android Studio, you will need to go to this path.

You can find the file to upload at a file path that is similar to the following, but specific to your app:

<project root>/<module name>/build/outputs/mapping/<build type>/<appname>-proguard-mapping.txt

Now that you have the mapping.txt file.

Go to Upload Mapping Files in the Settings menu of your Instabug dashboard.

Upload the mapping.txt file.

Automatically

Instead of uploading it manually, Instabug has a Gradle script that can automatically upload your project's mapping file during the build process. To enable automatic uploading on Android, follow the below steps:

1 – Navigate to the build.gradle file of your library

2 – You should find the below code. You only need to replace YOUR_APP_TOKEN with your token from the dashboard.


Deobfuscated crashes

Now that your crash reports have been deobfuscated you can view stack traces in a human-readable format. Stack traces will highlight the most important frames and methods involved in the resulting crash. With the full detail provided by Instabug’s crash reports as well as more granular crash occurrence filtering, you can easily diagnose what went wrong.

Want to try our latest AI features?
Sign up to the closed beta now
Thank you! We'll contact you once a spot opens up.
Oops! Something went wrong while submitting the form.

Learn more:

Instabug empowers mobile teams to maintain industry-leading apps with mobile-focused, user-centric stability and performance monitoring.

Visit our sandbox or book a demo to see how Instabug can help your app

Seeing is Believing, Start Your 14-Day Free Trial

In less than a minute, integrate the Instabug SDK for iOS, Android, React Native, Xamarin, Cordova, Flutter, and Unity mobile apps