Is there a way we can update (not reinstall) a non-market apk on an Android device? I could only find an adb install (nothing like adb update)
4 Answers
adb install -r
is the closest you get, that is actually an update as it keeps the database and stored preferences. If you uninstall/re-install both the app database and preferences is deleted. What exactly are you trying to update about the app that -r option does not help you with ?

- 42,644
- 28
- 86
- 100
-
There is some data I store in the app which I would like to retain across updates/reinstalls. I figure if this is a limitation, the only way I have is to store it in the SD Card, but thats again a risk if the user deletes the data from the card? – lostInTransit Mar 10 '10 at 15:10
-
4The data you store in the app (in context preferences) will remain there on a reinstall, that is if you use adb -r option.... These data will only be deleted if you uninstall or delete them manually by code. – Vidar Vestnes Mar 10 '10 at 16:48
-
1Is there any way to view stack traces when installed this way? – Vincent Jun 08 '11 at 08:48
-
4Keep in mind that you will need to use an APK signed by the same keystore that signed the currently installed version. – theblang Feb 13 '14 at 16:20
adb install -r
didn't work for me. So, I did a little workaround.
Uninstall app but keep the data by using
adb uninstall -k com.packagename
. This will uninstall the app but keeps the data. See thisInstall the app again using
adb install package.here
.
Note: You must have root access to execute this commands.

- 784
- 5
- 13
The easiest way to do it exactly like market apk, is to download the APK to your phone (i.e. download from Google Drive or from email) and then click on the APK in the Downloads library

- 11
- 3
-
While that might be the correct answer, it's better to provide an example. read the [answer] page for more info. – ItamarG3 Jun 27 '17 at 13:28
-
1This solution will not work for kiosk or COSU devices or for any device that doesn't allow the user to install apps. – Alex Meuer Jan 16 '18 at 10:25