Generate Android signing certificate .keystore file under mac

Generate Android signing certificate .keystore file under mac

The first step: first check whether the current mac has a JAVA environment installed. If not, go to the JAVA official website to install one. The Insert image description heresecond step: enter the command in the terminal /usr/libexec/java_home -Vto check our jdk address, and then cd to switch to that location.

 cd /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home 

Insert image description here## Step 4: Enter the command directlysudo keytool -genkey -alias tagoldalias -keyalg RSA -keysize 2048 -validity 36500 -keystore tagold.keystore

  1. 36500 is the validity period of the certificate, indicating 100 years of validity, in days. It is recommended to set the time longer to avoid certificate expiration.
  2. RSA certificate signing algorithm
  3. keysize 1024 key size
  4. tagold202309.keystore key name
  5. alias is the certificate alias, which can be modified to the characters you want to set. It is recommended to use English letters and numbers.

Step 5: After the keystore is generated, use the warning command to migrate the keystore's format jks to pkcs12

sudo keytool -importkeystore -srckeystore tagold.keystore -destkeystore tagold.keystore -deststoretype pkcs12 

Enter the keystore password:

Note:
1) When generating the keystore, the Key store password and the Key alias password must be set the same;
2) After the keystore is generated, use the warning command to migrate the keystore format from jks to pkcs12; it will be backed up after the migration is successful. Old files, ending with .old, are basically no longer used and can be deleted directly;

Step Six: Certificate Location

Insert image description here/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home

The path address here is the path address of the java mentioned above. Copy the path and press Enter to enter

Insert image description here

Step 7: You can sudo keytool -list -v -keystore tagold.keystoreview the detailed information of the key through

Insert image description here

Guess you like

Origin blog.csdn.net/long4512524/article/details/133045404