Update an APK app without losing your data

These apps don't update through Google Play, so updates arrive as APK files: from the app itself, from its download page or from another site. Whether a file updates your app or gets refused comes down to three checks.

The rule Android applies

A new APK installs over an app you already have, and keeps all its data, when three things hold:

  1. It has the same package id.
  2. It is signed with the same certificate.
  3. Its version code is the same or higher.

With a lower version code, Android refuses the file as a downgrade. With a different certificate, it refuses the file whatever the version. A different package id isn't an update at all: the file installs as a second, separate app.

The version code is a number inside the APK that people rarely see, and it is what Android compares. The version name is for people: Hero11's current build and an older one are both version 1.13 (1.13.f69d and 1.13.f675 in full), but their version codes are 497965 and 497893, so Android refuses the older one.

Other builds of these apps

Every other build Gamekosh has measured, and what Android does with it on a phone that has the app from the download button.

AppFileVersion nameVersion codeAgainst the button's file
Goplay11Newer build named in the download page's settings1.14.f6d1498081Newer: installs over this one as an update
ComeOlder build named in the download page's default settings1.10.f4ia496202Older: Android refuses it over this one as a downgrade
ComeEarlier download of the same build1.14.f6d0498080Same build; only the download tag differs
BatwinCopy on Batwin's file server, without the download tag1.14.f6d1498081Same build; only the download tag differs
Hero11Earlier build with the same version number1.13.f675497893Older: Android refuses it over this one as a downgrade
Hero11Copy on Hero11's file server, without the download tag1.13.f69d497965Same build; only the download tag differs
LuckXLuckX file from another download site1.0.01Same version number, different file
LuckXLuckX file from a third download site1.6.8168Newer: installs over this one as an update
MMYSecond app named by MMY's download page2.2.5225Different package id: installs next to it as a separate app

How the apps update themselves

Goplay11, Come, Batwin, Hero11, RS9 and Yono hold REQUEST_INSTALL_PACKAGES, the permission an app needs to hand an APK to Android's installer. With it, an app can offer you a newer file. Android asks you once to allow that app as an install source, then shows its usual prompt for every file, so nothing installs without your tap.

LuckX and MMY don't hold it. LuckX's lobby comes from the web, so lobby changes reach you without a new APK. For a new LuckX or MMY build, download the file again from the app's page.

If Android refuses the file

Keep the app you have: a refused file is older than yours or signed by someone else. Uninstalling first lets any file in, but it deletes everything the app stored on the phone, so you'll have to sign in again. Compare the version and certificate first, as checking an APK shows.