I am trying to sign my Android app so I can release it in Market. When I generate the keystore, I get an access denied error. How do I fix this?
This is what I've been trying to do:
C:\Program Files\Java\jdk1.6.0_25\bin
and granted the CREATOR OWNER
group full control of the folder.C:\Program Files\Java\jdk1.6.0_25\bin
..
C:\Program Files\Java\jdk1.6.0_25\bin>keytool -genkey -v -alias company -keyalg R SA -keysize 2048 -validity 10000 -keystore company.keystore Enter keystore password: Re-enter new password: What is your first and last name? [Unknown]: John Smith What is the name of your organizational unit? [Unknown]: Android What is the name of your organization? [Unknown]: Company What is the name of your City or Locality? [Unknown]: Albany What is the name of your State or Province? [Unknown]: NY What is the two-letter country code for this unit? [Unknown]: US Is CN=John Smith, OU=Android, O=Company, L=Albany, ST=NY, C=US correct? [no]: yes Generating 2,048 bit RSA key pair and self-signed certificate (SHA1withRSA) with a validity of 10,000 days for: CN=John Smith, OU=Android, O=Company, L=Albany, ST=NY, C=US Enter key password for <veetle> (RETURN if same as keystore password): Re-enter new password: [Storing company.keystore] keytool error: java.io.FileNotFoundException: veetle.keystore (Access is denied) java.io.FileNotFoundException: veetle.keystore (Access is denied) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:194) at java.io.FileOutputStream.<init>(FileOutputStream.java:84) at sun.security.tools.KeyTool.doCommands(KeyTool.java:902) at sun.security.tools.KeyTool.run(KeyTool.java:172) at sun.security.tools.KeyTool.main(KeyTool.java:166)
Everytime I check the folder permissions, I see that it has reverted back to read-only. There were no errors whenever I turned off read-only.
The default location is /Users/<username>/. android/debug. keystore.
The Android Keystore system lets you store cryptographic keys in a container to make it more difficult to extract from the device. Once keys are in the keystore, they can be used for cryptographic operations with the key material remaining non-exportable.
A keystore is a storage mechanism for security certificates. A public key certificate is used to sign an APK before deployment to services like the Google Play Store.
Below steps worked for me:
Run command prompt as administrator
Unchecked the read only options in C:\Program Files\Java\jdk1.6.0_25\bin
This may not be required
keytool -genkey -v -keystore d:\my_private_key.keystore -alias my_key_alias -keyalg RSA -keysize 2048 -validity 10000
Tell it to create it in drive D:
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With