Android NDK: override dynamic linking for native libraries?

I have an application that uses some native libraries through .SO files.

I am in a situation where I can’t download the new version of the application into the Google game, because these native libraries link to old versions of OpenSSL and LibPNG, which have security vulnerabilities, as described here: https://android-developers.blogspot.com. eg / 2016/06 / android-changes-for-ndk-developers.html

My question is: is there a way to include .SO files in a new project along with new versions of OpenSSL and LibPNG and redefine the link to old versions of OpenSSL and LibPNG?

Knowing that I cannot rebuild the .SO files because I do not have the source files.

Is there a way around the solution?

+4
source share
1 answer

If you have lost access to the source code of your library, but have files .o(or an archive .a), you can choose a different version of the dependencies.

If you use OpenSSL and libPNG as dynamic libraries, your life is simpler. If you are statically attached to your file .so, you will need advanced ELF manipulation methods that can help if you're lucky and determined.

All this can work only if the interfaces that you use in these libraries remain untouched.

+1
source

Source: https://habr.com/ru/post/1663098/


All Articles