Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are Android app updates/patches sizes are like its setup files?

I was just wondering the same when try to update from PlayStore.

Generally, say for Windows, when it is updated, downloads the files and patches them. From size perspective, these are significantly small compared to its setup which is around 3.5 GB.

So why its not applicable for ANDROID apps? E.g. any update to WhatsApp is almost equivalent to its original setup file (~18 MB).

like image 602
Snehal Masne Avatar asked Sep 29 '15 11:09

Snehal Masne


People also ask

Does updating an app increase its size?

Originally Answered: When I update an existing android app does it add to the previous size of the app? Yes, the newer versions have heavier apk files and they install more binary files. So Yes! Size increases.

Why do Android apps have so many updates?

App updates are released regularly to bring new features, bug fixes, and performance improvements to apps. If auto-updates are enabled in the Play Store, apps will constantly update whenever an internet connection is available.

Why do apps update so much?

Support of Latest OS Features New features allow apps to have new capabilities after every major mobile OS release. Each time Android and iOS put up a new feature, apps generally need to be updated in order to catch up.

How do Android app updates work?

The developer publishes a new version (4.0). The 90-day period ends, the app is added to the update queue and will be automatically updated according to the default update behavior, once the constraints are met. The constraints are met and therefore the app is updated to the latest available version (4.0).

Why are Android app updates getting smaller?

The best part about making app updates smaller is that so much of it happens automatically. Thanks to improvements in the way Android Studio packages APKs to make subsequent builds as similar to each other as possible, the Play Store can calculate smaller delta updates.

Why do Android phone updates take so long?

Plus, the Android updates have to pass through different levels, including Google, SoC Vendor, OEM, and carrier. This is why the updates are usually delayed with most companies.

How big should an android security update really be?

If you purchased an Android phone recently, chances are that it prompted you to install a security update or two at some point. You may have noticed that these updates don’t typically add much in the way of new functionality. Instead, they tend to be pretty small in size — around a few hundred megabytes or so.

When will your Android phone get the latest Android update?

It received Android 9 — its final major feature update — in February 2019, roughly two years after the phone’s release. However, it continued to receive quarterly security updates until mid-2021. The exact update schedule differs from one brand to another. Even devices from the same manufacturer may follow different update cycles.


1 Answers

Although Play Store calls them updates, you actually download the whole Android app again. In a way, it's still an update because you do actually upgrade to a newer apk version but not quite the way you would've liked. It's taxing on your bandwidth but it's easy.

However, your app's settings (shared preferences) and data (SQLite databases or custom files) survive this update/install process which won't be the case if you manually uninstall & install the app's new version again.

In cases where the app's database schema has evolved between the two versions, Android notifies the app on startup that it wasn't a fresh install by calling a life cycle method onUpgrade() where the app has a chance to upgrade its data left over by the previous version.

When you compare this with Windows, both the OS and the update server are from Microsoft and they must have worked together to figure out what needs to be pushed (.dll, .ini, .sys etc.), update bundle's format/compression and security implications (some sort of encryption to prevent malware injection by any one intercepting the traffic).

No such standard update mechanism has been made available by Google for the Play Store see update and I believe so is the case with every other app store. Obviously, the developers can't roll out one on their own since the updates are handled by Google both at the device and server side.

But, the developers are certainly not unhappy about it. It's much more convenient to test the new apk, see it working and uploading the same rather than fiddling with what changes to push and breaking the app if you miss something. The bandwidth is cheap anyway.


I've just recently discovered that at Google I/O 2012 Google announced that they were working on a Smart Updates technology using some delta encoding algorithm. The idea was to compute the DIFF between two APKs (sort of like we do for text between two source code files), create a patch on the server-side and only send that over the wire.

This feature went live on Play Store later that year as reported by AndroidPolice and TechCrunch.

Developers, Google said at I/O, won’t have to do anything to enable this feature and according to the folks over at Android Police, this feature quietly went live late last night or early this morning.

You can see it in action in this video. Notice how the apps start installing once the progress bar hits just 40-50%. This is absolutely brilliant because not only this saves Google terabytes of bandwidth, its pure server-side approach means developers don't have to fiddle with anything. Perhaps, that's the reason it finds no mention on the android developers site and so takes time to get discovered.


With that said, my personal experience seems to coincide with yours. I see most of my app updates download almost the whole of the app. Maybe it's because I don't download very frequently. It's not unusual for me to skip several minor revisions and perhaps the app changes far too much to derive any size benefits out of the patch generated.

like image 199
Ravi K Thapliyal Avatar answered Sep 24 '22 22:09

Ravi K Thapliyal