How to test what will happen when you publish an update to your app to the Market

7.3k views Asked by At

I'm about to publish a new version of an app to the Market. In order to avoid any potential problems once its been pushed to the Market and people get notified of an update, I'd like to simulate that process on my phone using the .apk for the new version of the app I'll be publishing.

For instance, it has an update to the SQLite DB it's using.

The closest I can find is using the Android Debug Bridge (adb) using the command: adb install C:\myApplication.apk with my phone attached to my PC via the usb cable. (the parameter represents wherever your apk file is on your PC).

When I do this, if the app is already installed on my phone, I get an error message:

Failure INSTALL FAILED ALREADY EXISTS.

If I delete the existing app from my phone, the adb install command works fine. So, it looks like this can only be used to install an app that doesn't currently exist on your phone.

Is there any way to simulate the update process? It'd be nice if there was an adb update command, but I don't see that.

3

There are 3 answers

1
FoamyGuy On BEST ANSWER

I think your error is because you have the market signed version installed and your trying to install a debug signed version. If you sign it with your market key it should install fine.

0
Nanne On

The closest I think you can get is to put the APK somewhere, and download it on a phone. That is about the closest you can get to the real market situations, with the only difference being that you need to add the "unknown sources" option.

(on a sidenote: you can get an error installing an apk with the same package-name, but a different signing.)

3
Heiko Rupp On

Try using option -r to adb install:

adb install [-l] [-r] [-s] - push this package file to the device and install it ('-l' means forward-lock the app) ('-r' means reinstall the app, keeping its data) ('-s' means install on SD card instead of internal storage)