Reinstalling a package after uninstalling it using adb shell uninstall with the k option












0















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.



--Update



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



> adb uninstall com.android.providers.media
Failure [DELETE_FAILED_INTERNAL_ERROR]









share|improve this question













migrated from superuser.com Feb 6 at 14:48


This question came from our site for computer enthusiasts and power users.



















  • 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
















0















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.



--Update



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



> adb uninstall com.android.providers.media
Failure [DELETE_FAILED_INTERNAL_ERROR]









share|improve this question













migrated from superuser.com Feb 6 at 14:48


This question came from our site for computer enthusiasts and power users.



















  • 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














0












0








0








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.



--Update



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



> adb uninstall com.android.providers.media
Failure [DELETE_FAILED_INTERNAL_ERROR]









share|improve this question














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.



--Update



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



> adb uninstall com.android.providers.media
Failure [DELETE_FAILED_INTERNAL_ERROR]






installation






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 6 at 10:02







ms2r











migrated from superuser.com Feb 6 at 14:48


This question came from our site for computer enthusiasts and power users.









migrated from superuser.com Feb 6 at 14:48


This question came from our site for computer enthusiasts and power users.















  • 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



















  • 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

















have you tried the -r option for reinstalling the apk?

– Brijesh Joshi
Feb 6 at 10:14





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





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





@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





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





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










0






active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "139"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fandroid.stackexchange.com%2fquestions%2f207458%2freinstalling-a-package-after-uninstalling-it-using-adb-shell-uninstall-with-the%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown
























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Android Enthusiasts Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fandroid.stackexchange.com%2fquestions%2f207458%2freinstalling-a-package-after-uninstalling-it-using-adb-shell-uninstall-with-the%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

Mangá

Eduardo VII do Reino Unido