1. Generate the server-side private key kserver.keystore file.
keytool-genkey-alias server key-validity 1-keystore kserver . keystore
2. According to the private key, export the server-side security certificate.
keytool-export-alias server key-keystore kserver . keystore-file server . CRT
3. Import the server-side certificate into the client's trust keystore.
keytool-import-alias server key-file server . CRT-keystore t client . keystore
4. Generate the client private key kclient.keystore file.
keytool-genkey-alias client key-validity 1-keystore kclient . keystore
5. According to the private key, export the client security certificate.
keytool-export-alias clientkey-keystore kclient . keystore-file client . CRT
6. Import the client certificate into the server-side trust keystore.
keytool-import-alias client key-file client . CRT-keystore tserver . keystore
The generated files are divided into two groups: server-side storage: kserver.keystore server.keystore client-side storage: kclient.keystore client.kye store.
keytool-import-alias server key-file server . CRT-keystore t client . bks-storetype BKS-provider org . bouncy castle . JCE . provider . bouncy castle provider
keytool-genkey-alias client key-validity 1-keystore kclient . bks-storetype BKS-provider org . bouncy castle . JCE . provider . bouncy castle provider
keytool-import-alias client key-file Android . CRT-keystore kclient . bks-storetype BKS
keytool-import-alias CSS webkey-file ca . CRT-keystore kclient . bks-storetype BKS
keytool-import-alias cakey-file ca . CRT-keystore t client . bks-storetype BKS
key tool-import-alias server key-file server . CRT-keystore t client . bks-storetype BKS
key tool-import-alias server key-file server . CRT-keystore t client . bks-storetype BKS
keytool-import-alias server key-file server . CRT-keystore client . bks-storetype BKS-provider org . bouncy castle . JCE . provider . bouncy castle provider
I have the same problem. Here are the steps to correctly create a custom keystore that can be used for eclipse debugging:
Basically, what you should do is to change both storepasswd and keypasswd of the alias androiddebugkey to "android".
Here are the commands:
keytool-change alias-keystore my keystore . keystore-alias my alias-destalias androiddebugkey
Keytool-keypasswd-keystorymykeystore. keystore-alias androiddebugkey
keytool-storepasswd-keystore my keystore . keystore
Ant automatic packaging apk
Key.alias= alias
At first, I thought this alias could be written casually. Later, many attempts found that scribbling and packaging were definitely unsuccessful. This alias should be the same as when the signature was first generated. Because I didn't apply for the signature, and my colleagues who applied for the signature forgot the alias of the signature, I had to find a tool to check the signature information. In fact, this tool is unnecessary, but it is available in jdk.
Direct keytool-list-v-keystorexxxx information. Keystore-storepass password signature is available.
Keytool -list -v -keystore keystore name -storepass keystore password