Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are all the shared libraries stored on android?

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.

like image 447
shaveenk Avatar asked Feb 11 '16 02:02

shaveenk


People also ask

Where are Android libraries stored?

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.

Where are shared libraries located?

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.

What is an android shared library?

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.

What is Libnative so?

libnative-lib.so is the shared library name associated with your own project. It will be specified in your own CMakeLists. txt .


1 Answers

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.

like image 193
Paul Ratazzi Avatar answered Oct 04 '22 10:10

Paul Ratazzi