Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
7e7e512
Ensure device tests run on net8.0 and net9.0
jamescrosswell Mar 13, 2025
d569cf0
Move existing reader to V1 directory
jamescrosswell Mar 13, 2025
f660e63
Bumped NSubstitute to versino 5.3.0
jamescrosswell Mar 17, 2025
0b36c8c
Update Sentry.Extensions.Logging.Tests.csproj
jamescrosswell Mar 17, 2025
b94434a
Merge branch 'main' into store-v2
jamescrosswell Mar 17, 2025
4e9183b
Update Sentry.Maui.Tests.csproj
jamescrosswell Mar 17, 2025
0c22666
Update device-tests-android.yml
jamescrosswell Mar 17, 2025
9420d86
Update CHANGELOG.md
jamescrosswell Mar 17, 2025
1291467
Minimal work required to add the store v2 files to the repo with attr…
jamescrosswell Mar 18, 2025
339f4ef
make members internal
jamescrosswell Mar 18, 2025
d18d462
Tests pass on net8.0 and net9.0
jamescrosswell Mar 19, 2025
1c6494e
Merge branch 'main' into store-v2
jamescrosswell Mar 19, 2025
75e15c7
Format code
getsentry-bot Mar 19, 2025
fc3e17a
Removed Xamarin.LibZipSharp dependency
jamescrosswell Mar 19, 2025
d618ac2
Removed dependency on System.IO.Hashing
jamescrosswell Mar 19, 2025
509482b
Format code
getsentry-bot Mar 19, 2025
956f1c6
Update AndroidAssemblyReaderTests.cs
jamescrosswell Mar 19, 2025
8b95555
Merge branch 'store-v2' of github.com:getsentry/sentry-dotnet into st…
jamescrosswell Mar 19, 2025
0a9580b
Revert "Merge branch 'store-v2' of github.com:getsentry/sentry-dotnet…
jamescrosswell Mar 19, 2025
bc58628
Removed junk comments added by dotnet format
jamescrosswell Mar 20, 2025
bbfa502
Format code
getsentry-bot Mar 20, 2025
6f7cbb7
Tweaked ZipFile calls
jamescrosswell Mar 21, 2025
440baf2
Added support for non AssemblyStore APKs
jamescrosswell Mar 21, 2025
de304b9
Format code
getsentry-bot Mar 21, 2025
8a1253d
Merge branch 'main' into store-v2
jamescrosswell Mar 21, 2025
3423f09
Format code
getsentry-bot Mar 21, 2025
45769f9
Removed unused code from ArchiveAssemblyHelper
jamescrosswell Mar 23, 2025
7652f11
Remove unused code from StoreReaderV2
jamescrosswell Mar 24, 2025
fd470f0
Update AndroidAssemblyReaderTests.cs
jamescrosswell Mar 24, 2025
d8ed437
Delete ELFPayloadError.cs
jamescrosswell Mar 24, 2025
e866cee
.
jamescrosswell Mar 25, 2025
d0b8688
Use System.Private.CoreLib.dll instead of System.Runtime.dll in Assem…
jamescrosswell Mar 26, 2025
c024e2e
Merge branch 'main' into store-v2
jamescrosswell Mar 26, 2025
8ede9cd
Test AssemblyReader with APKs published using AOT
jamescrosswell Mar 26, 2025
7ccfa1a
Merge branch 'store-v2' of github.com:getsentry/sentry-dotnet into st…
jamescrosswell Mar 26, 2025
81fac20
Shortened file names for test apks
jamescrosswell Mar 27, 2025
dfc59be
.
jamescrosswell Mar 27, 2025
4af3523
Added logging to the Ubuntu build (Temporary)
jamescrosswell Mar 27, 2025
75bb2ec
Removed dependency on ElfSharp NuGet
jamescrosswell Mar 28, 2025
b3c0948
Add structured build logs to build
jamescrosswell Mar 28, 2025
92a74d8
Format code
getsentry-bot Mar 28, 2025
f22991f
Set RID based on OS Architecture when publishing AndroidTestApp
jamescrosswell Mar 28, 2025
2583dea
Merge branch 'store-v2' of github.com:getsentry/sentry-dotnet into st…
jamescrosswell Mar 28, 2025
9f14f9b
Format code
getsentry-bot Mar 28, 2025
294872c
Update Sentry.Android.AssemblyReader.Tests.csproj
jamescrosswell Mar 28, 2025
d7936f2
Merge branch 'store-v2' of github.com:getsentry/sentry-dotnet into st…
jamescrosswell Mar 28, 2025
2a332b1
Update Sentry.Android.AssemblyReader.Tests.csproj
jamescrosswell Mar 28, 2025
74feb9c
.
jamescrosswell Mar 28, 2025
64fadc1
.
jamescrosswell Mar 28, 2025
7077f90
Merge branch 'main' into store-v2
jamescrosswell Mar 31, 2025
78817b7
Update AndroidAssemblyReaderTests.cs
jamescrosswell Apr 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
.
  • Loading branch information
jamescrosswell committed Mar 25, 2025
commit e866cee567d69069580327c41fc75367f965e8a9
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ internal static PEReader CreatePEReader(string assemblyName, MemoryStream inputS

/// <summary>
/// The DLL may be LZ4 compressed, see https://github.com/xamarin/xamarin-android/pull/4686
/// In particular: https://github.com/dotnet/android/blob/44c5c30d3da692c54ca27d4a41571ef20b73670f/src/Xamarin.Android.Build.Tasks/Utilities/AssemblyCompression.cs#L96-L104
/// The format is:
/// [ 4 byte magic header ] (XALZ)
/// [ 4 byte header index ]
/// [ 4 byte descriptor header index ]
/// [ 4 byte uncompressed payload length ]
/// [rest: lz4 compressed payload]
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using Sentry.Android.AssemblyReader.V2;

namespace Sentry.Android.AssemblyReader.V1;

// The "Old" app type - where each DLL is placed in the 'assemblies' directory as an individual file.
Expand Down
25 changes: 8 additions & 17 deletions src/Sentry.Android.AssemblyReader/V2/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,27 +152,18 @@ private static FileFormat DetectAndroidArchive(FileInfo info, FileFormat default
}

return defaultFormat;
}

private static bool HasAllEntries(ZipArchive zip, string[] entries)
{
foreach (var entry in entries)
static bool HasAllEntries(ZipArchive zip, string[] entries)
{
if (zip.GetEntry(entry) is null)
foreach (var entry in entries)
{
return false;
if (zip.GetEntry(entry) is null)
{
return false;
}
}
}

return true;
}

internal static MemoryStream Extract(this ZipArchiveEntry zipEntry)
{
var memStream = new MemoryStream((int)zipEntry.Length);
using var zipStream = zipEntry.Open();
zipStream.CopyTo(memStream);
memStream.Position = 0;
return memStream;
return true;
}
}
}
13 changes: 13 additions & 0 deletions src/Sentry.Android.AssemblyReader/ZipUtils.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace Sentry.Android.AssemblyReader;

internal static class ZipUtils
{
internal static MemoryStream Extract(this ZipArchiveEntry zipEntry)
{
var memStream = new MemoryStream((int)zipEntry.Length);
using var zipStream = zipEntry.Open();
zipStream.CopyTo(memStream);
memStream.Position = 0;
return memStream;
}
}