SkillAgentSearch skills...

XCrash

πŸ”₯ 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.

Install / Use

/learn @iqiyi/XCrash
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<p align="center"><img src="doc/xcrash_logo.png" alt="xCrash Logo" width="450px"></p>

xCrash

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.

<p align="left"><img src="doc/intro.png" alt="intro" width="320px"></p>

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 δΈ­ζ–‡η‰ˆ

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.

Tombstone File Previews

Overview Maps

Architecture

<p align="left"><img src="doc/architecture.png" alt="architecture" width="750px"></p>

Capture Native Crash

<p align="left"><img src="doc/capture_native_crash.png" alt="capture native crash" width="520px"></p>

Capture ANR

<p align="left"><img src="doc/capture_anr.png" alt="capture anr" width="750px"></p>

Usage

1. Add dependency.

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

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

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

3. Initialize xCrash.

Java

public class MyCustomApplication extends Application {

    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);
        
        xcrash.XCrash.init(this);
    }
}

Kotlin

class MyCustomApplication : Application() {

    override fun attachBaseContext(base: Context) {
        super.attachBaseContext(base)

        xcrash.XCrash.init(this)
    }
}

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 xcrash_sample folder.

Build

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

Build AAR library.

./gradlew :xcrash_lib:build

Support

Contributing

See xCrash Contributing Guide.

License

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

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

Related Skills

View on GitHub
GitHub Stars3.9k
CategoryDevelopment
Updated5d ago
Forks650

Languages

C

Security Score

85/100

Audited on Mar 24, 2026

No findings