Problem with SSL library on Andoid 6+
I'm making a project for the GearVR on Android. I'm using a library which dynamically loads another .so library (i.e. using dlopen), which depends on openssl, (libssl.so). On phones running Android 6.0+, the ssl library on the device is severely stripped down, so the dlopen fails with a "missing symbol" error.
I've compiled openSSL from source, so that I have a full ssl library, but I don't know how to properly include the new ssl library and make dlopen look for the dependencies inside it.
Edit: If it helps any, the I'm trying to work with python stuff, the library that's being loaded is _ssl.so;
I've tried including my libssl in the .apk by putting it in Engine/Build/Android/Java/jni and editing the Android.mk file. After doing that, I did dlopen() on my libssl with the GLOBAL flag, before doing the python initialization, and that didn't work.
After that I recompiled, my libssl to have a versioned soname (I think), and recompiled the python _ssl.so to have the version in it's dependency, and now it seems to be loading the libraries properly on Android 6, but it's broken on Android 5, saying it can't find the libssl.so.1.0.0 that it depends on
I've got it working. I included my libssl.so in Engine/Build/Android/Java/jni and edited the Android makefile (similar to what's done here: https://forums.unrealengine.com/showthread.php?3504-Android-Java-Libraries-in-UE4-Game-%28OUYA-SDK-Google-Play-Game-Services-etc-%29&highlight=android%20.so) and then made my own dlopen call to open with the RTLD_GLOBAL flag before the python initialization that had the failing dlopen.
It didn't seem to work if the python library had an explicit dependency on a libssl.so written into it's file, or if my libssl.so had the same soname as the default Android one, so I compiled a versions of the libraries where those weren't the case.
answered May 25 '16 at 05:43 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here