Skip to content

Makefile: make unstripped libtailscale and debug symbols #619

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 7, 2025

Conversation

kari-ts
Copy link
Collaborator

@kari-ts kari-ts commented Mar 5, 2025

  • Added Makefile targets to build an unstripped version of the libtailscale AAR.
  • Extracted the native .so (libgojni.so) from the unstripped AAR.
  • Generated a debug symbols file (libgojni.so.debug) using llvm-objcopy with --only-keep-debug.
  • Stripped the native library (libgojni.so.stripped) with --strip-debug and repackaged the final AAR.

This allows the build chain to produce a stripped AAR for the app and a separate debug symbols file that can be uploaded to Google Play for crash deobfuscation.

Signed-off-by: kari-ts [email protected]
Updates tailscale/tailscale#15210

@kari-ts kari-ts force-pushed the kari/nativedebug branch 30 times, most recently from ee84b3c to 4a2a87d Compare March 5, 2025 23:52
@kari-ts kari-ts force-pushed the kari/nativedebug branch 13 times, most recently from 6a41a3e to 09104db Compare March 6, 2025 02:40
@kari-ts kari-ts requested a review from barnstar March 6, 2025 02:41
- Added Makefile targets to build an unstripped version of the libtailscale AAR.
- Extracted the native .so (libgojni.so) from the unstripped AAR.
- Generated a debug symbols file (libgojni.so.debug) using llvm-objcopy with --only-keep-debug.
- Stripped the native library (libgojni.so.stripped) with --strip-debug and repackaged the final AAR.

This allows the build chain to produce a stripped AAR for the app and a separate debug symbols file that can be uploaded to Google Play for crash deobfuscation.

Signed-off-by: kari-ts <[email protected]>
Updates tailscale/tailscale#15210
@kari-ts kari-ts force-pushed the kari/nativedebug branch from 09104db to 12d0c54 Compare March 6, 2025 18:41
@kari-ts kari-ts requested a review from raggi March 6, 2025 18:41
Copy link
Member

@barnstar barnstar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but it looks like we're just swallowing the unstripped aar during the build right now? The build pipeline is in corp. Perhaps, there's a way to add the symbols to the upload step via the Playstore API.

@kari-ts kari-ts merged commit 141b1cf into main Mar 7, 2025
4 checks passed
@kari-ts kari-ts deleted the kari/nativedebug branch March 7, 2025 17:42
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.

2 participants