Showing posts with label keystore. Show all posts
Showing posts with label keystore. Show all posts

Android Keystore and certificates for Facebook and Google Map APIs

In the Terminal:
1) change directory to place where you want to save your keystore
 
@ Android_Keystore $ which keytool
/usr/bin/keytool
   
2) change command to something like this, execute it

keytool -genkey -v -keystore MyCompanyName-release-key.keystore -alias MyApp_name -keyalg RSA -keysize 2048 -validity 10000

3) you will be asked for two sets of passwords, if you have multiple developer groups working on different apps then provide different. If you are single developer for single app then you can keep them same.

The process will look like this:
What is your first and last name?
  [Uki]:  Uki Lucas
What is the name of your organizational unit?
  [CyberWalkAbout]:  CyberWalkAbout
What is the name of your organization?
  [CyberWalkAbout.com]:  CyberWalkAbout.com
What is the name of your City or Locality?
  [Chicago, IL]:  Chicago
What is the name of your State or Province?
  [IL]:  IL
What is the two-letter country code for this unit?
  [US]:  US
Is CN=Uki Lucas, OU=CyberWalkAbout, O=CyberWalkAbout.com, L=Chicago, ST=IL, 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=Uki Lucas, OU=CyberWalkAbout, O=CyberWalkAbout.com, L=Chicago, ST=IL, C=US
Enter key password for <CyberFit_alias>
(RETURN if same as keystore password):  
Re-enter new password: 
[Storing CyberFit-release-key.keystore]
---------------
You will need this for Facebook:
@ Android_Keystore $ keytool -exportcert -alias CyberFit_alias -keystore CyberFit-release-key.keystore | openssl sha1 -binary | openssl base64 Enter keystore password:
---------------
You will need this for Google APIs (maps)
@ Android_Keystore $ keytool -exportcert -alias CyberFit_alias -keystore CyberFit-release-key.keystore -list -v Enter keystore password:
   


As an Amazon Associate I earn from qualifying purchases.

Android Keystore and certificates for Facebook and Google Map APIs

In the Terminal:
1) change directory to place where you want to save your keystore
 

@ Android_Keystore $ which keytool


/usr/bin/keytool

   
2) change command to something like this, execute it
keytool -genkey -v -keystore MyCompanyName-release-key.keystore -alias MyApp_name -keyalg RSA -keysize 2048 -validity 10000

3) you will be asked for two sets of passwords, if you have multiple developer groups working on different apps then provide different. If you are single developer for single app then you can keep them same.

The process will look like this:

What is your first and last name?


  [Uki]:  Uki Lucas


What is the name of your organizational unit?


  [CyberWalkAbout]:  CyberWalkAbout


What is the name of your organization?


  [CyberWalkAbout.com]:  CyberWalkAbout.com


What is the name of your City or Locality?


  [Chicago, IL]:  Chicago


What is the name of your State or Province?


  [IL]:  IL


What is the two-letter country code for this unit?


  [US]:  US


Is CN=Uki Lucas, OU=CyberWalkAbout, O=CyberWalkAbout.com, L=Chicago, ST=IL, 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=Uki Lucas, OU=CyberWalkAbout, O=CyberWalkAbout.com, L=Chicago, ST=IL, C=US


Enter key password for <CyberFit_alias>


(RETURN if same as keystore password):  


Re-enter new password: 



[Storing CyberFit-release-key.keystore]




---------------




You will need this for Facebook:



@ Android_Keystore $ keytool -exportcert -alias CyberFit_alias -keystore CyberFit-release-key.keystore | openssl sha1 -binary | openssl base64
Enter keystore password:




---------------

You will need this for Google APIs (maps)



@ Android_Keystore $ keytool -exportcert -alias CyberFit_alias -keystore CyberFit-release-key.keystore -list -v
Enter keystore password:









   


As an Amazon Associate I earn from qualifying purchases.

Getting Google YouTube API key

You should follow steps in here:
https://developers.google.com/youtube/android/player/register

with small exception since the command returns error:

$ keytool -list -v my-release-key.keystore
keytool error: java.lang.RuntimeException: Usage error, /Users/uki/Documents/Dropbox/Android_Keychains/my-release-key.keystore is not a legal command
java.lang.RuntimeException: Usage error, /Users/uki/Documents/Dropbox/Android_Keychains/my-release-key.keystore is not a legal command
    at sun.security.tools.KeyTool.parseArgs(KeyTool.java:375)
    at sun.security.tools.KeyTool.run(KeyTool.java:171)
    at sun.security.tools.KeyTool.main(KeyTool.java:166)

instead use the following:

$ keytool -list -v -keystore "my-release-key.keystore"
Enter keystore password:  


  • Make sure you use option -v to get both SHA1 and MP5
  • Make sure you quote the file path to your keystore file.




As an Amazon Associate I earn from qualifying purchases.

Getting Google YouTube API key

You should follow steps in here:
https://developers.google.com/youtube/android/player/register

with small exception since the command returns error:

$ keytool -list -v my-release-key.keystore
keytool error: java.lang.RuntimeException: Usage error, /Users/uki/Documents/Dropbox/Android_Keychains/my-release-key.keystore is not a legal command
java.lang.RuntimeException: Usage error, /Users/uki/Documents/Dropbox/Android_Keychains/my-release-key.keystore is not a legal command
    at sun.security.tools.KeyTool.parseArgs(KeyTool.java:375)
    at sun.security.tools.KeyTool.run(KeyTool.java:171)
    at sun.security.tools.KeyTool.main(KeyTool.java:166)

instead use the following:

$ keytool -list -v -keystore "my-release-key.keystore"
Enter keystore password:  


  • Make sure you use option -v to get both SHA1 and MP5
  • Make sure you quote the file path to your keystore file.




As an Amazon Associate I earn from qualifying purchases.

apt quotation..