-
-
Notifications
You must be signed in to change notification settings - Fork 29
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 #61
Comments
@ErikBjare Sounds like you maybe did a debug build by mistake for the APK? |
Pretty sure it's a release build, but the debug symbols might not have been stripped. |
Wow, then that lib has quite some of those. Never thought debug symbols would count for a factor 18 size increase… Thanks for digging it up! Looking forward to an APK replacement then. BTW: It seems to be just that one library being the cause of the size increase (or at least for 98% of it), in case it matters. |
Any news on this? |
It's more than 2 years now, so I wonder if it's still worth waiting, @ErikBjare? The version in my repo is even 3 years old now… |
Just released v0.12.0, but APK size is still huge. We now bundle the web UI directly in the The larger issue is probably still the matter of debug symbols not being stripped, I will continue to investigate. |
It's still way to big (almost 4 times the allowed per-app size in my repo, which would be 30 MB). Doesn't look like you could get the APK size even close to that. So instead of serving a totally outdated version via my repo, I'd suggest removing the app there. What do you think, @ErikBjare? |
Maybe stupid question, but why can't we just run the "strip" program on libaw_server.so? |
@johan-bjareholt I ran |
We're now building App Bundles (.aab) and including them in releases, from which you should be able to split out a If those sizes are still crazy, let me know! |
Thanks @ErikBjare! For inclusion with my repo I'd need APK files, though (my updater cannot deal with AABs). So could you also attach the APK you want me to pick (either armeabi-v7a or arm64-v8a as by your preference) directly? (TBH, I don't even know how to "split out a |
|
I've checked So if you could provide the per-ABI APK(s), that would speed up things a lot. As your app is already in my repo (last updated there 3 years ago), even doing that "every now and then" (for the "stable" releases, no need to do it for the pre-releases unless you can automate it) would help. You probably have the full Android SDK installed, I have not. I do what I can, but there are limits: my repo is a one-man-show, and I have plenty of other "volunteer work" at my hands… Taking a quick look: I've unzipped your 107 MB APK, removed all
Strange. With native libs for each ABI around 27 MB, I wouldn't have expected that much difference. Must be something else… Ah, some files must just be "stored" (uncompressed) as unzip and zip the full APK comes down to just 37 MB. Checking again and meeting my suspicion: the native libs are just "stored", too, so it's their 4x27 MB making it that size (yes, I think I know why they are "just stored": so Android does not need to unpack them on installation but using them directly from the APK, right?). So that would add
(writing "about" as some other, smaller files are also just "stored"). Which means I could pick the |
This comment was marked as off-topic.
This comment was marked as off-topic.
Okay, so constructing APKs for distribution from AABs with bundletool seems more complicated than I thought. Unzipping the
Oops, sorry about that. Yeah, you just run it with I managed to get it running in 2bbdaa7, it spits out a tree like this: Splitting with a specific device configuration yields this:
You and me both! :) I don't really personally care about the APK sizes, and I think this is the best I can do with the knowledge I have, so I'm going to stop working on improving it for now, since it feels like I'm just treading water here. PRs welcome, as always. |
Thanks for the analysis, Erik! So with that "full APK" it would mean around 70+ MB for arm64 (32bit will not be that much different). Which means we cannot even hope getting it below 50 MB with some optimization – not to speak of the 30 MB per-app limit in my repo. Unless those native libs can be compressed (which then would result in a bigger install size, as Android would need to unpack them). Not the news we had hoped for. So what path forward do you suggest? Options would include:
My preferences would be 3 then 1 – but 3 would mean some more (initial) work for you setting up the build and getting the APK attached. 2 would work but be a bit strange with a 3 years old version that doesn't get any younger. And sure, PRs would be great – but I couldn't provide this one (I have no experience with that to speak of; all I can offer are "wise words"). e could of course combine that with 2 for a while: Opening an issue here with "help needed" and linking that from the app description in my repo, wait half a year to see if it yields something, and decide then. |
@ErikBjare as IoD has fallen far behind in releases due to the APK size, may I suggest removing it here until the issue can be solved? Alternatively, if you'd provide per-ABI APKs we could see if a single arch would fit in. I see the native lib ( |
As there's still not even per-ABI split APKs, and the recent APK already passed the 100 MB mark with IoD falling even farther behind, I'm now removing the app. Be welcome to reach out to us again should the issue be tackled, so we can re-establish the app. Thanks! |
Looks like with the last version, APK size increased by factor 6 – due to the
libaw_server.so
having increased by factor 18 (from around 5M to 90M). As that exceeds the limits in my repo by factor 3 (max space per app is 30M), I had to remove v0.10 and disable auto-update.Is there any chance to decrease APK-Size again? I don't know if whatever blew up that library could be reverted – but e.g. an armeabi-v7 only build would just fit in 30M. Should none of the two be possible, I guess it's best to remove ActivityWatch from my repo, as providing an outdated version is not a good idea.
The text was updated successfully, but these errors were encountered: