Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Manually installing an updated APK fails with "signatures do not match the previously installed version"

Tags:

android

I've built a silly app to share among a few friends. No need to put it up on the app-store.

I built the first apk (signed), uploaded it to a web-server and all worked well.

A small issue arose, I fixed it, re-built, signed with the same keystore and uploaded it again. It now seems that I am unable to install from the new apk. The debugger tells me:

signatures do not match the previously installed version 

So I uninstalled the old version by opening the app drawer and dragging it onto the "uninstall" button. When opening "Settings -> Apps", I don't see it anywhere anymore. I don't see any traces of the app on my device.

Yet I still get the above error message.

Is it possible some information still lingers on the device somewhere? Is there any way I can verify that?

like image 920
exhuma Avatar asked Jul 18 '15 09:07

exhuma


People also ask

Why is my APK file not installing?

The Android app not installed error can be combated after resetting app permissions. Go to Settings > Apps > Reset App Preferences/Reset Application Permissions. After this, third-party software can be installed on your device.

How do I force reinstallation of an APK with different signature on rooted Android?

Go to 'Toolbox' tab in the buttom. Select 'Patch to Android'. Check 'Disable signature verification in the package manager'. Press 'Apply' and wait for your phone to reboot.


1 Answers

Yes It is possible if somehow your old application is not removed 100% or its data is not removed.

Try:

adb uninstall "com.yourapp.yourapp" 

If you don't know exactly what to put as replacement for "com.yourapp.yourapp", then you just open Android studio, Run your app while it is connected to a device and then look at Debug window.

It says:

 Waiting for device.  Target device: samsung-sm_t531-xxxxxxxxx  Uploading file  local path: C:\Users\myapp\app\build\outputs\apk\myapp.apk  remote path: /data/local/tmp/com.myapp.myapp  Installing com.myapp.myapp  DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.myapp.myapp"  pkg: /data/local/tmp/com.myapp.myapp  Success 

com.myapp.myapp in this case is the name of the package you must use to uninstall.

like image 102
Ehsan Avatar answered Sep 28 '22 18:09

Ehsan