找回密码
 立即注册
查看: 6121|回复: 85

[学术/精华文章] Mac Android签名生成keystore

[复制链接]
发表于 2017-4-7 20:43 | 显示全部楼层 |阅读模式
去到java安装的根目录,即输入cd /Library/Java/Home/bin/

当前用户没有最高权限,在Library文件夹下不能生成任何文件,可以到当前用户目录下生成文件
keytool -genkey -v -keystore android.keystore -alias android -keyalg RSA -validity 20000 -keystore /Users/当前用户的用户名/android_demo.keystore
按照提示输入即可,完整代码如下
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.keystore
Enter keystore password:
Re-enter new password:
What is your first and last name?
  [Unknown]:  Li XiaoMing
What is the name of your organizational unit?
  [Unknown]:  www.xiaoming.com
What 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]:  86
Is CN=Li XiaoMing, OU=www.xiaoming.com, O=小明集团, L=广州, ST=广东省, C=86 correct?
  [no]:  yes

Generating 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=86
Enter key password for <android>
    (RETURN if same as keystore password):
[Storing /Users/xiaoming/android_demo.keystore]

到这里就可以到当前用户根目录下查看生产的keystore签名文件了

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
发表于 2017-4-19 20:43 | 显示全部楼层
很不错
发表于 2017-4-19 21:14 | 显示全部楼层
楼主是超人
发表于 2017-4-19 21:15 | 显示全部楼层
好帖就是要顶
发表于 2017-4-19 20:45 | 显示全部楼层
顶顶多好
发表于 2017-4-19 21:15 | 显示全部楼层
很好哦
发表于 2017-5-12 21:22 | 显示全部楼层
好帖就是要顶
发表于 2017-5-12 21:01 | 显示全部楼层
顶顶多好
发表于 2017-5-12 20:37 | 显示全部楼层
难得一见的好帖
发表于 2017-5-12 20:56 | 显示全部楼层
很好哦
懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Unity开发者联盟 ( 粤ICP备20003399号 )

GMT+8, 2024-4-20 23:52 , Processed in 0.103571 second(s), 31 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表