I have a phone running Cyanogenmod, which is an AOSP derivative. It lacks Google Play.

I installed Textra as the messaging app some time ago using adb install com.textra.apk. Textra was recently updated to version 2.28, so I need to update the app.

Using adb install com.textra.apk resulted in a INSTALL_FAILED_ALREADY_EXISTS (this was expected). Using adb install -reinstall com.textra.apk succeeded, but I still have the down-level version 2.26.

I don't want to uninstall Textra because I'm concerned it might wipe my existing database of text messages.

How do I use ADB to update an app that is already installed?

  • 5
    For me, adb install -r foo.apk always worked. Which ADB version you are using? Maybe there's a more recent one, and maybe yours has some "bug". And you're correct: uninstalling would remove the app data. Work-around: adb backup -noapk -f foobar.ab com.foobar.app (just backup data), then adb uninstall -k com.foobar.app (just removes the app, keeps the data), followed by adb install (with or without -r) might do the trick. If the app data got lost: adb restore foobar.ab should get it back. // Does any of that work for you, so I shall make it an answer? – Izzy Mar 25 '15 at 23:38
  • @Izzy, If given the root access, I think replacing the APK be it using file manager or ADB would achieve the same goal. – Firelord Sep 9 '15 at 22:57
  • 2
    @Firelord might do, but might have side-effects. I tried that recently with a system app, and you know what happened :) Well, apart from the real trouble: there might be side-effects (as the lost account in my case). When using that approach, I strongly suggest doing so while booted into recovery. – Izzy Sep 9 '15 at 23:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.