Failure - not installed for 0 - android

I am trying to uninstall a few Google APKs that were preinstalled on an older smartphone I have.
I must do it via ADB because it's not possible to do it via regular uninstall
I found a guide on how to remove those APKs using ADB, but when I try to remove a certain Google package, for example com.google.apps.plus, using the following command:
pm uninstall -k --user 0 com.google.apps.plus
I get the following error: Failure - not installed for 0
What am I missing?

Even I was facing the same issue. For solving this problem just make sure that you have the latest USB drivers for your device. You can get your drivers from Android Devs Website. This is a list of all major OEM's compiled by google. Then download ADB tools from here. After ensuring the above steps, download any App Inspector application from play store for getting the exact package name of the apps.
In your device's Developer Options,turn on USB debugging. Open Windows PowerShell where you have downloaded the ADB tools.To see if ADB is working use .\adb command.
Then use .\adb shell for activating adb shell. Then use this command for removing the packages pm uninstall -k --user 0 <package name>. You will get package name in the App Inspector application.

In my case I had the weverse app, what I did was:
Open the app (it required me to update it)
Update the app in the PlayStore
Close the app Uninstall with the common command
pm uninstall -k --user 0 "package name"

Related

uninstall app fully still appears the error INSTALL_FAILED_VERSION_DOWNGRADE when I install my app

background:
1. I have installed the APK with the 1.1.30 version built by flutter.
2. I want to install it back to 1.1.29
3. I uninstall the 1.1.30 app.
4. I install the 1.1.29 package, and it will throw the error package appears to be invalid.
5. I try to use ADB to install it, but the error will change to INSTALL_FAILED_VERSION_DOWNGRADE: Package Verification Result
6. no idea why the app built by flutter will cause this issue, even if I uninstall the app fully.
7. the solution is using ADB install -r -d [path_to_debug_apk] to replace and downgrade the app.
can someone explain why this happened? is the app can not uninstall completely? thanks.
also refer to this link: Error: ADB exited with exit code 1 Failure [INSTALL_FAILED_VERSION_DOWNGRADE]
it seems the same to me who still can not install it even though the app was removed.
some information added:
I used adb shell cmd package list packages, can not find my app but the command with adb shell dumpsys package[pageckage name] can find my app.
so weird

How to fix "signatures do not match previously installed version" error?

First, I have already uninstalled this app from my Huawei tablet device.
Now, I want to reinstall the APK with same package name using adb command line from my Mac.
./adb install ~/myapp.apk
I got this error:
Performing Streamed Install
adb: failed to install myapp.apk: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.example.myapp signatures do not match previously installed version; ignoring!]
From browsing around, I learn that perhaps the app did not uninstalled correctly. So I use adb shell.
$./adb shell
Device:/$ pm uninstall com.example.myapp
Failure [DELETE_FAILED_INTERNAL_ERROR]
Device:/$ pm uninstall --user 0 com.example.myapp
Failure [not installed for 0]
Device:/$ pm list package | grep myapp
(empty result)
Device:/$ pm list package | grep google
package:com.google.android.inputmethod.latin // which means list package & grep working fine
Device:/$ pm list package -u | grep myapp
package:com.example.myapp // which means pm already acknowledge myapp is uninstalled
So at this moment, I'm at loss. Even adb shell cannot see the app package. But still, when I try to install the APK, I get the error above. How can I resolve this?
For people still facing this issue, yes this issue is still unresolvable to this date. At least I have found out why the issue happens, which is apparently because when I remove an app, Huawei asks whether I would also want to remove the app's data or not. I answer "no". And once you answer "no", you'll never be able to reinstall that app on that device ever again, because of the residue of the app data on your device. And I have tried my best to remove any residue by any means, I still cannot reinstall the app.
Only one cure works: reset factory settings. I did this and now I can reinstall the app. Of course, that means the data will be lost. But at least there's a Huawei backup app, so there's that.

