Skip to content

APK size #523

Closed
Closed

Description

@IzzySoft

The APK size meanwhile exceeds 80 MB – while the per-app size limit at IzzyOnDroid is 30 MB. Checking how the size could be brought down, I see that the native libs alone make up for 77 MB – and they are stored uncompressed.

Would enabling legacy compression be an option for you? That would about half their size (at the price that they'd need to be unpacked at install), bringing the APK size down to (hopefully) below 50 MB at least. If you see other options, they're of course welcome as well (e.g. I don't know what it is for, but libembedded_milli.so is by far the biggest egg in the nest, with almost 50 MB size).

Thanks in advance!

Activity

  1. self-assigned this
    on Jan 2, 2026
  2. maelchiotti commented on Jan 2, 2026

    @maelchiotti
    Owner

    Hi! Yes, the APK size is definitely an issue.

    It's because of what you outlined: what Flutter calls "native assets". When packages are written with native code, a whole bunch of unneeded code is bundled with them, which is why milli and isar are so big (they both use some rust code or something rather that pure dart code).

    Since this is my first app, I realized to late that it would be an issue. Had I known earlier, I maybe would have chosen pure dart libraries instead. But now it's too late...

    Anyway, Flutter is working on improving native assets and resolving that issue. Mimir (the package that produces libembedded_milli.so) did switch to the new implementation, so now I should be able to solve that one.

    I don't expect isar to make the switch however, the main developer is gone and it is only community maintained. But getting rid of the huge libembedded_milli.so will still be a great improvement!

    I'll work on that this month and update you on the APK size I get.

  3. moved this to Next release in LocalMaterialNoteson Jan 2, 2026
  4. IzzySoft commented on Jan 2, 2026

    @IzzySoft
    Author

    Thanks! Maybe you know them already, but let me leave the links here nevertheless, in the hope they're helpful:

    On our website you can find more Useful Links 😉

  5. IzzySoft commented on Mar 23, 2026

    @IzzySoft
    Author

    @maelchiotti is there any news meanwhile? Until a "final solution" can be achieved, maybe at least turn on legacyCompression (which would bring the APK size down by 30 MB or more)? Bundling less fonts would also help saving several MB (Noto & Montserrat are quite big).

  6. maelchiotti commented on Mar 24, 2026

    @maelchiotti
    Owner

    Hi @IzzySoft,

    I apologize for not keeping you up to date on this issue. I haven't worked on the app for a while, as I'm working on other projects. I do want to fix some little things still, but I don't think this will be one of them.

    As I don't want to keep abusing the rules, I think it would be fair to remove the app from IzzyOnDroid. It shouldn't be a problem for users, as it's also available on FDroid, and only a few minor versions will be coming anyway.

  7. IzzySoft commented on Mar 24, 2026

    @IzzySoft
    Author

    So not even enabling legacyCompression would be an option for you? That should be a very easy step. Would be sad having to remove a fine, reproducible app 😉

  8. maelchiotti commented on Mar 24, 2026

    @maelchiotti
    Owner

    Well if it's easy indeed, sure, you're right. Will try ASAP!

  9. IzzySoft commented on Apr 6, 2026

    @IzzySoft
    Author

    Any progress yet? Just asking for orientation 🙈 And yes, I know what the "P" in "ASAP" stands for 🤪

  10. maelchiotti commented on Apr 6, 2026

    @maelchiotti
    Owner

    Yeah, no worries, you're right I need to get to it. I'm adding that to my agenda for Friday, and I will update you!

  11. maelchiotti commented on Apr 7, 2026

    @maelchiotti
    Owner

    Hi @IzzySoft, worked on it sooner that expected! Enabling legacy compression does improve things a lot. I also removed some fonts variants that were not used for a 2-3 Mo gain. From 177 Mo, we are down to 135 Mo (ARM64 target).

    Mimir still is the biggest issue. The new version that should solve it required Flutter beta at the time so I couldn't go that way, but I will take a look at that again.

    I will publish a new later, but keep the issue open so I take a look at Mimir.

  12. maelchiotti commented on Apr 7, 2026

    @maelchiotti
    Owner

    Awesome news: I gave the mimir update a quick try, and it worked without any issues! Down to 98 Mo! Not quite the 80 I hope I could reach, but still way better than the previous 177...

    Will push the new version with all those improvements later!

  13. moved this from Next release to In progress in LocalMaterialNoteson Apr 7, 2026
  14. 18 remaining items

  15. IzzySoft commented on Apr 10, 2026

    @IzzySoft
    Author

    Well, looks like Rust is still needed. No clue how you were able to build without:

    + bash ./scripts/isar/fdroid_build_isar.sh arm64
    Building libisar for arm64
    Using NDK at: /opt/sdk/ndk/27.0.12077973
    Compiler dir: /opt/sdk/ndk/27.0.12077973/toolchains/llvm/prebuilt/linux-x86_64/bin
    Building for arm64 architecture
    tool/build_android.sh: line 84: rustc: command not found
    tool/build_android.sh: line 85: cargo: command not found
    tool/build_android.sh: line 86: rustup: command not found
    tool/build_android.sh: line 87: rustup: command not found
    mv: cannot stat '../../target/aarch64-linux-android/release/libisar.so': No such file or directory
    mv: cannot stat 'libisar_android_arm64.so': No such file or directory
    mv: cannot stat 'libisar.so': No such file or directory
    

    Here's the tool/build_android.sh, starting with RUST_TOOLCHAIN="1.88.0-x86_64-unknown-linux-gnu" 🤷‍♂️ So I'm afraid, without knowing the Rust version (which until the previous release was in rust-toolchain.toml), we cannot build. No idea how you did.

  16. maelchiotti commented on Apr 10, 2026

    @maelchiotti
    Owner

    Mmh I guess the GitHub action has a pre-installed rust version maybe, so it was able to use that one?

    I'll add back the Rust version, and make a new release using it.

  17. TotallyAvailable commented on Apr 10, 2026

    @TotallyAvailable

    (For potential future references)

    https://github.com/actions/runner-images/releases/tag/ubuntu22/20260329.74

    (1.94.1)

    One among many potential interesting cases of the results should be identical .... Yes I'll shut up. Still was subscribed to this issue...

  18. IzzySoft commented on Apr 10, 2026

    @IzzySoft
    Author

    I guess the GitHub action has a pre-installed rust version

    That's my guess, too, yeah (1.94.1 currently, thanks to @TotallyAvailable giving the link – unexpectedly on-topic 😜). Especially as Isar has no corresponding step in their action either.

    What the linked page also reminds us of: those versions can change quickly. The link @TotallyAvailable gave us, is already superseded 🙈 (though that does not affect our current case) => full list here.

  19. maelchiotti commented on Apr 10, 2026

    @maelchiotti
    Owner

    Ok, I'm away this weekend but should be able to work on that Monday, I'll update you.

  20. moved this from Done to In progress in LocalMaterialNoteson Apr 10, 2026
  21. IzzySoft commented on Apr 13, 2026

    @IzzySoft
    Author

    Did you have a chance to check? We cannot hold back the results ("RB failed" as of now) much longer. Maybe we commit them now, and hope to tackle this issue with the next release then, @maelchiotti?

  22. maelchiotti commented on Apr 13, 2026

    @maelchiotti
    Owner

    Sorry, didn't take the time in the end.

    But if you mean "skip this release", then yes that's ok, the app itself didn't change anyway.

  23. IzzySoft commented on Apr 13, 2026

    @IzzySoft
    Author

    As it otherwise pops in daily with its error: yes, that's basically what I meant. OK, will mark it accordingly then – and keep my fingers crossed the next release will have it fixed again! 🤞

    (note to self: need more fingers… 🙈 )

  24. linked a pull request that will close this issue[523] Add back rust version #543on May 29, 2026
  25. maelchiotti commented on May 29, 2026

    @maelchiotti
    Owner

    @IzzySoft I'm planning a new version, that will include the Rust version. I'll let you know when it goes live, hopefully it will build this time!

  26. IzzySoft commented on Jun 1, 2026

    @IzzySoft
    Author

    Which means I'll keep an eye on the other issue as well, as we'd face the identical problem (versions need to be pinned, and all that). I've subscribed to it already. 🤞

  27. linked a pull request that will close this issuev2.2.0 #555on Jun 21, 2026
  28. moved this from In progress to Done in LocalMaterialNoteson Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions