Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
19 changes: 19 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ jobs:
- name: Verify native libraries in APK
run: |
APK="${{ steps.find_apk.outputs.apk_path }}"
SUBMOD="submodules/osu-framework/osu.Framework.Android/arm64-v8a"

Copilot AI Apr 19, 2026

Copy link

Choose a reason for hiding this comment

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

SUBMOD is defined but never used in this step. Please remove it, or use it (e.g., to compare the extracted libbass.so against the submodule copy) to avoid dead code and confusion when maintaining the workflow.

Suggested change
SUBMOD="submodules/osu-framework/osu.Framework.Android/arm64-v8a"

Copilot uses AI. Check for mistakes.
echo "Checking APK for required native libraries..."

NATIVE_LIBS=$(unzip -l "$APK" | grep "lib/arm64-v8a/.*\.so" || true)
Expand All @@ -243,6 +244,24 @@ jobs:
echo ""
echo "All required native libraries present ✓"

# Verify the BASS libraries are the Android-built versions, not the Linux desktop
# ones from the NativeLibs NuGet package. The Android libbass.so links against
# libOpenSLES.so (Android audio API); the Linux one links against libc.so.6.
echo ""
echo "Verifying native library ABI compatibility..."
TMPDIR=$(mktemp -d)
unzip -q -o "$APK" "lib/arm64-v8a/libbass.so" -d "$TMPDIR"
if readelf -d "$TMPDIR/lib/arm64-v8a/libbass.so" | grep -q "libOpenSLES.so"; then
echo "✅ libbass.so is the correct Android build (links libOpenSLES.so)"
else
echo "::error::libbass.so in APK is NOT the Android build — it appears to be the Linux desktop version from ppy.osu.Framework.NativeLibs NuGet. The app will crash with DllNotFoundException."
echo "::error::Ensure ppy.osu.Framework.NativeLibs has ExcludeAssets=native in osu.Android.props."
readelf -d "$TMPDIR/lib/arm64-v8a/libbass.so" | grep NEEDED || true
rm -rf "$TMPDIR"
exit 1
fi
rm -rf "$TMPDIR"

- name: Upload APK artifact
uses: actions/upload-artifact@v7
with:
Expand Down
12 changes: 12 additions & 0 deletions osu.Android.props
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,18 @@
<ItemGroup>
<!-- Use winnerspiros/osu-framework fork (net10.0-android, optimized) via submodule instead of ppy NuGet package -->
<ProjectReference Include="$(MSBuildThisFileDirectory)submodules/osu-framework/osu.Framework.Android/osu.Framework.Android.csproj" />

<!-- Suppress native assets from the desktop NativeLibs NuGet package.
ppy.osu.Framework.NativeLibs (transitive via osu.Framework.csproj) ships
runtimes/linux-arm64/native/libbass.so and friends built for GNU/Linux (they link
libc.so.6, libpthread.so.0, etc.). The .NET RID fallback chain for android-arm64
(android-arm64 → android → unix → any) causes the Linux ARM64 .so files to leak
into the APK even though the NuGet has an android/native/_._ placeholder.
The result: the APK ends up with a Linux libbass.so that cannot load on Android
(DllNotFoundException at startup).
ExcludeAssets="native" prevents NuGet from contributing any .so files;
the correct Android-built libraries are supplied by AndroidNativeLibrary below. -->
<PackageReference Include="ppy.osu.Framework.NativeLibs" Version="2025.806.0-nativelibs" ExcludeAssets="native" PrivateAssets="all" />
</ItemGroup>

<!-- Include framework native libraries (BASS audio, FFmpeg, etc.) from the submodule.
Expand Down
Loading