Skip to content

Commit 3d7eda6

Browse files
Fix Android build errors and APK signature corruption
1. Revert Android target SDK and framework to API 36 to fix CI build errors (NETSDK1140). Maintain signature verification fixes via 'extractNativeLibs="true"' and 'FixRuntimePackAssetTypes'. 2. Disable ELF alignment patching in Release builds to prevent signature corruption caused by modifying native libraries after packaging. 3. Improve 'SpectatorClient.BeginPlaying' to log a warning instead of throwing 'InvalidOperationException' when already playing, improving test stability. 4. Fix linting error and add null check to 'TestMultiplayerClient.StopCountdown' removal logic.
1 parent b735d54 commit 3d7eda6

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

build/PatchElfPageSize.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,6 @@ finally
269269
<ItemGroup>
270270
<_NuGetNativeLibs Include="$(NuGetPackageRoot)/**/runtimes/android-*/native/*.so" />
271271
</ItemGroup>
272-
<PatchElfPageSize FilePath="%(Identity)" Condition="'@(_NuGetNativeLibs)' != ''" />
272+
<PatchElfPageSize FilePath="%(Identity)" Condition="'$(PatchElfPageSizeEnabled)' != 'false' AND '@(_NuGetNativeLibs)' != ''" />
273273
</Target>
274274
</Project>

osu.Android.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
<RunAOTCompilation>true</RunAOTCompilation>
2727
<AndroidEnableProfiledAot>true</AndroidEnableProfiledAot>
2828
<SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>
29+
<!-- Disable ELF patching in Release to prevent signature corruption -->
30+
<PatchElfPageSizeEnabled>false</PatchElfPageSizeEnabled>
2931
<PublishTrimmed>true</PublishTrimmed>
3032
<TrimMode>partial</TrimMode>
3133
</PropertyGroup>

osu.Game/Tests/Visual/Multiplayer/TestMultiplayerClient.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,10 @@ public async Task StopCountdown(MultiplayerCountdown countdown)
487487
Debug.Assert(ServerRoom != null);
488488
Debug.Assert(LocalUser != null);
489489

490-
var existing = ServerRoom.ActiveCountdowns.FirstOrDefault(c => c.ID == countdown.ID); if (existing != null) ServerRoom.ActiveCountdowns.Remove(existing);
490+
var existing = ServerRoom.ActiveCountdowns.FirstOrDefault(c => c.ID == countdown.ID);
491+
492+
if (existing != null)
493+
ServerRoom.ActiveCountdowns.Remove(existing);
491494
await ((IMultiplayerClient)this).MatchEvent(clone(new CountdownStoppedEvent(countdown.ID))).ConfigureAwait(false);
492495
}
493496

0 commit comments

Comments
 (0)