I have made an Android Live wallpaper application using a software and the app is running perfectly on my device so I thought about uploading it to Playstore.When I uploaded my app it game me following error :
**
"You uploaded an APK signed with a certificate that expires too soon.
You need to sign your APK with a certificate that expires farther into the future."
Now how I can sign my certificate again ?
Please I need detailed tutorial !
you have to create a new signing key that will expire in 25 years or so and sign your application toth that key
to generate map key:=
go to C:\users....android.
keytool -list -alias androiddebugkey -keystore C:\users....android\debug.keystore
-storepass android -keypass android
MD5 finger print:
79:9F:B9:2B:F0:51:C8:48:2E:39:5B:72:AB:42:24:91
map key:
0lujtKtuh8x_MfEUSN5OpCj6HVCxX9lvBDgCT2w
to generate certificate:=
keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA
-keysize 2048 -validity 10000
password1- ...,123
password2- ....,1234
previous map key generated : 0Vd9Hpw3AaaLfuaYgC8btoNu8OkuZe4bPXD9oPg
You need to:
Create a release.keystore (it not already done):keytool -genkey -v -keystore release.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
Remove the old signature:zip -d foo.apk META-INF/\*
Sign with the new key:jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore release.keystore my_application.apk alias_name
Verify the signature:
jarsigner -verify -verbose -certs my_application.apk
Related
I have created the keystore using
keytool -genkey -v -keystore xx_yy_zz.keystore -alias xx_yy_zz_alias_name -keyalg RSA -keysize 2048 -validity 10000
Uploaded to Phonegap and generated a APK file
The signed the APK using the below command
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore xx_yy_zz.keystore xx_yy_zz.78.apk xx_yy_zz_alias_name
But when I verify the APK it throws the below error
jarsigner -verify xx_yy_zz.78.apk
Error:
jarsigner: java.lang.SecurityException: invalid SHA-256 signature file digest for res/layout/notification_action.xml
Use -digestalg SHA-256 to sign, if you wish to verify SHA256.
SHA1 had been broken and should not be used anymore, at all.
PhoneGap send me this error :
Error - Invalid keystore format - You can fix this here
Here is the command I do to generate it (in Ubuntu) :
keytool -genkey -v -keystore ToZer0.keystore -alias ToZer0 -keyalg RSA -validity 10000
I have no idea why it doesn't work !
Ok, just forget the keysize I think...
keytool -genkey -v -keystore tozer0.keystore -alias tozer0 -keyalg RSA -keysize 2048 -validity 10000
I have been trying to get my key hash for my release to work for hours now, and I must be doing something wrong because I have searched and tried so many different things,
Now lets say my alias is john_doe_key, and my keysotre is located at /Users/loaner/Downloads/UEat/app/app-release.apk
I would have my command in my terminal look like this correct?
keytool -exportcert -alias john_doe_key -keystore ~/Users/loaner/Downloads/UEat/app/app-release.apk | openssl sha1 -binary | openssl base64
or is that not right?
I have tried this and logging the key like face books says in the guide.
Thanks for the help in advance
From reading your comment and seeing what you have so far, you're trying to get the key hash for Facebook, right?
First, make sure that you have signed your apk (which is your app). You can sign your apk in Android Studio by Build -> "Generate Signed APK...". When you sign your apk, you create your keystore and an alias for that keystore. I think your are confusing "keystore" with the "apk".
Also, you have to include your alias and keystore passwords in your command.
It should look like this:
keytool -exportcert -keystore keystore_file -alias alias_name -storepass keystorepassword -keypass aliaspassword | openssl sha1 -binary | openssl base64
Also, make sure that you are creating a "Release Build", which can be selected from the Build Variants menu.
Generate a key store
$ keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
Sign an apk.
$ jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore my_application.apk alias_name
I'm trying to create a public/private key pair using the keytool function so I can submit an Android app to Google Play. When I try to sign the app using the key I made, I get this error from jarsigner
jarsigner: Certificate chain not found for: SHA1withDSA.
SHA1withDSA must reference a valid KeyStore
key entry containing a private key and corresponding public key certificate chain.
Same thing when I try using RSA. When I look at the keys for the keystore, all I see if the
Entry type: PrivateKeyEntry
Not the public and private keys.
The command I used to create they key was
keytool -genkey -keystore nameofkeystore.keystore
-alias coffitivity -keypass *passwordommitted* -storepass *thepasswordommitted*
I'm not actually 100% sure what I did to fix it, but this is what I did and now it works
keytool -genkeypair -v -keystore my-release-key.keystore
-alias coffdroid -keyalg RSA -keysize 2048 -validity 10000
Note: difference is I used "-genkeypair" instead of "genkey" even though they're supposed to be the same
Second: made a new unsigned .apk. This is likely what fixed it - so if you're hitting the wall, do that over.
Then Jarsigner
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1
-keystore my-release-key.keystore /Users/tommynicholas/Desktop/*apkname*.apk coffdroid
I have generate keystore using two type of command as follow
keytool -genkey -v -keystore mykestorename.jks -alias aliasname & keytool -selfcert -alias aliasname -keystore mykestorename.jks
keytool -genkey -v -keystore mykestorename.keystore -alias aliasname -keyalg RSA -keysize 2048 -validity 1000000
and I generate sha1 key using following command
keytool -list -V -alias alias name -keystore "keystore path"
I create API key in Google console the generated key passes Authorization failure error
and showing grey color plain background in map fragment