1. Open Terminal
2, go to the Java installation root directory, that is, the input
cd/library/java/home/bin/
3, the current user does not have the highest permissions, in the Library folder can not generate any files, you may go to the current user directory to generate files
Keytool-genkey-v-keystore android.keystore-alias android-keyalg rsa-validity 20000-keystore/users/The user name of the current user/android _demo.keystore
If the current user name is Xiaoming, the following
Keytool-genkey-v-keystore android.keystore-alias android-keyalg rsa-validity 20000-keystore/users/xiaoming/android _demo.keystore
4, follow the prompt input can, complete code as follows
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]: Xiao Ming Group What's the name of your city or Locality? [Unknown]: What's the name of your state or province in Guangzhou? [Unknown]: What's the Two-letter country code for this unit in Guangdong Province? [Unknown]: 86Is cn=li xiaoming, ou=www.xiaoming.com, o= Xiao Ming Group, l= Guangzhou, st= Guangdong province, c=86 correct? [No]: yesgenerating 1,024 bit RSA key pair and self-signed certificate (SHA1WITHRSA) with a validity of 20,000 daysfor:c N=li xiaoming, ou=www.xiaoming.com, o= Xiao Ming Group, l= Guangzhou, st= Guangdong Province, c=86enter key password for <android> (RETURN if same as key Store password): [Storing/users/xiaomIng/android_demo.keystore]
5, here can be to the current user root directory to view the production of KeyStore signature files
Reference official website: http://developer.android.com/intl/zh-cn/tools/publishing/app-signing.html#signing-manually
This article link: http://www.cnblogs.com/liqw/articles/4064662.html
Mac Android Signature Generation KeyStore