Take the 2-minute tour ×

This question already has an answer here:

I know that adb install will not replace an existing package if it's of a different build type (i.e. debug vs. release).

Eclipse also successfully replaces the debug apks whenever I run a debug session.

But when I attempt adb install for replacing an existing release apk with another release apk (same package name!), I get a failure message:

adb install myapp-release.apk 
    pkg: /data/local/tmp/myapp-release.apk
745 KB/s (34310 bytes in 0.044s)

Wasn't that supposed to work? What am I missing?

share|improve this question

marked as duplicate by David Cesarino, sandrstar, user568109, Dirk, AlexVogel Jul 26 '13 at 7:28


1 Answer 1

up vote 70 down vote accepted

I suppose if the app is already installed, you need to supply the -r key:

adb install -r myapp-release.apk

From the adb help:

'-r' means reinstall the app, keeping its data
share|improve this answer
Thank you. I can't believe I missed something so obvious. +1 and and accepting. –  an00b Jan 29 '12 at 14:16
Note that you can use the -r flag even if the package doesn't exist, so you may as well always use it unless you don't want to override an existing apk. –  David Caunt Jan 29 '12 at 14:32
@David Caunt Thanks for this tip. –  an00b Jan 29 '12 at 14:37
thankz neutrino –  Pradyumna Swain Feb 15 at 5:46
