查看 keystore
|
|
keytool-list-keystoreE:\Trinea\keystore\appsearch.keystore
-list
:列出密钥库中的条目
E:\Trinea\keystore\appsearch.keystore
:keystore的完整路径
|
1、打开终端
2、去到java安装的根目录,即输入
|
1
|
cd
/Library/Java/Home/bin/ |
3、当前用户没有最高权限,在Library文件夹下不能生成任何文件,可以到当前用户目录下生成文件
|
1
|
keytool
-genkey -v -keystore android.keystore -alias android -keyalg RSA -validity 20000 -keystore
/Users/当前用户的用户名/android_demo.keystore |
如果当前的用户名是xiaoming,则如下
|
1
|
keytool
-genkey -v -keystore android.keystore -alias android -keyalg RSA -validity 20000 -keystore
/Users/xiaoming/android_demo.keystore |
4、按照提示输入即可,完整代码如下
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
xiaomingdeiMac:/
xiaoming$ cd /Library/Java/Home/bin/xiaomingdeiMac:bin
xiaoming$ keytool -genkey -v -keystore android.keystore -alias android -keyalg RSA -validity 20000 -keystore
/Users/xiaoming/android_demo.keystoreEnter
keystore password: Re-enter new password:What
is your first and last name? [Unknown]:
Li XiaoMingWhat
is the name of your organizational unit? [Unknown]:
www.xiaoming.comWhat
is the name of your organization? [Unknown]:
小明集团What
is the name of your City or Locality? [Unknown]:
广州What
is the name of your State or Province? [Unknown]:
广东省What
is the two-letter country code for this unit? [Unknown]: 86Is
CN=Li XiaoMing, OU=www.xiaoming.com, O=小明集团, L=广州, ST=广东省, C=86 correct? [no]:
yesGenerating 1,024 bit
RSA key pair and self-signed certificate (SHA1withRSA) with a validity of 20,000 days for:
CN=Li XiaoMing, OU=www.xiaoming.com, O=小明集团, L=广州, ST=广东省, C=86Enter
key password for <android> (RETURN if same
as keystore password): [Storing
/Users/xiaoming/android_demo.keystore] |
5、到这里就可以到当前用户根目录下查看生产的keystore签名文件了

1万+

被折叠的 条评论
为什么被折叠?



