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

Apk size increased? #2153

Closed
MrSimsure opened this issue Jul 1, 2021 · 8 comments
Closed

Apk size increased? #2153

MrSimsure opened this issue Jul 1, 2021 · 8 comments

Comments

@MrSimsure
Copy link

Hello, i sticked with the play store version of termux until last week, mainly because i didn't know about the movement to f-droid.
I tried installing the latest f-droid version but suddenly noticed that the clean installation of termux now weight 182MB, i remembered the play store version to be a lot smaller when i initially installed it, so i got i back to check, and in fact the latest play store version was just 82MB on a fresh install.
Is this normal? Are the play store apk threaded in some ways that make the final installation lighter?
Initially i tought that could be for the different arch versions inside the apk, checking the f-droid downloaded apk the lib folder contains all the different arch versions of the main libraries, this used to be different when the app was on play store?
There is something that can be done or all this additional 100MB actually added content that cannot be reduced?
Thanks

@ghost
Copy link

ghost commented Jul 1, 2021

Play Store APK is smaller because it contains the bootstrap archive only for one architecture. Each bootstrap is about 20 MB.

F-Droid contains bootstrap archives for all architectures, since it doesn't support splitting APKs. Technically, there is a hack to be able submit a per-architecture build variant, but it all about messing up with version numbers (each release will mean 4 different versions, e.g. v0.116 = v0.116 + v0.117 + v0.118 + v0.119).

Also don't forget that nowadays Termux removed BusyBox and uses full-blown utilities which result increased initial installation size.

@agnostic-apollo
Copy link
Member

Termux APKs require a bootstrap zip containing binaries required for minimal shell environment.

F-Droid does not support split APKs so APKs published there contain zips for all 4 architecture so size is roughly ~80MB on F-Droid . Termux App source code itself is pretty small. Play store supported split APKs so APK size was ~20MB.

Then the bootstrap.zip is first extracted unzipped by android to app native directory under /data/app/com.termux-<suffix>/lib only for your phone's architecture. So that increases size to 100MB (80+20) for F-Droid. You can find real path with adb shell pm path com.termux.

Then the extracted bootstrap.zip in app native directory is unzipped and installed at /data/data/com.termux/file/usr when you first open termux. That size likely differs depending on filesystem block size, etc and may be roughly ~70MB. Lot of other stuff have also been added since last playstore release.

So 80+20+70=170MB for F-Droid and 20+20+70=110MB for play store.

@agnostic-apollo
Copy link
Member

agnostic-apollo commented Jul 1, 2021

(each release will mean 4 different versions, e.g. v0.116 = v0.116 + v0.117 + v0.118 + v0.119).

That's just insane for users and devs.

User: App won't install from F-Droid.
Devs: Uninstall from playstore...
User: Still won't install
Devs: Yes, because installing wrong version not meant for your architecture. Which model and architecture is your phone? Have you installed a custom ROM?
User: <this> architecture.
Dev: Now go on F-Droid and install <this> version.

Then we later find out some plugin app from playstore was still installed... Best wait until F-Droid officially supports its somehow if possible. Haven't checked up on it.

@MrSimsure
Copy link
Author

Having a phone with very low storage every MB i can save is gold, but if nothing can be done to decrease the fresh installation size, i will probably stick with the play store version untili get a new phone.

agnostic-apollo added a commit that referenced this issue Jul 2, 2021
APKs for each architecture and a universal APK that is compatible for all architectures will now be available from Github Actions page from the workflow runs labeled `Build`. The APKs will be available as zips under the Artifact section named `termux-app-*`.

Architecture specific APKs can be used by users with low disk space since F-Droid releases are universal (since it doesn't support split APKs #1904) and their install+bootstrap installation size is ~180MB instead of ~120MB if an architecture specific APK is used.

This should also reduce bandwidth usage and download time for debug builds users if they download an architecture specific zip instead of the universal one.

Related #2153
@agnostic-apollo
Copy link
Member

agnostic-apollo commented Jul 2, 2021

As per dccd155, b90d594, you can now download architecture specific debug build APKs. Check https://github.com/termux/termux-app#installation for what they are. They are not compatible with F-Droid termux app or plugin releases, install plugins from respective Github Actions github page of each plugin. The termux-app debub build link is added in each release https://github.com/termux/termux-app/releases. Currently latest one is at https://github.com/termux/termux-app/actions/runs/992077590

@agnostic-apollo
Copy link
Member

Checking README should be the first place to look.

https://github.com/termux/termux-app#github

AdamMickiewich pushed a commit to VolyaTeam/dzida-app that referenced this issue Aug 8, 2022
APKs for each architecture and a universal APK that is compatible for all architectures will now be available from Github Actions page from the workflow runs labeled `Build`. The APKs will be available as zips under the Artifact section named `termux-app-*`.

Architecture specific APKs can be used by users with low disk space since F-Droid releases are universal (since it doesn't support split APKs termux#1904) and their install+bootstrap installation size is ~180MB instead of ~120MB if an architecture specific APK is used.

This should also reduce bandwidth usage and download time for debug builds users if they download an architecture specific zip instead of the universal one.

Related termux#2153
@termux termux deleted a comment from X-CODER-iR Sep 8, 2022
shrihankp pushed a commit to reisxd/termux-app that referenced this issue Oct 20, 2022
APKs for each architecture and a universal APK that is compatible for all architectures will now be available from Github Actions page from the workflow runs labeled `Build`. The APKs will be available as zips under the Artifact section named `termux-app-*`.

Architecture specific APKs can be used by users with low disk space since F-Droid releases are universal (since it doesn't support split APKs termux#1904) and their install+bootstrap installation size is ~180MB instead of ~120MB if an architecture specific APK is used.

This should also reduce bandwidth usage and download time for debug builds users if they download an architecture specific zip instead of the universal one.

Related termux#2153
@termux termux deleted a comment from XOXO045 Jan 26, 2023
@k53a48
Copy link

k53a48 commented May 19, 2023

I'm getting 268Mb size,🤖❤️‍🔥🦾

@tofa2050
Copy link

tofa2050 commented Jan 6, 2024

Hello, i sticked with the play store version of termux until last week, mainly because i didn't know about the movement to f-droid. I tried installing the latest f-droid version but suddenly noticed that the clean installation of termux now weight 182MB, i remembered the play store version to be a lot smaller when i initially installed it, so i got i back to check, and in fact the latest play store version was just 82MB on a fresh install. Is this normal? Are the play store apk threaded in some ways that make the final installation lighter? Initially i tought that could be for the different arch versions inside the apk, checking the f-droid downloaded apk the lib folder contains all the different arch versions of the main libraries, this used to be different when the app was on play store? There is something that can be done or all this additional 100MB actually added content that cannot be reduced? Thanks

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

No branches or pull requests

4 participants