Skip to content

Commit ea54781

Browse files
fix: No symbols in release mode on android workloads 10.0.102 and later (#4998)
* fix: Android apps not symbolicating in release mode * Changelog
1 parent 4c569e3 commit ea54781

File tree

3 files changed

+22
-4
lines changed

3 files changed

+22
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Fixes
66

77
- The SDK now logs a `Warning` instead of an `Error` when being ratelimited ([#4927](https://github.com/getsentry/sentry-dotnet/pull/4927))
8+
- Symbolication now works correctly with Android workloads 10.0.102 and later ([#4998](https://github.com/getsentry/sentry-dotnet/pull/4998))
89
- `libmonosgen` and `libxamarin` frames no longer show as in-app ([#4960](https://github.com/getsentry/sentry-dotnet/pull/4960))
910

1011
## 6.2.0-alpha.0

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"sdk": {
33
"version": "10.0.102",
4-
"workloadVersion": "10.0.101.1",
4+
"workloadVersion": "10.0.102",
55
"rollForward": "disable",
66
"allowPrerelease": false
77
}

src/Sentry.Android.AssemblyReader/V2/StoreReader.cs

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ static StoreReader()
4242
GetArchPath (AndroidTargetArch.Arm),
4343
GetArchPath (AndroidTargetArch.X86_64),
4444
GetArchPath (AndroidTargetArch.X86),
45+
GetArchPath (AndroidTargetArch.Arm64, newBlobName: true),
46+
GetArchPath (AndroidTargetArch.Arm, newBlobName: true),
47+
GetArchPath (AndroidTargetArch.X86_64, newBlobName: true),
48+
GetArchPath (AndroidTargetArch.X86, newBlobName: true),
4549
};
4650
ApkPaths = paths.AsReadOnly();
4751
AabBasePaths = ApkPaths;
@@ -52,10 +56,14 @@ static StoreReader()
5256
GetArchPath (AndroidTargetArch.Arm, AabBaseDir),
5357
GetArchPath (AndroidTargetArch.X86_64, AabBaseDir),
5458
GetArchPath (AndroidTargetArch.X86, AabBaseDir),
59+
GetArchPath (AndroidTargetArch.Arm64, AabBaseDir, true),
60+
GetArchPath (AndroidTargetArch.Arm, AabBaseDir, true),
61+
GetArchPath (AndroidTargetArch.X86_64, AabBaseDir, true),
62+
GetArchPath (AndroidTargetArch.X86, AabBaseDir, true),
5563
};
5664
AabPaths = paths.AsReadOnly();
5765

58-
string GetArchPath(AndroidTargetArch arch, string? root = null)
66+
string GetArchPath(AndroidTargetArch arch, string? root = null, bool newBlobName = false)
5967
{
6068
const string LibDirName = "lib";
6169

@@ -70,7 +78,7 @@ string GetArchPath(AndroidTargetArch arch, string? root = null)
7078
root = LibDirName;
7179
}
7280
parts.Add(abi);
73-
parts.Add(GetBlobName(abi));
81+
parts.Add(newBlobName ? NewBlobName : GetOldBlobName(abi));
7482

7583
return MonoAndroidHelper.MakeZipArchivePath(root, parts);
7684
}
@@ -87,7 +95,16 @@ public StoreReader(Stream store, string path, DebugLogger? logger)
8795
};
8896
}
8997

90-
private static string GetBlobName(string abi) => $"libassemblies.{abi}.blob.so";
98+
/// <summary>
99+
/// This method returns the expected blob name for a given ABI for dotnet/android workload versions 10.0.101.1 and earlier
100+
/// </summary>
101+
private static string GetOldBlobName(string abi) => $"libassemblies.{abi}.blob.so";
102+
103+
/// <summary>
104+
/// More recent versions of the dotnet/android workload (starting with 10.0.102) switched to a single blob name for
105+
/// all ABIs. See: https://github.com/dotnet/android/pull/10638
106+
/// </summary>
107+
private const string NewBlobName = "libassembly-store.so";
91108

92109
protected override ulong GetStoreStartDataOffset() => elfOffset;
93110

0 commit comments

Comments
 (0)