Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Flutter project] APK file increased by 40% with FreeRASP package #100

Closed
speszke opened this issue Dec 31, 2023 · 6 comments · Fixed by #110
Closed

[Flutter project] APK file increased by 40% with FreeRASP package #100

speszke opened this issue Dec 31, 2023 · 6 comments · Fixed by #110
Labels
documentation Improvements or additions to documentation to be fixed This issue will be fixed in next release waiting for response Response from reporter is needed

Comments

@speszke
Copy link

speszke commented Dec 31, 2023

Hi,
I've integrated FreeRASP package into the flutter's project and size of APK file (release build) increased from 70MB to 100MB.
Is this the "price" I have to pay to use the package, or is there a way to not increase the build file's size significantly?

@tompsota
Copy link
Contributor

tompsota commented Jan 2, 2024

Hi @speszke,

Did you increase the minSdkVersion when you installed freeRASP, or had you this dependency already satisfied? We noticed that bump from minSdkVersion API <23 to API >=23 can lead to notable increases in APK size. However, this increase is not directly caused by freeRASP: since API 23, the native libraries that come with your project are stored uncompressed in the APK (in comparison, in earlier versions, they were compressed). Although your APK might be larger, your application should load faster because the libraries are directly loaded from the APK at runtime. You can read more about it here.

In our experience, integrating freeRASP typically results in a more modest increase of around 10 MB in the APK size, as in the example app in the freeRASP project.

In your case, one potential solution to consider is to use Android App Bundle, which should result in reducing of the final app size during distribution.

Best,
Tomas, Talsec developer

@msikyna msikyna added the waiting for response Response from reporter is needed label Jan 2, 2024
@speszke
Copy link
Author

speszke commented Jan 2, 2024

Hi @tompsota ,
Thanks for quick reply. In my case the only change increasing apk size was adding FreeRASP package - nothing else changed. I have minSdkVersion 23 already set up, so it couldn't impact the size.

@tompsota
Copy link
Contributor

tompsota commented Jan 4, 2024

Hi @speszke,

Can you provide more information about the setup of your project? E.g. which version of Flutter and Freerasp are you using?
I just tested an example app with Flutter: 3.13.9 and freerasp: 6.3.0; the increase was ~ 8 MB.

Cheers,
Tomas, Talsec developer

@MajdSallora
Copy link

try add this in manifest in application tag
android:extractNativeLibs="true"

If set to "false", your native libraries are stored uncompressed in the APK. Although your APK might be larger, your application loads faster because the libraries load directly from the APK at runtime.

@Madanraj1
Copy link

@MajdSallora thanks this worked

@msikyna msikyna added the documentation Improvements or additions to documentation label Feb 23, 2024
@yardexx
Copy link
Member

yardexx commented Feb 28, 2024

Hello.

I've updated Troubleshooting section in README.md. This change will be reflected in README.md at pub.dev on next update.

Issue will be closed on next freerasp release.

@yardexx yardexx added the to be fixed This issue will be fixed in next release label Mar 25, 2024
@yardexx yardexx mentioned this issue Mar 25, 2024
15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation to be fixed This issue will be fixed in next release waiting for response Response from reporter is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants