Raccoon, Google Play, APK download and the offertype

One of the cool features of Raccoon is the ability to downgrade apps when a developer screws you over with an update. However, in order to do so, you must supply the following download parameters yourself:

  • Packagename
  • Versioncode
  • Offertype

Unlike packagename and versioncode, there is no public documentation for what offertype is suppose to be and what values it can take. Always setting it to “1” works, but that’s as pragmatic as unsatisfying (why one? What does it mean? Are there other choices?). It me took a bit of digging around, but I finally figured it out:

  • UNKNOWN (0)
  • PURCHASE (1)
  • RENTAL (2)

Note that Play “sells” various digital goods, not just apps, so “PURCHASE” (a misnomer, even free stuff needs to be purchased) in this context really means anything that stays with you after download, while RENTAL refers to DRM crap that will eventually self destruct.
So, as far as apps are concerned, “1” is indeed always the right value, the others make no sense (not that it makes a terrible lot of sense to “rent” a movie that is available for download. How do you return it? Reupload?)

Posted in Android, Coding