How to install / get back uninstalled Apps (APKs) with ADB. - Android Q&A, Help & Troubleshooting
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.
Articles like https://www.xda-developers.com/uninstall-carrier-oem-bloatware-without-root-access/
Hi, doesn't works
Code:
/system/bin/sh: cmd: not found
It does work. Thank you!
Hi! Does this work on huawei p smart 2019 with android pie? Will ota work after that?
jazzh said:
Hi! Does this work on huawei p smart 2019 with android pie? Will ota work after that?
Click to expand...
Click to collapse
Has nothing to do with OTA. That code only installs apk.
JaviLerma said:
Hi, doesn't works
Click to expand...
Click to collapse
I need a screenshot or I can't be sure what you did wrong.
Vordx said:
Has nothing to do with OTA. That code only installs apk.
Click to expand...
Click to collapse
Gr8.
I successfully applied this in p smart 2019.
Not work
it doesn't work
barjani said:
it doesn't work
Click to expand...
Click to collapse
You typed install, not uninstall
jazzh said:
You typed install, not uninstall
Click to expand...
Click to collapse
i just copy paste command from the text above except the packages that i want to install again
"you can simply use "adb shell cmd package install-existing <package name>" in ADB and you'll get the package back ."
is it this thread to install back again packages or to uninstall packages?
i want to install back my packages, which I using command "adb shell pm uninstall -k --user 0 <name of package>" to uninstall it.
Try to find that apk and put in the folder of the command prompt call from pc.
barjani said:
i just copy paste command from the text above except the packages that i want to install again
"you can simply use "adb shell cmd package install-existing <package name>" in ADB and you'll get the package back ."
is it this thread to install back again packages or to uninstall packages?
i want to install back my packages, which I using command "adb shell pm uninstall -k --user 0 <name of package>" to uninstall it.
Click to expand...
Click to collapse
What version of Android are you running? What's the output of "ls -l /system/bin/cmd"?
jcmm11 said:
What version of Android are you running? What's the output of "ls -l /system/bin/cmd"?
Click to expand...
Click to collapse
android ver. 5.1.1 and android ver 7.1.2
on ver. 5.1.1 got "No such file or directory" but on ver 7.1.2 got "-rwxr-xr-x 1 root shell 21964 2019-03-07 12:23 /system/bin/cmd"
i want to re-install app on android ver 5.1.1.
is it posible to install back on 5.x.x? after seing output from 'ls' command on terminal
barjani said:
android ver. 5.1.1 and android ver 7.1.2
on ver. 5.1.1 got "No such file or directory" but on ver 7.1.2 got "-rwxr-xr-x 1 root shell 21964 2019-03-07 12:23 /system/bin/cmd"
i want to re-install app on android ver 5.1.1.
is it posible to install back on 5.x.x? after seing output from 'ls' command on terminal
Click to expand...
Click to collapse
You sure it's uninstalled using ADB and not root ?
Vordx said:
You sure it's uninstalled using ADB and not root ?
Click to expand...
Click to collapse
Yups ... it's uninstalled with ADB command, i just follow from this article https://www.xda-developers.com/uninstall-carrier-oem-bloatware-without-root-access/ to unistall and no root access.
Sent from my L697 using Tapatalk
Im also having similar problem, uninstalled through adb, but when i try to reinstall it, it gives error
/system/bin/sh: CMD: not found
djinn_tyagi said:
Im also having similar problem, uninstalled through adb, but when i try to reinstall it, it gives error
/system/bin/sh: CMD: not found
Click to expand...
Click to collapse
It works for me (windows cmd prompt), should be the same in linux terminal:
type
1) adb shell
and within the shell type:
2) cmd package install-existing <name of package>
alternatively type directly from command prompt:
adb shell cmd package install-existing <name of package>
Tried running this on Android 6 on my moto G4, install-existing is NOT a listed argument for pm, and now my phone is dead since I can't reinstall a removed app. Wonderful.
the OP should update thier post that this is ONLY for Android versions 7 and higher. It will not work on android 6 or lower.
For you guys getting this error:
"/system/bin/sh: cmd: not found"
Not all android versions have the "cmd" utility in "/system/bin".
Related
[Q] move Apps to SD Card
Hello all, i have a non rooted device with Android 5.x I try to move big Apps like facebook and chrome to SD card, and I followed the procedure with adb: --> adb shell pm set-install-location 2 but I receive the error: Error: java.lang.SecurityException: Package android does not belong to 2000 did anyone see this before, or can anyone guide me how to move Apps which are by default non-movable to SD Card? Thanx
You can do this by rooting and using link2sd.
Thanks How to root android 5.x I rooted the previous android version, but this version seem to have a different method
aluay said: Thanks How to root android 5.x I rooted the previous android version, but this version seem to have a different method Click to expand... Click to collapse use search http://forum.xda-developers.com/g2-mini/development/root-root-g2-mini-lollipop-t3123652
You need root ---impossible without root!--- but, AFAIK, not necessarily App2SD. Just adb; but with the following syntax (yours is wrong): $ adb shell <ENTER> $ su <ENTER> # (now you are root, see changed shell sign) # pm set-install-location 2 <ENTER> (you are done, CHECK it to believe # pm get-install-location <ENTER> # 2[external] SUCCESS!
How to uninstall apps
We can uninstall apps from the watch.I tried and it works.Be carefully what kind of app you erase!!! You can uninstall without problem the following aplications:Alipay(system),ximalayasound(system),hmtvhelper(system) and 3rd party (or non-system). You need installed adb!!! Firts you need to have root acces to watch! type in adb- Code: adb root To list all the installed packages on device, use the following syntax. Code: adb shell pm list packages To list only the system packages, use the “-s” option. Code: adb shell pm list packages -s To list only 3rd party (or non-system) packages, use the “-3” option. Code: adb shell pm list packages -3 To uninstal use the: Code: adb uninstall -k --user 0 (name of the package) Example: Code: adb uninstall -k --user 0 com.alipay.android.hmwatch
krepsz said: We can uninstall apps from the watch.I tried and it works.Be carefully what kind of app you erase!!! You can uninstall without problem the following aplications:Alipay(system),ximalayasound(system),hmtvhelper(system) and 3rd party (or non-system). You need installed adb!!! Firts you need to have root acces to watch! type in adb- Code: adb root To list all the installed packages on device, use the following syntax. Code: adb shell pm list packages To list only the system packages, use the “-s” option. Code: adb shell pm list packages -s To list only 3rd party (or non-system) packages, use the “-3” option. Code: adb shell pm list packages -3 To uninstal use the: Code: adb uninstall -k --user 0 (name of the package) Example: Code: adb uninstall -k --user 0 com.alipay.android.hmwatch Click to expand... Click to collapse Is it safe to uninstall mi home app? What package is it? Enviado desde mi Mi-4c mediante Tapatalk
Yes you can.
siba01 said: Is it safe to uninstall mi home app? What package is it? Enviado desde mi Mi-4c mediante Tapatalk Click to expand... Click to collapse Yes,you can uninstall Mihome app without problem.I did too.Use the -s command from the first post to found it in system app list.
krepsz said: Yes,you can uninstall Mihome app without problem.I did too.Use the -s command from the first post to found it in system app list. Click to expand... Click to collapse I tried to find it... But I didn't see the package... Enviado desde mi Mi-4c mediante Tapatalk
siba01 said: I tried to find it... But I didn't see the package... Enviado desde mi Mi-4c mediante Tapatalk Click to expand... Click to collapse Do the command and make screenshot from that. Put here and we have a look. Make it also from 3rd part apps.Maybe its there.
Is it possible to install mihome on a watch with US firmware?
nembal said: Is it possible to install mihome on a watch with US firmware? Click to expand... Click to collapse I don't know. Wanna give it a try?
Sure, I have a few Xiaomi products in my household.
Hi! Is it possible to reinstall app which previuosly installed? eg Smart Home ?
luqsus said: Hi! Is it possible to reinstall app which previuosly installed? eg Smart Home ? Click to expand... Click to collapse If you are on custom rom, just reflash it, or you can found in update.zip-apps map. Unzip and flash it by adb.
siba01 said: I tried to find it... But I didn't see the package... Click to expand... Click to collapse It's com.huami.smarthome
Hello I need your help I want to uninstall some app but I have this message : Last login: Sat Nov 11 09:24:19 on ttys000 iMac:~ lazouille83$ adb devices List of devices attached 0dfa2905 device iMac:~ lazouille83$ adb uninstall -k --user 0 com.huami.watch.ximalayasound The -k option uninstalls the application while retaining the data/cache. At the moment, there is no way to remove the remaining data. You will have to reinstall the application with the same signature, and fully uninstall it. If you truly wish to continue, execute 'adb shell pm uninstall -k' .iMac:~ lazouille83$adb shell uninstall -k --user 0 com.huami.watch.ximalayasound /system/bin/sh: uninstall: not found iMac:~ lazouille83$ Click to expand... Click to collapse Last login: Sat Nov 11 10:05:33 on ttys000 iMac:~ lazouille83$ adb devices List of devices attached 0dfa2905 device iMac:~ lazouille83$ adb root adbd is already running as root iMac:~ lazouille83$ adb shell [email protected]:/ # adb shell uninstall -k --user 0 com.huami.watch.ximalayasound /system/bin/sh: uninstall: not found [email protected]:/ # Click to expand... Click to collapse What can I do ? I'm running on MAC OSX And where is the folder on MAC to put the files as update.zip, Before I used windows and it was easy but now I don't know thank you
thanks great help
Help guys! I have windows 10 os so when holding shift key + Right Click i have "Open power shell windows here" and after it opened. No promt allowing computer to grant. Or is there other way to uninstall pre installed apps in Samsung android phones?
deathnote08 said: Help guys! I have windows 10 os so when holding shift key + Right Click i have "Open power shell windows here" and after it opened. No promt allowing computer to grant. Or is there other way to uninstall pre installed apps in Samsung android phones? Click to expand... Click to collapse Yes, there is (not actually uninstall, but disable). But this is the wrong forum and an old thread. Search in your phone model's forum and I am sure you'll find out how.
lfom said: Yes, there is (not actually uninstall, but disable). But this is the wrong forum and an old thread. Search in your phone model's forum and I am sure you'll find out how. Click to expand... Click to collapse Thanks man for the info. Already hitted thanks
i use apkinstaller to uninstall, work well!
Can't access ADB Shell - PM through command terminal
Phone: Samsung S6 Carrier: T-Mobile I am unable to get PM to list any of the packages on my phone even though it's connected (I confirmed with adb devices). When I try to to run the command Code: pm list packages | grep '<OEM/Carrier/App Name>' it simply loads another line to enter a command, and no packages are listed. I tried installing App Analyzer and getting the package names that way. After obtaining a package name for an app I wanted to uninstall, I tried entering the required command Code: pm uninstall -k --user 0 <app name> Again, it just loads another line to enter a command, no success or fail message.
How to delete PayJoy? Samsung A720F (2017)
Hello. Could you please tell me how to remove PayJoy app from the phone?
Help me remove payjoy app
I think you only can DISABLE it - might be Android must got rooted before. Using ADB commands Code: adb devices adb shell "pm list packages -e | grep 'payjoy'" [color=red] <- this gets the package name used in next line[/color] adb shell "pm disable-user --user 0 [color=blue]com.payjoy.status[/color]" [color=red]<- here you enter the [color=blue]true package name[/color] retrieved in previous line[/color] adb shell "recovery --wipe-data"
Debloat/Disable System Apps
So you got your new shiny realme device but you hate bloatware or want to disable system apps so you can use 3rd party apps instead? Follow the steps below: THIS DOES NOT REQUIRE ROOT HOWEVER MAKE SURE NOT TO DISABLE IMPORTANT SYSTEM APPS. WIPE DATA/FORMATTING RE-ENABLES ALL SYSTEM APPS. THIS DOES NOT MESS WITH OTAs. WHAT YOU NEED:- ADB/Fastboot Drivers Windows: https://dl.google.com/android/repository/platform-tools-latest-windows.zip Linux: https://dl.google.com/android/repository/platform-tools-latest-linux.zip DEBLOAT:- 1. Enable developer options by tapping on the build number 7 times and enable USB Debugging. 2. Plug in your phone. 3. Goto the folder where ADB is installed, hold shift and right click, and click on open command window here(windows). 4. Type in CMD Code: adb devices in Powershell Code: ./adb devices . 5. This should return the ID of your device and show if its authorised. Enable debugging Promt on your Phone if it shows unauthorised (allow this computer). 6. Type in cmd Code: adb shell in Powershell Code: ./adb shell . 7. This should display a prompt, something like RMXxxxx:/ $ 8. To uninstall type Code: pm uninstall -k --user 0 <name of the package> To disable type Code: pm disable-user --user 0 <name of the package> eg: pm uninstall -k --user 0 com.heytap.browser / pm disable-user --user 0 com.heytap.browser 9. Done! To reinstall uninstalled apps type Code: pm install-existing <name of the package> To enable disabled apps type Code: pm enable <name of the package> Some apps do not uninstall such as market and gamecenter, disabling is the only option.
thanks. It was much needed.
Won't it be better if you have created list of removable apps? Other than sharing guide which everyone knows