1、打开终端

2、去到java安装的根目录,即输入

cd /Library/Java/Home/bin/

3、当前用户没有最高权限,在Library文件夹下不能生成任何文件,可以到当前用户目录下生成文件

keytool -genkey -v -keystore android.keystore -alias android -keyalg RSA -validity 20000 -keystore /Users/当前用户的用户名/android_demo.keystore

如果当前的用户名是xiaoming,则如下

keytool -genkey -v -keystore android.keystore -alias android -keyalg RSA -validity 20000 -keystore /Users/xiaoming/android_demo.keystore

4、按照提示输入即可,完整代码如下

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]

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

参考官网:http://developer.android.com/intl/zh-cn/tools/publishing/app-signing.html#signing-manually

本文链接:http://www.cnblogs.com/liqw/articles/4064662.html

Mac Android签名生成keystore的更多相关文章

  1. Android Studio 生成 keystore 签名文件

    Android Studio 生成 keystore 签名文件 常见 SSL 证书格式 : .DER .CER,文件是二进制格式,只保存证书,不保存私钥. .PEM,一般是文本格式,可保存证书,可保存 ...

  2. Android Studio生成keystore签名文件步骤讲解

    Android App打包时要用到签名文件,Android Studio生成签名文件步骤如下: Build---Generate Signed Apk...如图: 如果你的project中有2个或者2 ...

  3. Android签名生成和互转

    原文链接:http://blog.votzone.com/2018/05/05/android_signature.html   Android 的签名有两种方式,一种使用jdk 提供的jarsign ...

  4. android签名生成和发布

    首先,我们需要一个keystore,当然已经有了的话就不用这一步了:cmd下:进入到jdk的bin目录,这样的话,android.keystore文件就会生成在这个目录下,签名的时候我们需要这个文件C ...

  5. android 签名生成和签名验证

    keytool -genkey -alias lingni -keyalg RSA -validity -keystore lingni.keystore -alias 是别名 lingni.keys ...

  6. Android keytool 生成keystore与给APK签名

    http://www.tttabc.com/android/keytool-keystore-jarsigner-apk.htm

  7. 修改Android签名证书keystore的密码、别名alias以及别名密码

    Eclipse ADT的Custom debug keystore自定义调试证书的时候,Android应用开发接入各种SDK时会发现,有很多SDK是需要靠package name和keystore的指 ...

  8. android 签名被篡改(Keystore was tampered with, or password was incorrect)

    在配置自定义签名时出现了"Keystore was tampered with, or password was incorrect"错误! 参考文档发现: If necessar ...

  9. 转:修改Android签名证书keystore的密码、别名alias以及别名密码

    转自:http://blog.k-res.net/archives/1671.html 二月 5, 2014  |  Posted by K-Res   之前在测试Eclipse ADT的Custom ...

随机推荐

  1. iOS-(kCFStreamErrorDomainSSL, -9802)

    kCFStreamErrorDomainSSL, -9802 我是微博授权时get页面时候碰到的 其实就是http安全问题 在info.plist里添加并设置Allow Arbitrary Loads ...

  2. Java面试宝典2015版(绝对值得收藏超长版)

    31.String s = "Hello";s = s + " world!";这两行代码执行后,原始的String对象中的内容到底变了没有? 没有.因为Str ...

  3. R-squared是什么意思

    在回归分析中,R-squared值应该为多大? 就像经常被问到,在回归分析中,R平方应该为多大才表示回归模型是好的?我经常能够听到这类问题,在没回答这个问题之前,我会解释如 何来解释R平方值,我也会阐 ...

  4. delete this及堆破坏检测方法

    作者: Bruce   日期: 2012年06月03日 04:20 周日 发表评论 (0) 查看评论 --END*1--> 0 条评论 --END*2-->1,837 人阅读   程序BU ...

  5. jsp&servlet学习笔记

    1.路径引用问题 一个css.jsp.html.或者javascript文件从从一个工程复制到另一工程,如果引用的时候使用的时相对路径,看似没有错误,但是却一直引用不进来,这时候要使用绝对路径,这样才 ...

  6. 关于delphi PAServer 远程调试DLL文件

    用PAServer调试的话会产生一个默认user-connectionname的文件夹,且这个文件夹不能自定义.因此无法使调试的dll文件生成到host主程序所在的文件夹下而导致无法调试. 变通方法: ...

  7. Linux 实现rsyslog日志里面的IP地址记录 未测试

    之前我是在bashrc中添加了一句,让系统操作日志时向rsyslog发送一份内容,现在只要在发送的时候,自己再获取下当前的远程登录IP加进去就可以,像这样 /etc/bashrc sshClientI ...

  8. Java锁之自旋锁详解

    锁作为并发共享数据,保证一致性的工具,在JAVA平台有多种实现(如 synchronized 和 ReentrantLock等等 ) .这些已经写好提供的锁为我们开发提供了便利,但是锁的具体性质以及类 ...

  9. k Sum | & ||

    k Sum Given n distinct positive integers, integer k (k <= n) and a number target. Find k numbers ...

  10. JS 保留小数点后面2位小数

    1. 最笨的办法....... [我就怎么干的.........] function get(){    var s = 22.127456 + "";    var str = ...