iqiyi/xCrash logo

iqiyi/xCrash

Free

🔥 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.

FreeFree tier
Type
Open Source
Company
iQiyi

About iqiyi/xCrash

xCrash is an open-source library for Android apps that captures Java crashes, native crashes, and ANRs (Application Not Responding). It generates tombstone files in a format similar to Android system tombstone files, saved to a specified directory on the device. The library does not require root or any system permissions, and supports Android versions 4.1 through 11 (API level 16-30) and multiple CPU architectures (armeabi-v7a, arm64-v8a, x86, x86_64). It also provides detailed dumps of process, thread, memory, file descriptor, and network statistics at the time of the crash. xCrash has been used in production by iQiyi across mobile, tablet, and TV platforms.

Key Features

Support Android 4.1 - 11 (API level 16 - 30)
Support 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
Generates tombstone files similar to Android system format

Pros & Cons

Pros
  • No root or system permissions required
  • Supports a wide range of Android versions (4.1-11)
  • Supports multiple ABIs (armeabi-v7a, arm64-v8a, x86, x86_64)
  • Dumps detailed process/thread/memory/FD/network statistics
  • Open source with MIT license
  • Proven in production at iQiyi across various platforms
Cons
  • Only available for Android (not cross-platform)
  • Requires manual integration into the app's code (Java/Kotlin)
  • Tombstone files can be large due to comprehensive dumps

Best For

Capturing and analyzing crashes and ANRs in Android applicationsImproving app stability with detailed crash reports for debuggingMonitoring native code crashes on AndroidInvestigating ANR occurrences in production apps

FAQ

What Android versions does xCrash support?
xCrash supports Android 4.1 to 11 (API level 16 – 30).
Does xCrash require root permissions?
No, xCrash does not require root permission or any system permissions.
Where are tombstone files saved?
By default, tombstone files are saved to Context#getFilesDir() + '/tombstones' directory, typically /data/data/PACKAGE_NAME/files/tombstones.
How do I integrate xCrash into my app?
Add the dependency `com.iqiyi.xcrash:xcrash-android-lib:3.0.0` to your build.gradle, specify the ABIs you need under android.defaultConfig.ndk.abiFilters, and call XCrash.init() in your Application class's attachBaseContext() method.
What types of crashes does xCrash capture?
It captures Java crashes, native crashes, and ANRs (Application Not Responding).