Where are all the shared libraries stored on android?

shaveenk picture shaveenk · Feb 11, 2016 · Viewed 7.1k times · Source

Where are all the shared libraries (.so) stored on Android? I was able to find the /system/lib directory but I'm sure there are more. Not being able to use the find command doesn't help either.

Answer

Paul Ratazzi picture Paul Ratazzi · Feb 17, 2016

In the many AOSP and vendor images I have analyzed, I've observed a regular pattern of locations for shared libraries, as follows (some of these are only in newer versions):

  • system/app/<name>/lib/<arch>
  • system/priv-app/<name>/lib/<arch>
  • system/lib
  • system/lib64
  • system/vendor/lib
  • system/vendor/lib64

I've also occasionally seen non-standard locations, for example system/csc/common/system/lib64/ on a Samsung Edge running Android 5.1.1.

Your best bet in finding the location of all shared libraries on a particular device is to recursively search the entire device filesystem as root using find / -name \*.so. If there's no way for you to get find installed (via Busybox or the like), you might try extracting the system image, mounting it on a Linux system and running find over the mounted filesystem.