different application signatures BUT same keystore - android

when I updated my android app i got the following error message:
Re-installation failed due to different application signatures.
You must perform a full uninstall of the application. WARNING: This will remove the application data!
Please execute 'adb **' in a shell.
Launch canceled!
I personally got no problems with that but my question now is ... if I export the apk with the same keystore I used for previous updates. Is the app update a simple download for my users ?
Or will they have any problems with it ?
Btw: I didnt format my computer or changed anything about my eclipse folder or my folder where I save my keystore etc.
Thanks in advance!
Greets

Is the app update a simple download for my users ?
Only if it was signed by the same production signing key as you used originally, which would not appear to be the case here.
I didnt format my computer or changed anything about my eclipse folder or my folder where I save my keystore etc.
Despite that, you attempted to update an APK with one signed by a different signing key (e.g., debug vs. production). Use jarsigner -verify -verbose -certs ..., where ... is the path to your APK, to dump signing information, so you can compare your old APK to your new one.

Related

What may the reason of change in app signature even i used the same keystore for android app

I have published an app at Play Store. Now i made some changes in my application and used the same key store with key alias and key password to generate signed apk with new version. When i tried to update this app, it says that the previous version have different app signature,
here is the list which i have changed in new version
Changed the Launcher activity
Added new activities
added two more receivers
added more use permissions
If you need Manifest of my previous and new version app then i will upload it
This from logcat while updating app
09-11 11:41:13.591 18410-18437/? I/seatbelt: Scan for verification results 'clean' = com.vovoapps.freesms
09-11 11:41:14.391 2730-2913/? I/MSTG: com.vovoapps.freesms is installing..
09-11 11:41:14.451 2730-2913/? W/PackageManager: Package com.vovoapps.freesms signatures do not match the previously installed version; ignoring!
Compare the certificates of both the apk's by using below commands.
keytool -list -printcert -jarfile app.apk
If its not same then you might have missed something
I had exactly the same issue. I kept looking and couldn't solve it. Then finally I found the answer. I searched for all the apk's ever generated by me and then put all of them, one by one, on an online apk signature verifying site.
Fortunately, one of the apk had the same signature as the one displayed on developer console in error. So I went to that apk's folder and took the .jks file and signed my apk with that .jks.
This resolved the issue. I would say that you must have used keys of any of your other app mistakenly instead of the one which are in the project folder. So go and check signatures of all your .jks files and see which ones match the required one.

Error while Installing .apk file through adb

I am trying to install an apk file on my Android device using ADB with the following command:
E:\adt-bundle-windows-x86-20131030\sdk\platform-tools>adb install -r WebserviceA
ctivity.apk
But I get this error message:
158 KB/s (225399 bytes in 1.391s)
pkg: /data/local/tmp/WebserviceActivity.apk
Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]
Before put your question in stackoverflow just do some googling i'm sure you get something very useful.
Anyways,
try like this
uninstall the existing .apk
and then
re-install the new .apk
Googling your error message can be very succesfull:
It means the new copy of your application (on your development
machine) was signed with a different signing key than the old copy of
your application (installed on the device/emulator). For example, if
this is a device, you might have put the old copy on from a different
development machine (e.g., some other developer's machine). Or, the
old one is signed with your production key and the new one is signed
with your debug key.
https://stackoverflow.com/a/3185824/1683141
So you need to make sure your application is signed with same key as the currently installed application. Note that a debug key is different from a regular key.
If you do not have your old signing key anymore, then you should remove your old application first.

APK install error ("package with that name and different signature"), but certificate info is the same

I have an update to my app that I packaged with the same key as my original app, but when I try to run the APK on my device (emailed to myself), I get this error:
"Application not installed. Package with that name and different signature already installed."
But I used keytool to compare the certificate fingerprints of the META-INF/APP.RSA files of both the original apk and the new one, and they match.
I definitely don't want users to have to uninstall and reinstall the app in order to get this update.
Any help or insight is greatly appreciated!

Signing APK from developer

Things to know:
I'm kinda new to programming
I have installed Eclipse with the Android platform loaded on my Macbook Pro
I have 2 PCs as well for further troubleshooting and flexibility
I commissioned a developer to port an iOS app to the Android platform. I did not build the app myself, I paid to have other people do it. I was able to run the avd and emulator and install/uninstall/reinstall with success through the adb protocol. Now I'm on to sign the APK for release in the Android Marketplace, except that's where I'm stuck. I have attempted and researched the hell out of this to no avail. I think the issue I'm running into is the materials I find are outdated.
Methods I've tried:
Using command prompt on my PC, I used the keytool command via the instructions here and was able to get through the first half, but when prompted for the second half I kept getting "cannot find jvm.dll". This guy had a similar issue, but no instructions on how to solve it, which he did apparently. NOTE: I did not find jarsigner.exe in ANYWHERE on any of my computers. I downloaded it from a website. Could be corrupt or invalid I suppose. Could never get a signed APK.
I found "signapk.rar" from this site and it actually seemed to work. I followed the instructions to a T and it produced the signed APK like it was supposed to. The problem was when I attempted to upload it, the Marketplace told me it expired before the 2033 date, whatever that was. So I assume that the code in this program had a validity entry that was large enough. I don't know how to change that, if that is the issue.
I came across Portecle just yesterday and was able to create a keystore and a certificate. I know where they are in my directory, but I don't know how to use that to sign the APK. It's terribly confusing.
Signing in Eclipse. This is the least successful method because I can't for the life of me figure out how to work the damn thing. I know I can't just 'import apk' and it work like magic, but that'd be great if it did. I created a new project and imported the file system after changing my APK to a ZIP. One time it imported the manifest and the other time it didn't do anything. I'm certain it's user error.
I understand if this were an easy process, everybody could be a developer. That's obviously not the case, so I'm trying to figure it out on my own while my developer is out of the country. Any and all help is appreciated.
Assumptions:
Assuming you have the keystore (private key to sign the apk) already generated by you.You can use the command line to do the signing without eclipse or android studio if the yourApp-unsigned.apk is already generated by your vendor or you
You are Using Windows for the below steps
Signing the apk:
Add the path for your jdk bin to your system variables (if you don't know how to do, that look for it its easy search for how to add path to windows system variables)
This is my jdk path (use yours)
C:\Program Files\Java\jdk1.8.0_25\bin
open Command Line and type the below using your App apk and keystore key
jarsigner -verbose -keystore c:\users\android\myAppKeyStore.keystore
c:\users\blabla\Desktops\myAppAPK.apk my_keystore_alias
if success, it will promote you to enter key phrase/password of your private key (the one used for your private key generation which you should know)
Verify it was signed Successfully using the command line
jarsigner -verify c:\users\blabla\Desktops\myAppSignedAPK.apk

"Application not installed" when installing an self-signed apk on SD-card

* EDIT 1 *
Of course, just after I posted i tried to uninstall the app, and then reinstall it from APK. Then it worked. Maybe its the fact that I usually install it from Eclipse that is the bad thing here? Testing
/EDIT
So I am having the problem that my fine APK-files wont install om my device.
I found another who had the same problem, and solved it by self-signing:
unsigned APK can not be installed
However, I always tried with a signed APK. In Eclipse, I choose "Export" and then I have to first choose and "log in to" my keystore, then choose a key and again supply my password, and then choose the location for the file, and press "Finish".
This is the last "page" in the wizard:
After I copy that APK-file to my device, and then "run it" from the file explorer, the Install-screen shows upp and looks OK. First I get the "Replace application"-screen, asking me if I want to replace the existing version. I press "OK". Then it asks me if I want to allow the application to ... yada yada. I press "Install". After a brief message saying "Installing" I get the message:
Application not installed
with a green "check" to the left of it.
No other error messages.
I have checked the box "Unknown sources". I might add that there are no problems when I launch the same app from Eclipse!
Any tips and ideas would be appreciated.
If the two .apks have different signatures (Eclipse uses a debug certificate), you will not be able to install/update with the new .apk without removing the previous one.
You can find more information about this here.
The problem seems to be that I first installed the app via Eclipse (launching/debugging from Eclipse).
When the app was installed that way, and I then tried to reinstall from APK, it didn't work.
However, if I completely uninstalled the app first, then reinstalled from APK-file the installation was successful. It was also possible to reinstall (with an updated APK) after that!
I also encountered this issue.
Kindly try this solution. Make sure that the package name of your project is different from your previous project that was already installed in your mobile phone. I think they get conflict in their names. It resolved my problem.
Try to not install your application via Eclipse. If you want to avoid situation when after update you have message "Application is not installed". Install application. Install only using export as apk options.
create keystore file through command line
keytool -genkey -alias key_file_name.keystore -keyalg RSA -validity 1000000000000000 -keystore key_file_name.keystore
export apk through Eclipse, right click on Android project Android Tools > Export Signed Application Package, then give keystore location & password.
this will crate signed apk at the same time apk will be zipaligned. And installable.
If you go through command line for all, some times you may face "Application not installed" error.
(Application not installed error can happen not only, when using command line. It can be some other reasons as well)
You can run into this problem if you sign your APK on a machine running JDK 7. Downgrading to JDK 6 fixes the problem.

Categories

Resources