How to reuse an android key to release application - android

I created a key for my application on my laptop and released my application. Now I just copied that key into a flash and now I want to reuse it again, But I get this error:
Error:Execution failed for task ':app:packageRelease'.
> com.android.ide.common.signing.KeytoolException: Failed to read key key0 from store "E:\Rasad\Key\RasadKey.jks": Keystore was tampered with, or password was incorrect
I just test this path again with a new key and it happened again!
What is the problem?
Thankyou for your answers.

Copy the ".jks" file and enter the same password you have used before. When generating signed apk, choose existing instead of new. Hope it helps

It's very likely that you have provided either the wrong key store password, or the wrong key password. There's an easy way to check with keytool:
Check android keystore keypass for correctness

Related

How to resolve Password verification failed Error

In my android Studio when I try to generate Signed Apk Bundle it give me Password verification failed Error I know the key store password and key password but still, it gives the same error.
Make sure you have set correct key store path and selected correct key alias.

Keystore was tampered with, or password was incorrect android studio

Keystore was tampered with, or password was incorrect error while generating signed apk.Error:Execution failed for task ':app:packageRelease'.
com.android.ide.common.signing.KeytoolException: Failed to read key ......... from store "...............jks": Keystore was tampered with, or password was incorrect
Recheck your keystore password. Also make sure you are using the correct keystore for your app.

Failed to read key hailun_logistics from store "/Users/yangshin/Documents/hailun_logisticskey.jks"

I'm trying to generate signed APK, but I'm getting this error message.
Log:
Error:Execution failed for task ':haiLunLogisticsAndroid:packageRelease'.
Failed to read key hailun_logistics from store "/Users/yangshin/Documents/hailun_logisticskey.jks": Keystore was tampered with, or password was incorrect
Could somebody point me to why it failed?
Normal Password Errors...?
Key Store file located where permission to access is denied to IDE. (Run IDE as admin)
Mismatch Letters
Caps Lock
If all this fails, create a new .jks keystore file and set keystore password and alias password to be same. Simpler to remember.

How to solve a Secret file bindings issue

I have a problem with one of my jenkins build.
I have configured in my global credentials, a keystore for one of my android build. This keystore is needed for when I have to sign my apk in order to distribute my app on Google Play for example.
So in the job, I have configured a Secret file binding to allow jenkins to copy the keystore file to a temporary location and sets a variable, let's call it SECRET_PATH, to that location. I can then provide gradle with the value of this variable on the command line when invoking the gradle script (in the switches section).
But then the build fails each time :
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':myapp:packageRelease'.
> Failed to read key ******** from store "/home/jenkins/slave/secretFiles/3607aab3-6e27-497a-b198-7d9a3aeb2913/keystore": Keystore was tampered with, or password was incorrect
it is as if the location /home/jenkins/slave/secretFiles/3607aab3-6e27-497a-b198-7d9a3aeb2913/keystore didn't even exist.
In the job configuration, the help tip on the Bindings sections also mentions this :
Warning: if the master or slave node has multiple executors, any other build running concurrently on the same node will be able to read the contents of this file.
It is exactly as if another concurrent build were running and deleted the location where the keystore was. This is really weird.
One more thing, I am using a master/slave topology where everything is dockerized. Not sure the docker itself is involved though. I think it's purely a Jenkins issue but I am giving this information so that you guys have some context.
Have you guys ever experienced this weird behaviour where jenkins seems to be unable to "resolve" the secret file bindings ?
Any help would be really appreciated.
thanks in advance,
Failed to read key ******** from store "/home/jenkins/slave/secretFiles/3607aab3-6e27-497a-b198-7d9a3aeb2913/keystore": Keystore was tampered with, or password was incorrect
it is as if the location /.../keystore didn't even exist.
No, the error message is correct — the file does exist, but most likely the store password or key password you are providing is incorrect.
If the keystore did not exist, you would get an error something like:
File '/.../release.keystore' specified for property 'signingConfig.storeFile' does not exist.
You can double check this by running file $SECRET_PATH/keystore, or ls -l $SECRET_PATH/keystore, or using keytool or something similar.
You don't mention injecting the keystore and key password(s) at all into the job — how are you doing that?
First make sure that building and signing the release version works as expected with Gradle from the command line.
Then you could try doing the same in Jenkins, by passing in the filename and password via the Gradle step (though this isn't a great idea if you're using the Job Config History plugin, for example).
Once that works, you can use the credential binding plugin to inject the file, and to inject the password.

Invalid keystore format

I was given a keystore file along with an username and password and I need to sign the updated application. However, I am getting "keytool error: java.io.IOException: Invalid keystore format" when trying to list the contents of the file, trying to create a new key in the keystore, etc.
I have looked at the similar posts, but none of them helped me.
I am looking forward to hearing a solution. Thanks in advance
It turned out that the file was an RAR archive file that contained the actual keystore.

Categories

Resources