title: Listing all installed certificates on android
body: <p>I am writing an app which lists all the certificates installed on
  the device. But I found that there are two places where certificates
  are stored:</p>
  
  <ol>
  <li><p><strong>System/etc/security/cacerts.bks</strong>: This file contains list of all
  pre-installed certificate. I am able to read this file using
  Keystore class defined in frameworks/
  base/keystore/java/android/security.</p></li>
  <li><p><strong>data/misc/keystore</strong>: Another way to install certificates (e.g. through
  certinstaller app) installs third party certificate and makes
  its entry in this directory.</p></li>
  </ol>
  
  <p>But I am not getting how to read certificate info like SerialNumber,
  IssuerDN etc. from this file.</p>