title: How to detect which native shared libraries are loaded by Android application
body: <p>My application uses native shared library (.so), I am loading it by calling <code>System.loadLibrary("xxx")</code>. It loads fine and I can call the native methods. </p>
  
  <p>I wonder if there is any possibility to detect which shared libraries application uses. I tried to list loaded libraries by PackageManager:</p>
  
  <pre><code>PackageManager pm = getPackageManager();
  String applicationPackage = this.getApplicationInfo().packageName;
  ApplicationInfo ai = pm.getApplicationInfo(applicationPackage, PackageManager.GET_SHARED_LIBRARY_FILES);
  String[] soFiles = ai.sharedLibraryFiles;
  </code></pre>
  
  <p>but it returns an empty list. It works only if my application uses some .jar libraries like com.google.android.maps which I specify by <code>uses-library</code> in the application tag of the manifest.</p>
  
  <p>How can I list .so libraries?</p>