Java Android keytool 使用

一、jks以及keystore互相转换

1、jks转keystore

keytool -importkeystore -srckeystore [jks_path] -srcstoretype JKS -deststoretype PKCS12 -destkeystore [keystore_path]

2、keystore 转 jks

keytool -v -importkeystore -srckeystore [keystore_path] -srcstoretype PKCS12 -destkeystore [jks_path] -deststoretype JKS

使用时替换 [jks_path],以及 [keystore_path] 为你的文件路径。
在转换过程中要输入新的签名文件的密码并确认和输入以前的签名文件的密码。

二、importkeystore 使用

keytool -importkeystore -srckeystore [src_jks_path] -alias [alias_name] -destkeystore [dest_jks_path]

使用时替换 [src_jks_path], [src_jks_path] 为你的文件路径,以及[alias_name] 为你要导入的别名。
在转换过程中要
输入目标密钥库口令:
输入源密钥库口令:

你可能感兴趣的:(Java Android keytool 使用)