Skip to content

feature: capture and deobfuscate crashes from minified android builds - #394

Draft
KishanPRao wants to merge 2 commits into
mainfrom
feature/ship-proguard-rules
Draft

feature: capture and deobfuscate crashes from minified android builds#394
KishanPRao wants to merge 2 commits into
mainfrom
feature/ship-proguard-rules

Conversation

@KishanPRao

Copy link
Copy Markdown
Collaborator

Summary

Apps that ship minified with R8 or ProGuard now report native crashes, and their Java crash and ANR reports can be deobfuscated with the build's mapping file, same flow as the Android SDK.

Changes

  • consumer-rules.pro: new, tells R8 to leave the SDK's Java classes alone, the crash handler process is started by class name and R8 strips it from minified apps without this.
  • android/build.gradle: bundles the rules file with the package, every app that installs the SDK picks them up without adding rules of its own.
  • examples/sdk/reactNative/android/app/build.gradle: lets CI build the example app minified with a -PbtCiMinify flag, local builds stay unminified like the template.
  • .github/workflows/android.yml: passes that flag, the native crash check now runs against a minified app.
  • BacktraceData.ts: the report payload can now say which kind of deobfuscation the backend should run, sourcemap or proguard.
  • BacktraceReport.ts: a report can carry that choice, set when it is created or later.
  • BacktraceDataBuilder.ts: copies the report's choice into the payload, still picks sourcemap on its own when a debug id is present.
  • dataGenerationTests.spec.ts: checks the payload with no choice, a choice passed at creation, and one set afterwards.
  • BacktraceConfiguration.ts: new proguard option, switch it on and give it the id of the build's mapping file.
  • BacktraceClient.ts: tags unhandled Java exception and ANR reports for proguard deobfuscation, adds the mapping id as the symbolication_id attribute on Android reports.
  • index.ts: exports the new option type.
  • proguardSymbolicationTests.spec.ts: new, covers Java crash and ANR reports getting tagged, JS reports left alone, the attribute with and without an id, and iOS ignoring the option.
  • README.md: explains how to turn it on and upload the mapping file, adds the option to the options table.

ref: BT-7518

@KishanPRao
KishanPRao requested a review from melekr September 8, 2026 12:17
@KishanPRao KishanPRao self-assigned this Sep 8, 2026
@KishanPRao KishanPRao added the enhancement New feature or request label Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants