Can INSTALL_FAILED_UPDATE_INCOMPATIBLE cause issue with release version? - android

Recently I updated my windows (from 8.1 to 10). After working on my app that I used to debug on 8.1, when I try to run from w10, I get INSTALL_FAILED_UPDATE_INCOMPATIBLE. Now I assume this is caused by different fingerprint of new Windows version, the debug version was signed by previous one and they dont match.
My question is : can this cause problem when building a release version too? Will the data of my users be wiped by this or the keystore will take care of that (because they release keystore didnt change therefore on deployed devices it wont complain)?

As long as you are using the same release keystore, then the release version will work to upgrade the current application, and no data will be lost. If the keystore changes, you cannot upgrade the application, and any new version would require a complete uninstall of the old one.
Also, if your application is on the Play Store, you would not be able to upload the APK anyway if the keystore did not match, so the error will be caught before it gets to users.

Related

Manually updating installed signed APK

I have an app on google play store right now.I just move my previous java code to kotlin since It is much easier for me. The package are all the same. Problem is on my android studio, when I try to execute the release variant I keep having this install_failed_update_incompatible error. On my searching, I have to remove the old app. Now I am a bit worried. I don't my user base to uninstall the app let alone erase all their data. Is there a way I could update the app without uninstalling it? Sort of like when you update an app from google play store? The data and information are retained except that the old apk is remove?
Everything is the same with my previous java project except that now I am using kotlin. package and even the apk signed key are all the same.
PS on emulator(genymotion) the updating works and even retained the previous information data. but on real device it won't
Turns out the apk file release from google play store is a bit different. I don't the difference. I have my old java project executed on release variant on my device and then execute the kotlin version release variant. The update went okay. However when I downloaded my app on google play store and then updated it with my new kotlin version release variant, it failed. Im not sure why but it seems that apk submitted to google play store is being modified.

INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES

I know this question has been asked so many times here on the StackOverflow and the solution for this problem was given as "Uninstall previous version and then install"
My Problem:
I have made an app for the client and shipp that apk to him he has installed it on his devices. I have delivered him 3 to 4 APK. and all he need to do is to get the Apk and install them (this is a procedure I have made in app by downloading newest version from my server and then installing new version using installer)
Now for some reasons I have to uninstall and intall my Android studio. I also did upgrade it to new version 3.1. Now that I have to make some changes and I have to ship the new APK in debug mode. I have shipped the APK. but its just not getting installed on client devices. Also I can generate same case on my device.
I can not afford to let the client to do this work (uninstall previous version and then install the newer version)
What I found on internet? I got to know after doing some research on internet. And that is the debug.keystore is the problem. All apks needs to be signed with same certificates and keystore. I have read that its the case with the realsed version of APK but I wonder if it is the case with the debug apk too.
Any Solution ?
Now please tell me If I can get my previous keystore? can I get any thing from previous debug APK ? any solution and work around except installing and uninstalling APK ???? please help
Note:
For some reasons I have not made it release version and I also did not upload it on the server.
You should probably make a keystore(link here) and back it up somewhere safe for all your future releases. Then if you sign it from the same keystore for future builds, you should not run into these issues.
There shouldn't be a reason to ship debug apk unless your client has a specific request because the they are as the name suggests open to debugging by potential attackers.
You should also check proguard if you care for security of your apks

"App not installed" message when installed apk

