I'm dealing with a pretty major malware issue on an Elite 6.0L+ Sky Device. I'm working with a fellow from the malware bytes forums trying to get it cleaned out. I'm trying to uninstall a few apps through adb via command prompt but it's throwing errors.
adb pm shell pm uninstall com.wouzee.hispanopost
That command throws the error:
Failure [DELETE_FAIL_INTERNAL_ERROR]
If I try it as
adb pm shell -k --user 0 uninstall com.wouzee.hispanopost
Then is throws: Failure [no installed for 0]
I have managed to uninstall other things using these commands but the two things I've been told to remove both throw these same errors when I try to remove them.
Does anyone have any idea how to get around this?
I was having the same problem uninstalling with:
adb shell
pm uninstall <package>
This is what worked for me eventually:
adb shell
pm uninstall --user 0 <package>
Some Apps are prevented from uninstalling. You can disable them instead. Use following command on adb shell:
pm disable-user --user 0 <package>
Here is my solution, I uninstall some system apps come up with [DELETE_FAIL_INTERNAL_ERROR] too
use adb shell su to enter shell mode
then using pm uninstall --user 0 <your-pkg-name> to uninstall
PS: if only use adb shell my situation will generate error too, the su is the key to solve problem
Related
I tried to use the following code, but reported to me "shell does not declare android.permission.REQUEST_INSTALL_PACKAGES"
adb shell am start -a android.intent.action.VIEW -t "application/vnd.android.package-archive" -d "file:///sdcard/Download/a.apk"
I am sad that for some reasons, adb install is not allowed, even if I run the following command, I still cannot install the application
adb shell settings put global verifier_verify_adb_installs 0
adb shell settings put global package_verifier_enable 0
log:Failure [INSTALL_FAILED_VERIFICATION_FAILURE: adb install not allowed!]
I am trying to skip the chrome welcome screen when running tests. The problem is other solutions that I have found like this one don't seem to work anymore.
Commands used:
$ adb shell pm clear com.android.chrome
$ adb shell 'echo "chrome --disable-fre --no-default-browser-check --no-first-run" > /data/local/tmp/chrome-command-line'
$ adb shell am start -n com.android.chrome/com.google.android.apps.chrome.Main
The solution for me was actually a combination of the question and this answer. The solution can also be found in another question/answer, though it's not entirely clear.
The following should work:
$ adb shell am set-debug-app --persistent com.android.chrome
$ adb shell 'echo "chrome --disable-fre --no-default-browser-check --no-first-run" > /data/local/tmp/chrome-command-line'
$ adb shell am start -n com.android.chrome/com.google.android.apps.chrome.Main
Some notes:
In the Chromium project documentation, it's mentioned that for the command line file to be used, the user should
"Enable command line on non-rooted devices" in chrome://flags
Setting Chrome as the debug application replaces this requirement.
In older device versions, the command line file was expected in /data/local. This folder is no longer writable from adb shell in non-rooted devices, so /data/local/tmp should be used instead. This is documented in this bug
In the ChromeSwitches.java current source code, only --disable-fre still exists. The other flags might be required in older Chrome versions, but I didn't verify.
What is your OS version? It is working on Android 10. You can try the below commands:
$ adb shell pm clear com.android.chrome
$ adb shell am set-debug-app --persistent com.android.chrome
$ adb shell am start -n com.android.chrome/com.google.android.apps.chrome.Main
What i want
I want to remove some google Apps with a shell script, started from my windows client using adb.
What is the problem
When I use following command in command prompt using adb / shell it works.
pm uninstall --user 0 com.google.android.apps.maps
But when I put the same command into a shell script, push it to my phone and try to run it - it gives the app is not installed error!
I solved the problem with a little workaround.
I just start the pm uninstall command also from the batch and do not push it to the device.
Like this: (uninstall.bat)
adb shell pm uninstall --user 0 com.google.android.gm
adb shell pm uninstall --user 0 com.google.android.apps.maps
adb shell pm uninstall --user 0 com.google.android.youtube
pause
The script you created on your Windows system contains MS-DOS/Windows style newlines (i.e. \r\n). Android shell uses Linux style newlines (\n). So your script gets an extra \r character at the end of every line and your
pm uninstall --user 0 com.google.android.apps.maps becomes pm uninstall --user 0 com.google.android.apps.maps\r.
Your script tries to uninstall a package named com.google.android.apps.maps\r - which does not exist.
To fix the issue you need to remove all those \r from your script after pushing it to the phone using sed -i 's/\r$//' script.sh command for example.
I've connected the smarthpone (rooted) to the PC (Linux) with ADB.
Eveything works fine excepts the fact that I can't unistall apps from shell. I've tried :
adb unistall com.mirsoft.passwordmemory
adb unistall -k com.mirsoft.passwordmemory
And I get the help message as return.
I've also tried:
adb shell pm unistall com.mirsoft.passwordmemory
adb shell pm unistall -k com.mirsoft.passwordmemory
Getting as return
Error: unknown command 'unistall'
followed by the help message.
Other commands works fine.
Am I doing something wrong?
uninstall has an n after the i. Use adb uninstall com.mirsoft.passwordmemory.
You can also try to uninstall with the rm command:
adb shell rm com.mirsoft.passwordmemory
Don't forget typically the su command to grant the super user permissions.
I can uninstall an app on the device from my computer using adb uninstall <package_name>,
but I'd like to do the same with a script on the actual device.
I've also tried running an android.intent.action.DELETE intent using am but it prompts the user for confirmation.
Given that the device is rooted, is it possible to run a command on the device to uninstall an app without requiring user action/confirmation ?
Trying using the pm command:
pm uninstall <package_name>
or
pm uninstall -k <package_name>
The -k flag keeps the data and cache directories after the package is removed.
I haven't tested this myself, but I don't think this should show a warning message.
To forcefully uninstall the system user apps:
Use:
adb shell pm uninstall --user 0 <package_name>
adb shell pm uninstall *your.package.name*
Did the trick for me.
And if you want to re-install back package removed for a user (i.e. pm uninstall --user 0), without root:
pm install --user 0 $(pm dump <package name> | awk '/path/{ print $2 }')
This will locate .apk of the uninstalled package: pm dump <package name> and search for a line starting with path: to obtain path to the .apk (note that pm path <package> won't work for an uninstalled app) and install it using pm install --user 0 (note that pm install without --user argument wont' work).
This works for any system app, this is a good alternative to pm disable-user <package> which still allows you to easily enable app back via Settings.
For example, you could uninstall Play Store (pm uninstall --user 0 com.android.vending) and have no way to enable/install any application on default non-rooted device without access to adb or pm.
Some Apps can't be uninstalled,so below command gives the error:
adb shell pm uninstall package_name
Failure [DELETE_FAILED_INTERNAL_ERROR]
Try to run disable command instead,
adb shell pm disable package_name
Package package_name new state: disabled
I had fail on uninstall some system launchers (for example NovaLauncher)
In this case I recommend to use "disable" instead "uninstall":
pm disable <package_name>
In result you hide this system launcher (sys app) from list of launchers when you have a few launchers
Simple command to remove any app from the device, try this:
pm uninstall --user 0
This command will forcefully remove that app from the device.
If you have an rooted android device then you can easily uninstall pre-installed apps from your device. My OnePlus device is rooted with Magisk manager.
Rooting an Android device gives you admin privileges towards your device and so you can easily install or uninstall any system application.
However, command line method also works most of the time. I have tested adb method on MIUI device for removing bloatware.
You can follow stackoverflow read this thread....
ADB command: pm uninstall -k <package_name>
Trying using the adb command:
adb uninstall <package-name>
make sure your device is connected