How to get / install 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
18
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
18
4
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
436
177
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

Top Liked Posts

  • There are no posts matching your filters.
  • 26
    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.
    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.
    1
    It does work. Thank you!
    1
    @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 ;)
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone