androidfirebaseandroid-ndkcrashlytics

Does Crashlytics receive Tombstone data from native crashes?


Starting from Android 12, we can obtain Tombstone traces in ApplicationExitInfo.

val exitReasons = activityManager.getHistoricalProcessExitReasons()

for (aei in exitReasons) {
    if (aei.reason == ApplicationExitInfo.REASON_CRASH_NATIVE) {
        val trace = aei.traceInputStream
        val tombstone = Tombstone.parseFrom(trace)
    }
}

Having a Tombstone trace really help developers to fix issue from native crashes.

I've examined the Crashlytics source code:

private static CrashlyticsReport.ApplicationExitInfo convertApplicationExitInfo(
    ApplicationExitInfo applicationExitInfo) {
  String traceFile = null;
  try {
    InputStream traceInputStream = applicationExitInfo.getTraceInputStream();
    if (traceInputStream != null) {
      traceFile = convertInputStreamToString(traceInputStream);
    }
  } catch (IOException e) {
    // ..omitted
  }

  return CrashlyticsReport.ApplicationExitInfo.builder()
      // ..omitted
      .setTraceFile(traceFile)
      .build();
}

It appears that Crashlytics already sends the traceFile.

However, it's unclear to me whether the traceFile also supports Tombstone trace or not.

Can we confirm that Crashlytics already parses the Tombstone (Tombstone.parseFrom(trace)) and displays it in the Firebase UI (console.firebase.com)?


Solution

  • Since May 27, 2025, Crashlytics has started displaying Tombstone traces.
    I assume this feature is only available on Android 12 and higher.