I’m trying to track down a bug in my software line. I have two release build version 2.0.962 and 2.0.966. The only difference between these versions is a lib.so file. In order to figure out where to start looking in the source tree for lib.so, I need to know its version number in each of the release builds.
Is there a command line tool for printing the version of a shared object?
Advertisement
Answer
I never did native android programming but as Android uses Linux kernel, the executable format used will most likely be “ELF”. As far as ELF is concerned, there is no version information of Shared object stored in the file. So unless the file name itself is saying something like "libXXX.VERSION.so"
, there is no other way to find out the version number of the shared object. This technique is generally used in Linux.
My suggestions for solving your issue are:
- Use Date modified if possible to differentiate the shared objects
- Use dlopen() or similar to open the shared object and try to see the functions being exported.
Source: http://man7.org/linux/man-pages/man5/elf.5.html Note: E_VERSION in the executable is the version of ELF format, not of executable.