Skip to content
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

Fix Android support for Portable PDB format when app uses split APKs #2108

Merged
merged 2 commits into from
Jan 9, 2023

Conversation

mattjohnsonpint
Copy link
Contributor

When an Android app is built in release configuration, it may be configured to be deployed to the device using multiple "split" APKs. For example, building Sentry.Samples.Android in release mode, after deploying to a device and browsing the device file system, looks like this:

image

Previously, we were getting the APK at runtime using Environment.CommandLine - but in the case of multiple APKs, that will resolve to one of the splits, not to the base APK where the assemblies are located. Thus, we weren't getting the debug info sent to Sentry in the stack trace.

Resolved by getting the base APK path from the Android application context info.

I don't think assemblies will ever be in one of the splits, but I left a comment about it in the code just in case that comes up in the future.

Copy link
Collaborator

@vaind vaind left a comment

Choose a reason for hiding this comment

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

LGTM

@mattjohnsonpint mattjohnsonpint merged commit 85104ca into main Jan 9, 2023
@mattjohnsonpint mattjohnsonpint deleted the fix-android-assembly-resolver branch January 9, 2023 16:29
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