Search code examples
androidapkadb

How to uninstall updates of an android system app through adb?


So there's my system app and I've sideloaded another apk on top of it. Is it possible through adb to just uninstall the sideloaded apk and have the system app running?

I tried two methods which failed. I am using 4.4

a. Removed the sideloaded app from /data/app folder and rebooted. The system app stayed in its comatose state.

b. Did an adb uninstall (Success) and rebooted. same result.

This slightly convoluted approach did it.

  1. Move the system apk from /system/priv-app/ to /sdcard/

  2. Adb uninstall

  3. reboot

  4. move back the system app from /sdcard/ to /system/priv-app/

  5. reboot

My question is, is there a straightforward approach to doing it through adb?


Solution

  • Since you installed same package (app) on top, adb package manager probably removed the old system app (same package name).

    You can see a list of current apps/pacakges with adb shell pm list packages

    If you have the old .apk , you can reinstall with adb install -r <apk> again. http://developer.android.com/tools/help/adb.html

    If you see failed version downgrade, try with -d like so adb install -r -d <apk>