Skip to content

Preserve native debug symbols in release AARs - #224

Open
anilbeesetti wants to merge 1 commit into
mainfrom
codex/preserve-native-debug-symbols
Open

anilbeesetti wants to merge 1 commit into
mainfrom
codex/preserve-native-debug-symbols

Conversation

@anilbeesetti

@anilbeesetti anilbeesetti commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

Next Player cannot extract native crash symbols from NextLib because FFmpeg installation and AAR packaging strip them. Retain symbol tables and source debug information in both release AARs, including the statically linked dav1d and mbedTLS code, while preserving release optimization settings. Add SHA-1 ELF build IDs to FFmpeg libraries so extracted symbols can be matched to shipped binaries.

Add an artifact check for all 40 shared-library entries across both AARs and all four ABIs. Build CI and the publication workflow run it before uploading or publishing the AARs. The check requires symbol/debug sections and build IDs, and verifies that shared FFmpeg binaries are identical between modules.

Validation:

  • python3 ffmpeg/test_setup.py and bash -n ffmpeg/setup.sh passed.
  • ./gradlew assembleRelease :media3ext:testDebugUnitTest --max-workers=4 passed; 11 JVM tests, zero failures/errors/skips.
  • python3 ffmpeg/test_symbols.py failed on the old AARs with a missing .symtab, then passed for all 40 rebuilt libraries.
  • Next Player composite release APK/AAB builds passed. All 28 distinct NextLib libraries have matching build IDs in the source AARs, extracted symbols, and stripped AAB runtime libraries. All 32 symbol ZIP entries match the AAB metadata.
  • The composite check temporarily aligned NextLib AGP 9.4.0 with Next Player 9.4.1 and reused the native outputs already built above via -x :nextlib:ffmpegSetup; the version catalog was restored afterward.
  • git diff --check passed. Device playback and Play Console uploads were not exercised.

Retaining debug data increases release AAR downloads: media3ext 14.1 → 43.3 MiB; mediainfo 18.3 → 59.7 MiB in the local builds. Consuming apps can still strip their runtime libraries, as verified in the AAB. Consumers need a newly published NextLib version and a dependency update to receive these symbols.

Companion Next Player upload change: anilbeesetti/nextplayer#2030.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant