43

I have uploaded two APK files into the Google Play store. One is a newer version and one is an older version. The newer version is the active one since it has a higher versionName and Code. Now I found some bugs in the newer version and I want to delete it from the Play Store and activate the older version. Google Play won't let me deactivate the newer one and activate the older one again, since it has a lower versionName and code. The problem is that I'm am not the developer and did not build the app. The developer is in another country and it is difficult to get hold of them.

What can I do to reactivate the older version again? I know one solution would be to change the versionName and Code. I only have the apk file, can I change those details in Eclipse with only the apk file and very little experience in eclipse or developing android apps?

Thank You

DextrousDave
  • 6,603
  • 35
  • 91
  • 134
  • 1
    @Booger If reactivating previous version is not possible then why google keep all the older version in google play? what is the point here? why google want to load it server with unusable apks? – vnshetty Mar 02 '13 at 08:28
  • @vnshetty Once possible reason that multiple APKs are retained is to support in-app billing for users who still have APKs with lower version codes. For in-app billing to work, there must be an APK on Google Play that has the same signature and version code as the one being run on a user's device. So deactivated APKs may still be needed to support users who have not yet updated to the latest APK. – Carl May 01 '13 at 03:30
  • I'm not sure the above is correct, but I've read posts that indicate that this could be the case, at least for IAB version 2. See: http://stackoverflow.com/questions/11867878/updating-an-android-app-that-uses-in-app-billing/11937938#11937938 – Carl May 01 '13 at 03:31

4 Answers4

23

You can't rebuild a new version of an apk from the apk itself.
Have the app developer do the following:

  1. Rebuild project in its previous state with higher version number (must be higher than all previously submitted versions)
  2. Resubmit

From Google's Android "Developer Console" page:

Note that rollbacks aren’t supported due to the app versioning requirements of the Android platform. If you need to rollback, consider launching a previous APK with a new version number. However, this practice should be used only as a last resort, as users will lose access to new features and your old app may not be forward-compatible with your server changes or data formats, so be sure to run alpha and beta tests of your updates.

Pup
  • 10,236
  • 6
  • 45
  • 66
  • 1
    You will need the code in it's previous state. That is backed up in an environment with all the then current classes and then current libraries and the Android/Java versions that were current. All this is rarely available. – usajnf Sep 05 '17 at 02:13
13

A good strategy is, when creating a build, modify the manifest to build say a version 2.0 = 39 AND again 2.05 = 45 and generate these two apks which will obviously do the same thing.

Later, when build 2.01 = 40 is in production and you find an error, you can jump back to the old version by uploading the 2.05 = 45 you created earlier.

You have 5 opportunities to back track while releasing 40, 41, 42, 43 and 44 to go back to earlier functionality!

Do this for each build and you can always go back to an earlier version which has been pre compiled and built but with a higher version number than currently in production.

usajnf
  • 522
  • 3
  • 11
  • @JoRouss this is how you can plan for this in the future. – usajnf Jun 21 '16 at 00:10
  • 1
    Hah. Fine unless your intermediate buggy APK has changed the format of some data stored on the device so the "new" (old) version cannot recognise it any more – funkybro Jun 01 '18 at 15:30
  • If the local SQLite database STRUCTURE has changed, there could be problems. Depending on whether you have designed in a way to avoid this using something like: // Upgrading database @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { – usajnf Jun 02 '18 at 16:05
4

You will not be able to change the APK file without having the signing certificate.

You should be able to revert to an older version, assuming you didn't change the level of API support.

Booger
  • 18,579
  • 7
  • 55
  • 72
  • Thank you for your answer. How do I revert back? When I deactivate the newer version and reactivate the older version, it gives me an error message saying:"Error: New APK version is lower than previous APK version." Both APK files have these same properties: API level: 7-16+ Supported screens: small-xlarge OpenGL textures: all – DextrousDave Apr 30 '12 at 13:50
  • I have only seen this in my console, when I did in fact change the API level. If the console thinks those are different, you are likely in trouble, and should probably think about moving forward (can you generate a new APK, from the previous source?) – Booger Apr 30 '12 at 18:17
  • That's the thing, I don't know anything about APK development and even if I do manage to create a new one, the application is free, but the service it is used for is a paid service, and I can't screw that up (APK file is a voip soft client). And I guess I can't change the current APK file's versionName or Code without the security certificate from the developers which I am most probably not going to get...Any other suggestions? – DextrousDave May 01 '12 at 11:01
  • If you don't have the cert, there is nothing you can do (please mark my original answer as correct). This is the core security model of Android, and you cannot update without the cert (even Sergey Brin couldn't upload an app if the cert got lost). You also cannot revert if the API version changed (so that is 2 sentences you could mark as correct in my answer ;-) ). Bottom line, I don't think there is anything you can do - sorry. – Booger May 01 '12 at 14:58
-5

Presumably, go to the Dev console, select the APK tab, hit the "Advanced Mode" option, deactivate the current version and hit "Reactivate" for the version you want.

Deepak
  • 131
  • 2
  • 12