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

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

Related

Generate a key with keytool, in a non-interactive way

When I'm using:
"C:\Program Files\Java\jdk1.8.0_151\bin\keytool.exe" -genkey
-v -keystore my.keystore -keyalg RSA -keysize 2048 -validity 10000 -alias app
then an interactive process begins which asks name, password, etc.
Is there a way to have a non-interactive generation of keys, where parameters are directly in the command line parameters?
This works:
keytool -genkey -keystore my.keystore -keyalg RSA -keysize 2048 \
-validity 10000 -alias app -dname "cn=Unknown, ou=Unknown, o=Unknown, c=Unknown" \
-storepass abcdef12 -keypass abcdef12

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

Java Keytool asking for key store password after typing the comand?1?

I am from brazil and im trying to generate a keystore and after going to the bin of my jre7/bin in here its "C:\Program Files\Java\jdk1.7.0_51\bin" i try to run this code:
keytool -genkey -v -keystore my-release-key.keystore
-alias alias_name -keyalg RSA -keysize 2048 -validity 10000
But it is asking me for a password after that and i cant type anything like, i pressed all the keyboard keys and nothing was writen all i can do is press enter and the key is not generated... Has anyone ever went through this? In portuguese he asks me for: "Informe a senha da área de armazenamento de chaves:"
You have to type password, which will be used to encrypt the key store and then confirm it.
Passwords are not shadowed to the console, so it looks empty for you.
You may specify password in the command line itself with storepass and keypass parametrs
keytool -genkey -v -keystore my-release-key.keystore \
-storepass mypassword123 -keypass mypassword123 \
-alias alias_name -keyalg RSA -keysize 2048 -validity 10000
storepass is the password to encrypt the whole key store, and keypass is used to encrypt the key entry. Their values do not have to be the same.
if in debug mode use android
I hope it helped you

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

Android google map apiv2 authorization failure

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

Categories

Resources