Android APK ships libwebcrypto.so (from the Linux UnifiedPush path), not 16 KB aligned

Open
#336 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
49/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
android, dart, flutter
Domain
mobile

Research direction

Start by checking the Android packaging configuration and the dependency chain in pubspec.lock for unifiedpush, webpush_encryption, and webcrypto. Inspect the APK's native libraries with llvm-objdump to confirm the 16 KB alignment and identify whether libwebcrypto.so is needed on Android. Done when a safe dependency update or packaging change removes the misaligned library or makes it 16 KB aligned, with the APK size and runtime behavior checked.

Written by the indexing model from the issue text.

Description

While checking the 1.1.1 release (FOSSWarn-1.1.1-arm64-v8a-release.apk), I noticed lib/arm64-v8a/libwebcrypto.so is the only native library that isn't 16 KB aligned:

$ llvm-objdump -p lib/arm64-v8a/libwebcrypto.so | grep LOAD
    LOAD ... align 2**12      # 4 KB; libflutter.so and libapp.so are 2**16

Where it comes from (from pubspec.lock and pub.dev):

unifiedpush 6.2.0 → unifiedpush_linux 1.0.0 → webpush_encryption 1.0.0 → webcrypto ^0.5.7 (locked at 0.5.8)

So it reaches the Android build through the Linux plugin. Nothing in lib/ uses webcrypto directly, so on Android it's probably bundled but never loaded. It does take about 9 MB uncompressed in the arm64 APK.

Two possible fixes:

  1. Update the transitive dependencies. webpush_encryption 1.0.1 (Dec 2025) allows webcrypto ^0.6.0, so flutter pub upgrade webpush_encryption webcrypto should pick up webcrypto 0.6.x. One caveat: 0.6.x builds its native code via Dart build hooks (native_toolchain_cmake) instead of the old Gradle/CMake plugin, so it's worth checking the resulting .so with llvm-objdump -p (upstream discussion: google/webcrypto.dart#239).
  2. If webcrypto really isn't used on Android, exclude it from the Android packaging (for example packaging { jniLibs { excludes += "**/libwebcrypto.so" } }), which also makes the APK smaller. Only if that's safe for how UnifiedPush decrypts messages on Android, which you'll know better than me.

Not urgent, since FOSS Warn is distributed outside Google Play and an unloaded library can't fail. But 16 KB-page devices are becoming common, and the size saving seemed worth mentioning.

(Found with readytoship, an open-source checker for app-store rules: https://github.com/msr2604/readytoship)

Dominant language
Dart
Stars
259
Forks
13
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nucleus-ffm/foss_warn

All issues in nucleus-ffm/foss_warn

Similar issues

More Dart issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.