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.
The android default libraries like appcompact, design support libraries are stored in your folder where you have installed the SDK, precisely <SDK FOLDER>/extras/android/m2repository/com/android . The 3rd party libraries are stored in . gradle/caches/modules-2/files-2.1 folder.
By default, libraries are located in /usr/local/lib, /usr/local/lib64, /usr/lib and /usr/lib64; system startup libraries are in /lib and /lib64. Programmers can, however, install libraries in custom locations. The library path can be defined in /etc/ld.
Description. A shared library or shared object is a file that is intended to be shared by multiple programs. Symbols used by a program are loaded from shared libraries into memory at load time or runtime.
libnative-lib.so is the shared library name associated with your own project. It will be specified in your own CMakeLists. txt .
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With