While porting features or ROMs from one Android device to another, some of us frequently encounter missing shared libs error. The process of finding missing shared libraries (.so files) might be a bit trivial, and time consuming. This tutorial is going to demonstrate a one-command way of finding all the dependencies of an executable, or another shared library.
FIRST TIME CONFIGURATION
Open up your terminal, type in:
[Member @_that told about this (better) way of performing this, without NDK and a more readable output. Thanks!]
FINDING MISSING LIBS
Basic usage is very easy. In your terminal:
Say, for example, we want to find out the dependecies (which shared libraries are required) of my sensor HAL. I would type in terminal,
And, I get the desired output!
And that's how you can find out the libraries you are missing!
FIRST TIME CONFIGURATION
Open up your terminal, type in:
Code:
$ echo 'readelf -d $1 | grep "\(NEEDED\)" | sed -r "s/.*\[(.*)\]/\1/"' | sudo tee -a /usr/local/bin/ldd-arm
$ sudo chmod +x /usr/local/bin/ldd-arm
[Member @_that told about this (better) way of performing this, without NDK and a more readable output. Thanks!]
FINDING MISSING LIBS
Basic usage is very easy. In your terminal:
Say, for example, we want to find out the dependecies (which shared libraries are required) of my sensor HAL. I would type in terminal,
Code:
$ ldd-arm sensors.msm7x27a.so
And, I get the desired output!
Code:
liblog.so
libutils.so
libcutils.so
libhardware.so
libdl.so
libmemalloc.so
libc.so
libstdc++.so
libm.so
And that's how you can find out the libraries you are missing!
Last edited: