- Old Android version (4.4 on my side) didn’t look for shared library by SONAME inside. It only checks file name. For example, in recent Android version (7 or 8), one file named
libcrypto.sowhose SONAME is
libcrypto.so.1.0.0can be loaded by dependents successfully. But in old versions the system reported “dlopen failed to load libcrypto.so.1.0.0”.
- In Linux’s programming conventions, a shared library usually has name like
libxxxx.so.x.y.zand a symbolic link named
libxxxx.sowould also be created pointing to the former. That’s OK in a normal Linux system, but has problems with Android’s app. The android apk’s zip format didn’t recognize symbolic link, and as I described in 1. it also didn’t load shared library by SONAME.
- Android Studio integrated CMake to build native libraries and it also packs what generated by CMake
libsdirectory inside the apk. That’s good. But! But it packs only files with .so extension. So, files like
libxxxx.so.x.y.zwould be packed into the apk, and we don’t have any configurable option on both
CMakefile.txtto add them manually.