Android google map apiv2 authorization failure - android

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

Related

Illegal option: keystore keytool -genkeypair [OPTION]... Error

I'm trying to generate a keystore with these line of code
keytool -genkey -v keystore app-key.keystore alias app-key -keyalg RSA -keysize 2048 -validity 10000
but showing
Illegal option: keystore
keytool -genkeypair[OPTION]...
is this a new error?
I'm using mac terminal and trying to deploy android in google playstore
In your command, you are missing a few "-" before keystore & alias
keytool -genkey -v -keystore app-key.keystore
-alias app-key -keyalg RSA -keysize 2048 -validity 10000
Here are all the legal options for keytool -genkey usage, please note that "-" is required for valid usage:
-alias <alias> alias name of the entry to process
-keyalg <keyalg> key algorithm name
-keysize <keysize> key bit size
-sigalg <sigalg> signature algorithm name
-destalias <destalias> destination alias
-dname <dname> distinguished name
-startdate <startdate> certificate validity start date/time
-ext <value> X.509 extension
-validity <valDays> validity number of days
-keypass <arg> key password
-keystore <keystore> keystore name
-storepass <arg> keystore password
-storetype <storetype> keystore type
-providername <providername> provider name
-providerclass <providerclass> provider class name
-providerarg <arg> provider argument
-providerpath <pathlist> provider classpath
-v verbose output
-protected password through protected mechanism
You may bring up these list of options any time by running
keytool -genkey -help

PhoneGap Android - Invalid keystore format generated under Ubuntu

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

Convert an existing Keystore to an android debug keystore for eclipse

Sometimes it might be handy to use an existing keystore in eclipse (Android -> Build -> CustomKeystore) to build from within eclipse.
The Eclipse plugin does not allow to change the keystore password, key-alias and key password though.
Is there a way to convert an existing keystore to match the default requirements?
The following keytool commands should do the trick. There definitly is a simpler way, but it already took enough time figuring this one out :)
keytool -genkey -v -keystore debug.keystore -alias androiddebugkey -keyalg RSA -keysize 2048 -validity 10000
keytool -delete -alias androiddebugkey -keystore debug.keystore
keytool -importkeystore -srckeystore src.keystore -destkeystore debug.keystore
keytool -changealias -alias srcalias -destalias androiddebugkey -keystore debug.keystore
keytool -keypasswd -alias androiddebugkey -keystore debug.keystore
This creates a new keystore and imports an existing key from a source keystore
keystore. src.keystore -> your source keystore that will be used
srcalias -> your source alias you're currently using
passwords are entered on cmdline
use 'keytool -list -keystore debug.keystore' to check the result.
Very useful information, should be voted up. I wrote a small batch file basing on Icyerasor's answer:
keytool -genkey -v -keystore debug.keystore -alias androiddebugkey -keyalg RSA -keysize 2048 -validity 10000 -storepass android -keypass android -dname "CN=kristjan sander, OU=Unknown, O=bitspinners, L=tallinn, ST=Unknown, C=ee"
keytool -delete -alias androiddebugkey -keystore debug.keystore -storepass android
keytool -importkeystore -srckeystore keystore.jsk -srcstorepass qwerty -destkeystore debug.keystore -storepass android
keytool -changealias -alias bitspinners.eu -destalias androiddebugkey -keystore debug.keystore -storepass android -keypass qwerty
keytool -keypasswd -alias androiddebugkey -keystore debug.keystore -storepass android -keypass qwerty -new android
keytool -list -keystore debug.keystore -storepass android

How to sign my already made android app/.apk file

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

how i can get MD5 hash in jdk.7.o?

when i try to get MD5 hash by using
C:\Program Files\Java\jre7\bin>keytool -list -alias androiddebugkey -keystore "C:\Users\learnwhat.android\debug.keystore" -storepass android -keypass android
only get SHA1 hash i need MD5 hash to in goole Map api key sing up. how i can get MD5 hash in jdk1.7.0_09?.
Add -v with command if you are using jre7 for getting MD5 hash for Google Map. this command return you both MD5 and SHA1 :
C:\<YOUR_JDK_PATH\bin>keytool -v androiddebugkey -keystore "C:Users\YOUR_NAME\.android
\debug.keystore" -alias alias_name -storepass android -keypass android
using the following command:
keytool -v -list -alias androiddebugkey -keystore debug.keystore
-v will force keytool generate md5, sha1, sha256

Categories

Resources