Smart App Updates on Google Play Store: how does it work?
Solution 1
Step by step:
- GDIFF, a delta encoding algorithm, is used to compute the difference between the old application version and the new one. This is done on the server side. This computed difference is usually referred to as a patch file.
- The patch file is transferred to the device.
- The Google Play Store app uses the patch file and the old application to construct the new version of the application.
- The new version is installed on the device.
Currently, patch size is 25% of the new application version size (on average). Thus, you get 75% traffic saving on average. The trade off is that you have to do more computations on the end device to deploy the received patch, depending on the delta encoding technique. GDIFF is extremely simple, and has minimal overhead. The difference is computed between APK packages (all information in the APK is used). As was mentioned, developers don't need to do anything to benefit from this new feature.
Solution 2
The reason why there's no documentation is because it's all 100% done on the server side by google without any external interaction. Developers shouldn't worry at all about this functionality. Just develop your app you normally would.
To be fair I don't believe they want anyone to know how it works because I'm assuming it's part of their intelectual property.
![Sébastien](https://i.stack.imgur.com/dat20.jpg?s=256&g=1)
Comments
-
Sébastien about 2 years
The Google Play store supports (since Aug 2012) a new feature called Smart App Updates, that allows downloading only the necessary "delta" when upgrading an app.
I have found no documentation for developers regarding this feature, thus I don't know how to optimize my app to make sure it benefits from this great mechanism.
So, does anyone know:
- What are the technical impacts (if any) that would be good to know for the developers? (I suppose a new, full-size APK is built on the user's device, or maybe the unchanged data is stored somewhere else?)
- Is the reutilization of unchanged data from the previous versions limited to certain resources? (like files in the
asset
folder)
-
Sébastien over 11 yearsI really doubt this can be done solely on the server side. Some processing HAS to be done on the device (by the Google Play app I guess) to rebuild a valid APK from the delta downloaded from the server.
-
Budius over 11 yearsgoogle servers send the delta to the GooglePlay.apk on the device and the GooglePlay.apk finish the build ;) The important part of what I said is: it's all automatically done by google and we developers don't need to worry about it.
-
Nikolai Samteladze over 11 yearsI am pretty sure it is not their intellectual property (except the code of course). I believe Google uses a pre-existing delta encoding algorithm and there is previous work on usage of delta encoding in Android applications updates.
-
Sébastien over 11 yearsThank you. Do you have any reference ?
-
Nikolai Samteladze over 11 yearsWe do research in this area under a Google grant, can send you a paper. Don't really know about any other source. Also, Google has released any information about smart updates.
-
Budius over 11 yearslet me quote myself: "The important part of what I said is: it's all automatically done by google and we developers don't need to worry about it"
-
Sébastien over 11 yearsI am sure SO users would be glad to read this paper, feel free to publish a link here if you're allowed to do so.
-
Nikolai Samteladze over 11 yearsDELTA project's main page: csee.usf.edu/~nsamteladze/projects/delta.html. There is a lot of information about usage of delta encoding to reduce the transferred data.
-
varunrao321 over 11 yearsI have been researching a lot on this, I would have an requirement to build google Play store like application on both server and mobile side.. please help me in understanding it
-
UVM over 9 years@Budius, I was little bit worried until I see this answer from you. So I understand that while doing "smart update", this will not touch any of the user data (preferences etc).
-
Majid about 8 yearsIs there a mechanism that a file had to be updated? because, it seemed that the files in the asset are not updated with changing content or i'm wrong?