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.
Related
Help please
I wanted to update a game that I was playing, but it was a modded apk. I deleted the one I had and went to download the updated modded apk but it wouldn't let me because it said "app not installed as package conflicts with an existing package". At this point I'm confused because the game is nowhere in my files like it's not there AT. ALL. so by this point I'm like let me try to download it from the play store and when I went to download it from there play store said "You cannot install this app because another user has already installed an incompatible version on this device". I don't know what to do anymore I've tried the adb command thing and it fixed nothing.
Edit: The fist time I used adb I used the code adb shell and then did $ pm uninstall -k --user 0 app.package it gave me the error "failure [not installed for 0]. by this time I had already uninstalled it but play store still said it was on my phone. Then I dug around some more and found out that the "-k" meant to keep the data and whatnot so I went back and re downloaded the app on my phone using adb and then deleted using adb, tried the play store it still had the same error message. I went back to the command prompt and typed adb shell pm uninstall --user 0 app.package and it showed "failure [not installed for 0].
Try dumpsys user or am get-current-user ...and then use the correct ID of the user, instead of 0.
PS: The personal and the work profile do have different user ID (this alone may cause confusion). Or try listing user-installed packages pm list packages -u -3?
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
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!
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"
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