hi its my first android project, i build my unsinged apk, i have no prior experience with certificates, follow tutorials from android developer page for signing my app, create a keystore using cmd keytool -genkey -v -keystore c:\users\anita\my-release-key.keystore
-alias alias_name -keyalg RSA -keysize 2048 -validity 10000
tried to signed app jarsigner -verbose -keystore my-release-key.keystore flying_birda.apk alias_name
jarsigner: certificate chain not found for (my alias_name). alias_name must reference a valid keystore key a private key and corresponding public key certificate chain.
i see a same problem
Certificate chain not found
is it a problem that my keystore have only a public key? if yes
then anyone can help me ho to make a complete key entry with a private key.
i am working it from last 2 days
but did not solve my problem.
how can I sign it properly outside eclipse or android studio?
any help will be greatly appreciated
Use haibision apk signer from github
Related
i m trying to generating keystore for updating my app. I have KeyStore Alias and KeyStore Password. I set my variable on bash_profile like this
alias apk='cd /Users/Arachana/Applications/drink-play/platforms/android/build/outputs/apk && cordova plugin rm cordoba-plugin-console ; cordova build --release android && jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore android-release-unsigned.apk alias_name && cd /Users/Archana/Library/Android/sdk/build-tools/23.0.2 && ./zipalign -v 4 /Users/Archana/Applications/drink-play/platforms/android/build/outputs/apk/android-releas e-unsigned.apk /Users/Archana/Applications/drink-play/platforms/android/build/outputs/apk/Production.ap k'
and for key tool - keytool -genkey -v -keystore my-release-key.keystore -alias keystore123(alias_name) -keyalg RSA -keysize 2048 -validity 10000
and all this i hit command "apk" on terminal. It generating production.apk.
but this generating apk is not correct for updating on beta testing its showing error
What i m doing error. Pls help me out.
Advance Thanks
You need to create APK from same keystore which build previous version APK.
You are making a APK from different keystore than previous.
This error is coming because your not signing your application with same certificate with you did earlier so check out once again that your signing with same certificate or not.
THanks!
Everytime you hit this command
keytool -genkey -v -keystore my-release-key.keystore -alias emvigo123(alias_name) -keyalg RSA -keysize 2048 -validity 10000
it will generate new keystore. As #Bhupat Bheda and #Nikhil Sharma said, it is the signing issue. So, you must make sure to signing with the same keystore only if you want to update the previous version of .apk . My suggestion is to keep the keystore somewhere else in your computer drive and use that later to update the same app in the playstore.
Remove existing app and create new app with different id and app name in the playstore will solve your problem.
I get error in eclipse when i try to export the project to apk so I could not solve it
the message that appear is
keytool error: java.lang.Exception: Key pair not generated, alias
<.......> already exists
so can any one to help
Did you generate the key and use it? Its straight forward. You must have a key to sign the application. You can generate the apk only after that.
How are your signing the Application? Heres a good step by step to digitally signing you application. How to sign an android apk file
For this simply regenerate you certificate again follow these steps.
1)keytool -genkey -v -keystore mycertificate.keystore -alias mykey -keyalg
RSA -keysize 2048 -validity 1000
2) jarsigner -verbose -keystore mycertificate.keystore D:\app.apk mykey
3) jarsigner -verify app.apk
If it will have done then shows a message "successfully verified"
4) zipalign -v 4 D:\app.apk D:\signedapp.apk
it will generate new certificate. enjoy
I'm just trying to test an android application using Robotium. The issue I have is that I don't manage to re-sign the application in order to start a test project in Eclipse.
I've followed the tutorial from http://code.google.com/p/robotium/wiki/RobotiumForAPKFiles but with no success.
I've generated a .keystore file:
keytool -genkey -v -keystore myCertificate1.keystore -alias myKey1 -keyalg RSA -keysize 2048 -validity 20000
Running the jarsigner command:
jarsigner -verbose -keystore Certificate1.keystore path\appname.apk Key1
And I've got an error:
Certificate chain not found for: Key1. Key1 must reference a valid KeyStore key entry containing a private key and corresponding public key certificate chain.
Could anyone point me in any direction ?
You're giving your new key an alias "myKey1", but then you're trying to sign with "Key1" which (I presume) either does not exist or at the least reference the wrong key.
I developed a Android App and could sign it with the Eclipse Plugin, but i wanted to sign it manually with jarsigner and zipalign, so that i can choose the algorithm and the keysize by my self.
I created a Keystore with this command:
keytool -genkey -v -keystore keystore_name -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
My first issue is that i cant enter the Keystore with the Eclipse Plugin. It says:
Keystore was tampered with, or password was incorrect
So i went on with the jarsigner like this:
jarsigner -verbose -keystore keystore_name my_application.apk alias_name
and it works fine.
finally i run the tool zipaling:
zipalign -v 4 inputfile.apk outputfile.apk
I could publish my app in the market without any trouble. But when a friend downloaded my app, he gets the error: Package file was not signed correctly
Furthermore I can't install my app signed manually. But the version, signed with the Eclipse plugin works fine.
The big problem now I have is, that I can't upload the new apk file do the market, because it says that it is signed with an other certificate.
What can I do ?
Not sure if this will help but I came across a similar issue before. After trying a few things I used jarsigner like this and it has been working fine:
jarsigner -verbose -digestalg SHA1 -sigalg MD5withRSA -keystore %path to key store here% -signedjar %the name you want for your signed apk here% %the apk you want to sign here% your.keystore
EDIT:
Just noticed your question was about what to do with the app on the market place. I'm no help there. Sorry.
Verify the keytool you are using:
which keytool
check if it is set to openjdk... Android supports only Sun/Oracle Java as the keytool.
after finishing my android application development i used the command showing below to get private key, but it shows some errors such as "The Keystore was tampered with or password was in correct"
$ keytool -genkey -v -keystore DEBUG.keystore
-alias alias_name -keyalg RSA -keysize 2048 -validity 10000
Is my problem with DEBUG.keystore?? Should i need to generate another keystore for public release??
Yes, you should definitely generate another key for public release (and keep it in a save place for future updates).
See http://developer.android.com/guide/publishing/app-signing.html#releasemode for details.
EDIT:
If you'r using Eclipse, use the ADT Plugin for Android to create your keyfiles and sign your application.