Question: how to generate bks file?
Answer: Step 1: Obtain your Public Key certificate. Your certificate can be self-signed or CA-signed certificate. ...  Step 2: Create a BKS file. You need to download bouncy castle jar to create BKS file. ...  Step 2: Apply SSL pinning to OkHttp Client. I created a helper class for ssl pinning.