Skip to content

fix(editor): replace unaligned native photo filters library#1037

Open
sjug wants to merge 2 commits intoFossifyOrg:mainfrom
sjug:fix/16kb-photofilters
Open

fix(editor): replace unaligned native photo filters library#1037
sjug wants to merge 2 commits intoFossifyOrg:mainfrom
sjug:fix/16kb-photofilters

Conversation

@sjug
Copy link
Copy Markdown

@sjug sjug commented Apr 29, 2026

Type of change(s)

  • Bug fix
  • Feature / enhancement
  • Infrastructure / tooling (CI, build, deps, tests)
  • Documentation

What changed and why

  • Removed the androidphotofilters dependency, which ships a prebuilt arm64-v8a/libNativeImageProcessor.so with 4 KB ELF segment alignment.
  • Removed the explicit System.loadLibrary("NativeImageProcessor") call from the editor.
  • Added a small Kotlin compatibility shim for the AndroidPhotoFilters API used by Gallery, including pure-Kotlin pixel operations.
  • Removed stale Aligned16KB lint baseline entries for the deleted native library.

Android 15+ / target SDK 35+ apps need native libraries to support 16 KB page-size devices. Since the upstream AndroidPhotoFilters native library is unmaintained and fails that check, this removes the native dependency from Gallery's APK entirely.

Tests performed

  • Clean clone of this branch on the Android build host.
  • ./gradlew :app:assembleFossDebug
  • Verified the APK no longer contains libNativeImageProcessor.so.
  • Verified all remaining arm64-v8a and x86_64 native libraries have 0x4000 ELF LOAD alignment with readelf -lW.
  • Verified APK zip alignment with zipalign -c -P 16 -v 4.
  • Installed the debug APK on an Android 16 Pixel device and confirmed the app launches without the 16 KB ELF compatibility warning.

Before & after preview

N/A — no UI changes.

Closes the following issue(s)

N/A — Android 16 KB page-size compatibility fix.

Checklist

  • I read the contribution guidelines.
  • I manually tested my changes on device/emulator (if applicable).
  • I updated the "Unreleased" section in CHANGELOG.md (if applicable).
  • I have self-reviewed my pull request (no typos, formatting errors, etc.).
  • I understand every change in this pull request.

@sjug sjug requested a review from naveensingh as a code owner April 29, 2026 19:26
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.

1 participant