Android: Freeing up 60% of storage for apps by removing parts of the app
android-developers.googleblog.com
android-developers.googleblog.com
There's probably so much bloat in frameworks, (illegal) telemetry and whatnot under the hood of those apps that should be tackled.
For example: Why is the the Amazon app 229 MB heavy? 195 MB is the app itself, then there's ~61 MB of "data" and only ~26,5 MB of cache.
It's a website, nothing more. How can it take 200+ MB of space? It's sick.
edit: How does Android even calculate those numbers? They don't add up at all...
edit2: see this recent post for reference: "I shaved 187MB off United Airlines' 439MB iOS app" https://news.ycombinator.com/item?id=30442529
I do agree that Amazon's app does seem to basically be their website, so I don't understand why it needs to be so big.
(And the numbers on my phone add up)
Even desktop OS don't go far enough. Would be nice if Windows and macOS came with a top 5 {mem,cpu} consumers drop-down in the global menu bar without having to install a tool or open task manager. We complain about bloated apps but without providing insights to the user, there's no pressure for apps to optimize.
If it seems like too much of a power-user feature, how about your run-tracking app silently closing on a long run because you were also listening to Spotify in the foreground? That's not a good experience. With no insights, all you have to act on is superstition. Do I need to find a run-tracker that doesn't crash or should I try a different music player? No data so who knows.
We still insulate users from this data for some reason even on mobile devices that LRU-close apps when memory is tight. Let the people know, dammit.
An app can already say 'I'm still doing a user visible action' (like logging a run, or playing music). Whenever one of those apps has to be killed to free up memory, a messagebox should be displayed saying "Spotify has quit due to low memory. Spotify was using 647MB and RunGPS was using 1454MB out of 3000MB system memory".
Google won't do much against it because the worst of the data hoarders are the f2p games that make money for themselves by selling the user data they can get their hands on and make also a lot of money for Google via all the IAP commissions.
Couldn't they just penalize app size in play store rankings the same way they penalize slow sites in search results? Obviously for games and some types of applications you can't get around it, but I imagine Google has the resources to work around needlessly punishing those.
SD card is just not nearly as fast as NVMe storage or even UFS 3.
I worked on the main app for a top hotel brand and they wanted convincing why we should take several sprints shaving space off their builds.
They're struggling to get people off their phone lines and into the app.
Say a customer's on a mobile connection or crappy airport wifi trying to book a hotel. When a 30 minute download for your 400 mb app starts, guess what they're going to do?
Cancel it and call in.
It would also be foolish to think we know the answers of how to make amazon more money from our comfy arm chairs.
> I get why smaller companies use generic janky frameworks to throw up an app quickly and keep maintenance costs down. But why doesn't Amazon have the most streamlined and elegant app on the planet? They have the resources, expertise, and scale for it to make sense to invest heavily.
https://news.ycombinator.com/item?id=30613893#30614531
Another way to say this: the root reason for app bloat is something that causes general app badness, so the question "Why is the app so bloated?" is not well explained by your implied answer "Because users do not reduce purchases on account of app size".
But I think large apps and apps that crash frequently is correlated but not strongly. I have never seen Amazon crash. I have seen 4MB apps crash. Bloat by itself just means I have to buy a more expensive phone to fit everything I want, which sucks but isn’t the end of the world.
Given that I'm not sure why I should care as long as it works.
As a dev I agree it's technically interesting to find out why, as a user I think it just doesn't matter.
I can see why jumbo app wouldn't affect you.
I've got 7t on my desktop. Would you mind if chrome automatically updated to 1t. It's not a new computer pre-owned 2015
Or just trying to figure out how we can do "smartphone death by a 1000 Amazon apps"? :-))
No idea, but I would also like to know. My apps are so small that once they reported a negative size.
(Found the picture! https://imgur.com/a/KDI9Y4M)
If you program using the built in api only (this means the functions available to the target sdk, nothing newer) then your app size will be basically all assets, as code is very compact by itself.
But of course, coding is by far more complex, you are like doing native programming (although easier than c). My apps are small tools, so I can.
Oh, and don't use Kotlin. It's a wonderful language and far better than java, but horribly optimized.
I'd love to see them get in their walled garden and clean up the ecosystem. They are doing reviews obviously, so they can/should tackle the bloat, too.
Look here for example: https://news.ycombinator.com/item?id=30442529 ("I shaved 187MB off United Airlines' 439MB iOS app (telkins.dev)")
"Google kicked my app off Play because it was too big. WTF?"
I have removed most of Google's apps from my phone because of their extreme size.
Looking on my phone it looks like the award for most bloated goes to Google Play Services at 500MB. Wow!
As you can see from the breakdown: 34% of the app is native libraries, another 34% is dex, 23% is resources, and another 8% is assets.
Unfortunately they're still not using AABs, have about 4 MB of download size savings from just image optimization, have 1.1 MB of Emoji gif files , and are not optimizing their Native libraries for the specific architecture (using AABs would solve this)
I checked mine. 201 MB app, 115 MB "data", 202 MB cache, 518 MB total
Yes, the Amazon app, which literally feels like a webview wrapper around the mobile website, is taking up half a gigabyte of space on my phone.
Yesterday I was looking really hard on who exactly would be the seller for an item. Did not find that information on the app, while it's easily findable in the web version.
Or do I have some quirky version of the app due to some A/B testing?
I tried reducing all this to a minimum for my app and it helped getting more downloads and less churn. Now at 10MB download size, 40MB storage usage (10MB cache, 10MB data) and 5MB data usage. All this for a heavy user (myself).
It's also why Apple has pushed some technologies for developers to reduce initial app size; optimized builds per device (you send Apple a bundle with e.g. multiple images at different resolutions, Apple only installs the ones the phone actually needs), dynamically loading content like levels (so the initial download is only the core libraries + the first level, the rest is downloaded and offloaded dynamically), etc.
Turn iCloud Photos on? Even with "Optimize storage", that'll keep about 3-5GB of local thumbnails on your device, wasting space.
iCloud Notes on? Your 5+GB of notes will all be stored locally; no storage optimization there.
Use Apple Music? It'll use about 7-8GB of local storage, not for any downloaded songs (I haven't downloaded any) but purely for album artwork, cache, and other junk. There is no way to ever delete that Apple Music cache; not even cancelling Apple Music, turning off Cloud Library, or deleting the Apple Music app. The only way, is to reset the iPad completely, and delete the Music app before it can start syncing anything from the cloud. i.e.: you have to switch to Spotify.
These are all Apple apps.
When an iPad has low free storage, it'll delete user data from 3rd-party apps, and those apps have to redownload user data from the cloud every time you open the app. Notability is a good example. Everything's gone, wait 5min for it to resync.
The iPad might be my main device if Apple fixed this, and it would lock me much deeper into Apple's ecosystem, but they don't seem to understand the value of minimizing storage use.
On that, the larger your app is the bigger the target. When I run out of space on my phone I sort by largest app and start booting off the worst offenders. Small apps, even if I use them less often, are likely to fly under the radar.
It's a bit surprising phones can get away with this.
Conversely, maybe I don't want those pre-installed apps in the first place.
There is no explicit factory image stored somewhere, the reset to a factory state is achieved by clearing the mutable storage. This achieves getting the device to a clean state since the read-only storage is guaranteed to be in the same state as to begin with.
(The read-only storage does get updated on an OS upgrade. That's why a factory reset will not downgrade the OS itself.)
[1] It contains a file explorer app – given that at least at that time Android didn't really have a proper built-in file explorer this is actually a somewhat sensible idea, but then on the other hand as a power user I still prefer a file explorer of my own choosing (and with root support), so it's still mostly useless to me. Other than that, it contains what looks like configuration apps for a few American mobile service providers, plus something like some sort of Brazil-specific app store – all completely and utterly useless, especially given that my phone was bought in Europe and is on the European software update channel!
If I try to download a file, an app shouldn't need to get media permission. An app should be able to download files with either a download folder permission where it can write a new file but only read what it wrote unless explicitly given permission to
> Permissions are required for all files on Android 9 (API level 28) or lower
I'm not an expert, but unless I'm missing something, there seems to be a legitimate set of circumstances where the requesting of additional permissions is required to function correctly. It seems overly reductive to deposit this entirely at the feet of app developers.
Our company, Emerge Tools (YC backed) is focused on trying to help devs solve the root cause of performance problems (size, startup time, etc.) by providing continuous monitoring and alerting for regressions directly on pull requests. We already work with some of the best mobile teams in the world (Dropbox, Faire, Life360).
If you have interest in mobile performance we're hiring! shoot me an email josh@emergetools.com
https://www.xda-developers.com/warden-open-source-app-aurora...
Already, swiping an app away in the task manager awkwardly keeps it open in the background instead of closing. Now we awkwardly keep zombie apps.
Please stop predicting what users want, give them reality. You have 20 background apps, you see 20 apps in the task manager. You install 100 apps, you have to sort and group 100 icons. You either have a usable app, or no app at all. Then, the user can say "damn, this bloat sucks. Please make things lean and simple, Mr. Corp."
This way it frees up the space used by the application data, without removing it altogether, so that the associated user data can still remain with it.
It’s the same concept as iOS’ feature to offload unused apps, but this appears to be implemented in a way that is backwards compatible with older devices since the Play Store is able to manage the process of replacing and restoring the app package and not the core OS.
I have many data points for which the main source of clutter on the phones are WhatsApp images and videos received in a lot of chats and groups. I know people that remove them almost daily to let their 16 or 32 GB phone receive another day worth of messages.
This is an example of google creating and signing a 'placeholder app' with the developers signing keys.
Obviously this example has benefits for the user... but an evil Google could use that same functionality to steal secrets from apps...
Maybe your hobby horse is different to other people's hobby horse, but that doesn't mean that other people's hobby horses aren't important.
This issue probably affects lower income people disproportionately, too.