I connected my Android device and used adb shell and while I intended to uninstall the stock music player app I instead uninstalled com.android.providers.media package using this command: pm uninstall -k --user 0 com.android.providers.media. Now I would like to reinstall it back.

I tried downloading and installing the apk file but got INSTALL_FAILED_UPDATE_INCOMPATIBLE error.

? .\adb.exe install com-android-providers-media-1580000075-39331427-4b5d0d066aef0e9e03a79b5dcd83005b.apk
adb: failed to install com-android-providers-media-1580000075-39331427-4b5d0d066aef0e9e03a79b5dcd83005b.apk: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.android.providers.media signatures do not match the previously installed version; ignoring!]

So, what's the fastest and/or the easiest way to get it back? I guess because of using the k option (and from the error message I got while trying to install it from the apk file) that the package is already in the device and I can install it again easily.


I tried to completely uninstall the package but also that didn't work:

> adb uninstall com.android.providers.media
  • have you tried the -r option for reinstalling the apk? – Brijesh Joshi Feb 6 at 10:14
  • I tried adb install -r com_android_provider_media.apk but got INSTALL_FAILED_UPDATE_INCOMPATIBLE error. – ms2r Feb 6 at 10:20
  • @BrijeshJoshi How should I type it? Is the way in my previous comment right? – ms2r Feb 6 at 10:27
  • yes it's correct. As this was saying that UPDATE_INCOMPATIBLE that majorly because of the different signature used. Still try your luck using -d option, which allows to install a downgrade version. – Brijesh Joshi Feb 6 at 10:33
  • push package(s) to the device and install them with following options. -l: forward lock application -r: replace existing application -t: allow test packages -s: install application on sdcard -d: allow version code downgrade (debuggable packages only) -p: partial application install (install-multiple only) -g: grant all runtime permissions – Brijesh Joshi Feb 6 at 10:34

Your Answer

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