Skip to content

[android] Generate symbol files for AOT snapshots even without split-debug-info #170664

@mraleph

Description

@mraleph

Currently when building for AOT snapshots we usually strip them by default loosing all native symbolic information - because we don't expect this information to be useful. Dart runtime symbolizes stack traces it produces using information embedded into snapshot itself.

However native symbols can still come useful: consider for example a case when user hits an ANR due to long running Dart code (see #169906 as example). In this case they will be left with a stack trace in Android native format which they can't read1.

There is however a way to improve this experience: Android implementation should follow iOS one (which makes an effort to produce dSYM). Instead of stripping snapshots right away at generation time, it should produce unstripped snapshot and then split symbolic information out (e.g. using llvm-objcopy). The symbolic information could be then included in the app bundle - in which case it will be automatically picked up by Play Store. When building APKs native symbols should be split into a separate archive to simplify subsequent upload to Play Store.

@jmagman @reidbaker

Footnotes

  1. We could actually provide tooling to symbolize them using analyze_snapshot, but I think a better solution is to have Play Console symbolize them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: buildBuilding flutter applications with the toolplatform-androidAndroid applications specificallyteam-androidOwned by Android platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-androidTriaged by Android platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions