ldd equivalent on android

后端 未结 4 1211
情歌与酒
情歌与酒 2020-12-30 00:58

I have a libTest.so that does not load on some devices. logcat is absolutely useless. Using arm-linux-androideabi-readelf.exe -d libTest.so I was able to see al

相关标签:
4条回答
  • 2020-12-30 01:23

    You can do something like:

    $ /lib/ld-linux.so.2 --list filename
    

    This is because ldd is just a shell script that works like a wrapper around the dynamic loader. The name of the dynamic loader, i.e., ld-{version}.so might differ.

    0 讨论(0)
  • 2020-12-30 01:31

    Thanks to android developers. My feature request was implemented :) Now we have ndk-depends, a tool that allows to troubleshoot dependencies.

    Edit: it doesn't do full symbol resolution though. E.g. if you build against Android-14 and try to use methods that didn't exist in old Androids, then this tool won't list missing symbols. This part was left as a TODO in ndk-depends.

    0 讨论(0)
  • 2020-12-30 01:34

    If you don't have the NDK try doing:

    readelf --dynamic filename | grep NEEDED
    

    to display the dynamic libraries for an elf binary.

    0 讨论(0)
  • 2020-12-30 01:49

    At Android terminal try this:
    strings /path/to/your/file | grep ^lib Found here: https://forum.xda-developers.com/showthread.php?t=2737126&page=5

    0 讨论(0)
提交回复
热议问题