Awesome Open Source
Awesome Open Source

xCrash Logo


xCrash provides the Android app with the ability to capture java crash, native crash and ANR. No root permission or any system permissions are required.


xCrash can generate a tombstone file (similar format as Android system's tombstone file) in the directory you specified when the app process crashes or ANRs.

xCrash has been used in many Android apps (including iQIYI video) on different platforms (mobile, tablet, TV) of iQIYI for many years.

README δΈ­ζ–‡η‰ˆ


  • Support Android 4.0 - 10 (API level 14 - 29).
  • Support armeabi, armeabi-v7a, arm64-v8a, x86 and x86_64.
  • Capturing java crash, native crash and ANR.
  • Dumping detailed statistics about process, threads, memory, FD and network.
  • Setting which thread's info should be dumped via regular expressions.
  • Do not require root permission or any system permissions.

Tombstone File Previews

Overview Maps



Capture Native Crash

capture native crash

Capture ANR

capture anr


1. Add dependency.

dependencies {
    implementation 'com.iqiyi.xcrash:xcrash-android-lib:2.4.9'

2. Specify one or more ABI(s) you need.

android {
    defaultConfig {
        ndk {
            abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'

3. Initialize xCrash.


public class MyCustomApplication extends Application {

    protected void attachBaseContext(Context base) {


class MyCustomApplication : Application() {

    override fun attachBaseContext(base: Context) {


Tombstone files will be written to Context#getFilesDir() + "/tombstones" directory by default. (usually in: /data/data/PACKAGE_NAME/files/tombstones)

There is a more practical and complex sample app in the src/java/xcrash/xcrash_sample folder.


If you want to build xCrash from source code. Follow this guide:

1. Download Android NDK r16b, set PATH environment.

2. Build and copy the native libraries.

cd ./src/native/

3. Build AAR library.

cd ./src/java/xcrash/
./gradlew :xcrash_lib:build


  1. Check the xcrash-sample.
  2. Communicate on GitHub issues.
  3. Email: [email protected]
  4. QQ group: 603635869. QR code:

qq group


See xCrash Contributing Guide.


xCrash is MIT licensed, as found in the LICENSE file.

xCrash documentation is Creative Commons licensed, as found in the LICENSE-docs file.

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
java (28,894)Β 
c (13,574)Β 
android (5,554)Β 
native (145)Β 
reporting (67)Β 
crash-reporting (55)Β 
jni (52)Β 
handler (35)Β 
crash (32)Β 
exception (15)Β 
reporter (12)Β 

Find Open Source By Browsing 7,000 Topics Across 59 Categories