Failed to read key from store - android

I am trying to sign flutter app with upload key but getting error while generating app bundle/apk.
command:
keytool -genkey -v -keystore "D:\Desktop\upload-keystore.jks -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias upload
key.properties:
storePassword=1234567
keyPassword=1234567
keyAlias=upload
storeFile=D:/Desktop/upload-keystore2.jks -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias upload
Error:
> Failed to read key upload from store "D:\Desktop\upload-keystore2.jks -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias upload": No key with alias 'upload' found in keystore D:\Desktop\upload-keystore2.jks -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias upload
How to fix?

Related

I'm trying to create https selfsigned keystore for android local server

I'm trying to make its certification of ssl for https with commands here. Do I miss something for creating certification?
keytool -genkey -alias selfsigned -keystore selfsigned.keystore -storepass password -validity 360 -ext SAN=DNS:localhost,IP:127.0.0.1 -storetype BKS -provider org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath bcprov-ext-jdk15on-1.46.jar
Quick Answer, I solve it myself, It gives me errors but keystore created to destination. and used it well
I've used this command to make selfsigned key.
keytool -genkey -keyalg RSA -alias selfsigned -keystore selfsigned.keystore -storepass blabla -validity 9999 -keysize 2048 -ext SAN=DNS:localhost,IP:127.0.0.1 -storetype BKS -provider org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath bcprov-ext-jdk15on-1.46.ja

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

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

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

Categories

Resources