How to install / get back uninstalled Apps (APKs) with ADB.

Search This thread

mahmood monasser

New member
Sep 25, 2017
1
0
It’s work
IMG_20201214_195631.jpg
 

BarbaTrucMuche

New member
Dec 22, 2020
2
0
Hi! I succesfully uninstalled some bloatware on my Huawei P30 pro (EMUI 10.1.0.175) using:
Code:
adb shell pm uninstall -k --user 0 <package-name>
Unfortunately, I removed a package I shouldn't by mistake (com.android.storagemanager). I tried to reinstall it using:
Code:
adb shell cmd package install-existing <package-name>
But it fails, saying the package doesn't exist... I tried on another package I'd removed, and it works. Any idea how to get com.android.storagemanager back on my phone? Would this apk be an option? https://www.apkmirror.com/apk/xiaomi-inc/storage-manager-4/storage-manager-4-10-release/ Fortunately, no bugs yet, but still, I would like to have it back. Thanks!
 
Last edited:

Kgonla

Member
Jul 1, 2012
29
20
Hello, I have frozen several system packages with Lucky Patcher & now no apps opens.
I am trying to recover them with ADB, this is what I do:


adb shell cmd package install-existing <name of package>
I get:
Package <name of package> installed for user: 0

But when I run
adb shell pm list packages -d

packages are still on the list, they are not restored.

Any help? Thank you.
 

Mac23

Member
Aug 7, 2014
22
5
You can reinstall an uninstalled app like this (no need for factory reset):

