20

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)
1

2 Answers 2

22

Step by step:

  1. 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.
  2. The patch file is transferred to the device.
  3. The Google Play Store app uses the patch file and the old application to construct the new version of the application.
  4. 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.

5
  • Thank you. Do you have any reference ?
    – Sébastien
    Oct 14, 2012 at 8:39
  • We 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. Oct 14, 2012 at 14:47
  • I 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.
    – Sébastien
    Oct 14, 2012 at 16:29
  • DELTA 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. Oct 18, 2012 at 18:49
  • Is 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?
    – Majid
    May 25, 2016 at 14:01
7

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.

6
  • I 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.
    – Sébastien
    Oct 12, 2012 at 15:16
  • google 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.
    – Budius
    Oct 12, 2012 at 15:28
  • I 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. Oct 13, 2012 at 23:07
  • let 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"
    – Budius
    Oct 14, 2012 at 15:09
  • I 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 Feb 12, 2013 at 11:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.