Search code examples
androidapkadb

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?


Solution

  • 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.