get the path for that app (that's the same awk does, in my case I want FM-Radio back):
Code:
pm dump com.android.fmradio | grep path

install the app:
Code:
pm install -r --user 0 /system/priv-app/FMRadio/FMRadio.apk

"cmd package install-existing com.android.fmradio" did not work on my LOS 14.1, because the parameter "install-existing" seems not to be implemented.
 

joker.lg

Senior Member
Nov 21, 2014
135
22
A lot of people searched for a way to uninstall bloat or APKs using ADB because a lot of OEMs don't allow uninstalling many of preinstalled apps.

Tested on Pie and Oreo.


BUT most of the articles if not all of them ( couldn't find any article saying otherwise ) say that after using the command "adb shell pm uninstall -k --user 0 <name of package here>" to uninstall an app, you have to factory reset your phone to get these packages back which Is NOT TRUE.


you can simply use "adb shell cmd package install-existing <package name>" in ADB and you'll get the package back .


Examples:-
adb shell pm uninstall -k --user 0 com.android.something
adb shell cmd package install-existing com.android.something



Tested and working on Android pie and Oreo on Samsung devices.

Seems like some people can't get it to work with no helpful information so we can't help much.
big brain ! i was looking this way since i accidentally disabled an app. this helped android 10 thank you !
 

jarenquegan

New member
Jun 2, 2018
1
0
Not work

it doesn't work :(
That's because you've entered the wrong command. If you're using command prompt then you don't have to type adb shell anymore. You just have to type cmd package install-existing <package name> then hit enter.

Ps. You don't have to type adb shell anymore coz you have already entered the command at the very beginning.
 

k500zm

Senior Member
Aug 5, 2013
448
179
London
@Vordx

Mate you just saved my bacon - I uninstalled system launcher com.miui.home from my mi 10 lite 5g and it screwed the recent items.

Thought I would have to factory reset or wait until a new system update to repair it - but your fix worked like a charm!

Thank you SO much ;)
 
  • Love
Reactions: Vordx

Hitti2

Account currently disabled
I actidently uninstall "adb shell pm uninstall -k --user 0 com.android.shell"

I copied the wrong one overlooking. I no longer have shell on my phone.

Andoid 11, oneUI 3.1

can anyone help?

Edit:

I have the shell.apk package, I pulled from another s10+ same phone and same OS version.

I install the apk by MIX Explorer to package installer. But it says app not installed.
 
Last edited:

Vordx

Senior Member
Feb 1, 2017
521
434
I actidently uninstall "adb shell pm uninstall -k --user 0 com.android.shell"

I copied the wrong one overlooking. I no longer have shell on my phone.

Andoid 11, oneUI 3.1

can anyone help?

Edit:

I have the shell.apk package, I pulled from another s10+ same phone and same OS version.

I install the apk by MIX Explorer to package installer. But it says app not installed.
Sorry for the late reply, did you fix it yet? There was another command shared here.
 

billa

Senior Member
Mar 30, 2006
751
358
I actidently uninstall "adb shell pm uninstall -k --user 0 com.android.shell"

I copied the wrong one overlooking. I no longer have shell on my phone.

Andoid 11, oneUI 3.1

can anyone help?

Edit:

I have the shell.apk package, I pulled from another s10+ same phone and same OS version.

I install the apk by MIX Explorer to package installer. But it says app not installed.


Try re-enabling using these methods.


adb shell cmd package install-existing com.android.shell

OR

Find the shell APK file and path via:

pm dump com.android.shell | grep path

then reinstall it via

pm install -r --user 0 <full_path_and_file.apk>
 
  • Like
Reactions: HemanthJabalpuri

beyenpe

New member
Nov 3, 2021
1
0
I disable the themes app but then needed to enable it back but now there's a "themes" icon on my home screen which was not there before. is there any way to get rid of it?
 

Термик

New member
Feb 10, 2022
2
2
You can reinstall an uninstalled app like this (no need for factory reset):

get the path for that app (that's the same awk does, in my case I want FM-Radio back):
Code:
pm dump com.android.fmradio | grep path

install the app:
Code:
pm install -r --user 0 /system/priv-app/FMRadio/FMRadio.apk

"cmd package install-existing com.android.fmradio" did not work on my LOS 14.1, because the parameter "install-existing" seems not to be implemented.
Failure [INSTALL_FAILED_INVALID_APK: Package com.android.systemui is a persistent app. Persistent apps are not updateable.]
What should I do? I removed SystemUI and I need to restore it asap!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 31
    A lot of people searched for a way to uninstall bloat or APKs using ADB because a lot of OEMs don't allow uninstalling many of preinstalled apps.

    Tested on Pie and Oreo.


    BUT most of the articles if not all of them ( couldn't find any article saying otherwise ) say that after using the command "adb shell pm uninstall -k --user 0 <name of package here>" to uninstall an app, you have to factory reset your phone to get these packages back which Is NOT TRUE.

    First method :-

    you can simply use "adb shell cmd package install-existing <package name>" in ADB and you'll get the package back .


    Examples:-
    adb shell pm uninstall -k --user 0 com.android.something
    adb shell cmd package install-existing com.android.something



    Tested and working on Android pie and Oreo on Samsung devices.

    Second method HERE

    Seems like some people can't get it to work with no helpful information so we can't help much.
    3
    You can reinstall an uninstalled app like this (no need for factory reset):

    get the path for that app (that's the same awk does, in my case I want FM-Radio back):
    Code:
    pm dump com.android.fmradio | grep path

    install the app:
    Code:
    pm install -r --user 0 /system/priv-app/FMRadio/FMRadio.apk

    "cmd package install-existing com.android.fmradio" did not work on my LOS 14.1, because the parameter "install-existing" seems not to be implemented.
    1
    It does work. Thank you!
    1
    I actidently uninstall "adb shell pm uninstall -k --user 0 com.android.shell"

    I copied the wrong one overlooking. I no longer have shell on my phone.

    Andoid 11, oneUI 3.1

    can anyone help?

    Edit:

    I have the shell.apk package, I pulled from another s10+ same phone and same OS version.

    I install the apk by MIX Explorer to package installer. But it says app not installed.


    Try re-enabling using these methods.


    adb shell cmd package install-existing com.android.shell

    OR

    Find the shell APK file and path via:

    pm dump com.android.shell | grep path

    then reinstall it via

    pm install -r --user 0 <full_path_and_file.apk>