E
E
Error 5022017-01-04 21:28:40
linux
Error 502, 2017-01-04 21:28:40

How to determine the correct location of the library files in the program?

There is a program written in C ++ that was imported by one developer from Linux to Android with the addition of his GUI. I downloaded the APK, I was able to pull out the binaries themselves compiled under arm.v7 and the libraries (.so) that are needed for it to work. I decided to put all this without an application (i.e. without a GUI) - I threw both the executable file and the library into the system (the phone was rooted). I threw it in different folders - lib and bin, but when you start it from the command line, the program still does not see them, it gives an error that the libraries were not found. Apparently he didn't put it in there. I wanted to check through ldd where the program asks them from, but there is no ldd on Android. On the computer itself, I checked it through readelf -d - it displays which libraries are needed, but where to put them in the FS - no.
I tried to push them into / system / lib, but the section is write-protected, and I don’t think that when installing the APK they would be put there. Together, too, threw - does not work.
I also tried to find where the application itself puts them, but it refuses to start, it is not possible to press the "Install" button, which causes the installation of all this.
Actually the question is: How else can you find out where to put these fucking libraries?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Error 502, 2017-01-05
@NullByte

The problem was solved quite simply: it was still necessary to remount / system for writing with root rights, and drop these same libraries into its / lib subfolder. The ndk-depends utility also helped me, with the --print-paths option, I ran the binary itself through it on my computer and understood where it was looking for all the libraries from.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question