Skip to content
- 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.so whose SONAME is
libcrypto.so.1.0.0 can 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.z and a symbolic link named
libxxxx.so would 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
libs directory inside the apk. That’s good. But! But it packs only files with .so extension. So, files like
libxxxx.so.x.y.z would be packed into the apk, and we don’t have any configurable option on both
gradle file and
CMakefile.txt to add them manually.