So I have an app on the Play Store that I released about a week ago. I've done a ton of work to to it since and I'm basically going to rebrand it a bit.
When I first released the app, I put it up on the app store with the name "First Name of App" (obviously not the correct name). I now have an update ready to publish with a lot of changes, and one change is that the app name is now "Second Name of App". It's all under the same package yet, I just changed the name using the Manifest.
I'm having an issue though with testing. Currently on my own phone, I have the version of the app that is currently on the Play Store installed.
I generated a signed APK using Android Studio (all with the same settings and key passwords and such). I then put that signed apk on my phone for testing, and when I try to install it I get the "App not installed" message.
Things I have tried:
Uninstalling the previous APK and then installing the newer version. If I uninstall the Play Store version first, and then install the newer signed APK version, it installs fine. The problem with this though is that I lose the data that I had in the Play Store version. I can't have that.
Changing the "versionCode" and "versionName" numbers in the build.gradle. I made sure both numbers are higher than what the Play Store version is, but I still get the same "App not installed" message.
Making sure the settings while generating the signed APK are the same. All of the settings are exactly the same. The signature version checkboxes are both checked yet also, as they were with all previous versions.
Anyone have any ideas what could be going on? I really would like to release this update but I'm afraid if I just upload this signed apk to the store that everyone would have the same issue, and that they'd be forced to uninstall the current version they have (resulting in data loss).
The problem seems that you are trying to install an APK with the same package name but different key and that creates a conflict. Android only considers an App to be the same if both package name and key signature are identical.
Keys are unique, even if you use the same settings and passwords each time you create a key a new unique key is created and it will be always different to the key you used in the Play Store release.
The only way to install the APK is to uninstall the Play Store version.
And that serves to emphasize how important it is to keep the key used in the Play Store, if you lose it you will not be able to upload new updates.
UPDATE
If your have "Google Play App Signing " activated for you app, the key used when an user installs the app from Play Store is different than the one you used to upload the release to the Play Console.
https://support.google.com/googleplay/android-developer/answer/7384423?hl=en
Have you by chance changed the minimum SDK version or anything like that? I've had a similar issue. I've an app on the PlayStore which I tried upgrading with an APK with the same signature as that of the PlayStore version but a different minimum SDK version. When I tried installing I get the 'app not installed' error. I then uploaded this APK on the PlayStore. On my device, the app on the PlayStore now shows two options 'Uninstall' and 'Open'. Due to your conflict, users will have to first uninstall the app and install it again. There will be no 'Update' option due to the conflict. Hope this helps :)
Similar Issue
Android Phone: Google Pixel3, Android 9
install youtube apk, but error:
Application Not Installed = App Not Installed
Final Solution
use adb's pm to install apk
even same error, but can show/known the fail reason
then can find specific solution to fix it
Examples
here later encounter many error cases:
blueline:/storage/emulated/0/Download # pm install /data/local/tmp/com.google.android.youtube_16.29.36.apk
pm install /data/local/tmp/com.google.android.youtube_16.29.36.apk
Failure [INSTALL_FAILED_VERSION_DOWNGRADE]
or:
blueline:/data/local/tmp # pm install youtube_16.29.36_addedDebuggable.apk
pm install youtube_16.29.36_addedDebuggable.apk
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Failed to collect certificates from /data/app/vmdl445467286.tmp/base.apk: Attempt to get length of null array]
then google it and find specific solution to fix it, install apk successfully.

Android Cordova App not Installed issue

we currently have an app that has been in usage for several years now. We are currently facing an issue with deployment where users are failing to install updates to the existing app.
this is the error they see when trying to install on an android device:
As far as I can tell the app is being correctly signed with the proper certificate. I even checked the previous release apk with the new release/update apk. both the certificate seem to match perfectly.
the only thing I can recall being changed is I have switched to a newer PC, my old PC is gone and now I am working with visual studio 2017 instead of the previous visual studio 2015 to build the release apk files from cordova still using the same keystore file to sign the release apk. would switching computers impact the signing of the apk even though the keystore file is still the same?

Xamarin Debug Keystore Seems to have Changed

I am developing an Android Application using Xamarin.Android in Xamarin Studio. It uses Google Play Game Services.
The project has run and tested find up until this point. Yesterday I upgraded my development PC from Windows 7 to Windows 8.1. In the process I also had to reinstall Xamarin Studio.
Now when my app attempts to connect to Google Play, it fails with error "RESULT_APP_MISCONFIGURED" which as far as I can tell means that my app is not properly authorized to access the Google Play API. However, nothing has actually changed.
I tested an older version of the app, and it is still able to connect to the Google Play API. Nothing in the code itself has changed, so I think it must be something to do with my recently upgrade of Windows, or the recent re-install of Xamarin Studio.
Any thoughts on what would help narrow down the problem? Is it possible the debug keystore has changed somehow?
An additional clue: when I attempt to build an deploy to a device that has the older, working version of the app on it, I get the following error:
Deployment failed because of an internal error: Failure
[INSTALL_FAILED_UPDATE_INCOMPATIBLE]
I then have to manually uninstall the old version before the new one can be deployed.
As has already been pointed out, the debug keystore won't be the same on all installations of Xamarin.Android. Which is expected behavior.
When using Play Services you want to create a keystore, preferably one for debug and one for release, or as different aliases in the same keystore (you figure that out).
Then you can make the build process automagically sign your app by adding some stuff to your .csproj file. You can read more about this in the docs.
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<AndroidKeyStore>True</AndroidKeyStore>
<AndroidSigningKeyStore>public.keystore</AndroidSigningKeyStore>
<AndroidSigningStorePass>MyKeystorePassword</AndroidSigningStorePass>
<AndroidSigningKeyAlias>MyKey</AndroidSigningKeyAlias>
<AndroidSigningKeyPass>MyKeyPassword</AndroidSigningKeyPass>
</PropertyGroup>
You can make a similar block for Debug as well choosing either another alias or another keystore.
Yes, debug keystore is part of the Xamarin installation and it changes if you reinstall Xamarin. You need to update the key signature on Google console, this time create a keystore and keep it hidden, keep it safe (so to speak).

Categories

Resources