ADB installs apk but doesn't show under packages

I am trying to uninstall an old version of my app, and reinstall the new version via ADB on a Lollipop Android device. These are my current steps:
adb uninstall com.company.mypackagename
adb install app-release.apk
adb shell pm list packages
The original uninstall of my old app was successful and the app disappeared from the Android 5.5 device.
The new attempt to install the upgraded app returns:
adb install app-release.apk
Performing Push Install
app-release.apk: 1 file pushed, 0 skipped. 10.7 MB/s (822124 bytes in 0.073s)
pkg: /data/local/tmp/app-release.apk
Success
but when I run a list of the packages, my new APK package is not there.
adb shell pm list packages
When I try to run it anyway:
adb shell am start -n "com.company.mypackagename/com.company.mypackagename.MainActivity"
I get:
Error: Activity class {com.company.mypackagename/com.company.mypackagename.MainActivity} does not exist.
So obviously it is not installing correctly, as it is not showing in packages and unable to run - even though it shows Success. What is the best way to troubleshoot this? Any help appreciated!
I finally found the issue!!!
I'm posting here because I spent way too much time trying to figure this out, since it wasn't giving me any error messages.
I was able to get a copy of the original APK from the deployment team and analyze their AndroidManifest.xml, and saw that the original APK package name was all lowercase: "com.company.mypackagename" but the one I was building was actually using Camel-Case "com.company.myPackageName". When I tried to install it, ADB should have given an error similar to: "Application ID Does not Match", but instead it just repeatedly gave me a response of: "Success".
Hopefully this saves someone else some time!

android uninstall package from within device

I need to uninstall some package on my Android phone. This app is not listed by the Application Manager
Using Terminal Emulator, I can see the package using pm list packages | grep com.mycompany.mypackage
However pm uninstall com.mycompany.mypackage gives me
Failed to connect to dumpstate server
Killed
Since pm sees the package I would think I am not that far.
I also tried abd uninstall com.mycompany.mypackage which just stalls at
- waiting for device -
It may be noteworthy that this package is an Android Wear App. Hence it contains a mobile app which wraps a wearable APK (which gets deployed on the wearable). For clarity I am only caring about the phone for now.
Note: Rooting the device is not an option.
Can I get rid of this package from Terminal Emulator?
I had to go adb shell on Computer --USB--> Phone, which I was trying to avoid.
Terminal Emulator clearly doesn't have the same reach as adb shell
Follow the step to enable the debug mode on your device until you get something when you run
adb devices
http://www.companionlink.com/support/kb/Enable_Android_USB_Debugging_Mode
And try again with
adb uninstall your.package.name

Unable to install apk in android emulator

I am trying to install an apk (downloaded from one site) in ICS emulator through adb shell but its giving following error:
Failure [INSTALL_FAILED_UID_CHANGED]
What could be the issue?
Simply rm -r the data directory in question. If you were installing and got this error, you'd simply run "rm -r /data/data/com.app.class" from an ADB shell. If you want to try preserving the data, you could find the proper UID and then "chown -R UID:UID /data/data/com.app.class".
In Android, the part of the source code that handles installing apps is PackageManagerService. Since the Android source is public, it's easy to see where Android will throw a INSTALL_FAILED_UID_CHANGED error. If the following is true: the package you are installing already has a data directory AND the permissions on that data directory are different than the UID assigned to this package, you'll get that error.
Uninstall the previous version of the app from the emulator first, then try again. You can do this by visiting System Settings > Applications > Manage Applications and selecting the app.
If the app still fails to install, then start the emulator with the Wipe user data option selected.
Open command prompt and write below code in it:
adb devices
This will list down the number of devices attached or are active.Copy your apk in your System folder
adb -s DEVICE_NAME install YOUR_APK_NAME
through this you will be able to install your particular apk on the device by giving device name in above line.

Categories

Resources