title: How to fix 'dlopen failed: cannot locate symbol "EVP_camellia_128_cbc"' when loading libssl.so on Android 5.x
body: <p>I tried to build 64bit (arm64) Openssl v1.1.1b and add it to my app as shared library (libcrypto.so and libssl.so).
  I built standalone toolchain with --arch arm64 and --api 21 arguments, then I built openssl libraries with it and added them to my app.
  All 64bit devices with Android 6.x and higher works great, but I am stuck on the Android 5.0.1 64bit – Lenovo  TAB 2 A10-70L tablet.</p>
  
  <p>The problem is, that on this specific Android, when I am loading libssl.so, I get error:</p>
  
  <pre><code>E/art     ( 2755): dlopen("/data/app/com.myapp.mypackage-1/lib/arm64/libssl.so", RTLD_LAZY) failed: 
  dlopen failed: cannot locate symbol "EVP_camellia_128_cbc" referenced by "/data/app/com.myapp.mypackage-1/lib/arm64/libssl.so"...
  
  E/MY_APP( 2755): 2019-06-12 14:22:27,984: [MY_APP][18446744071776944368] ERROR (2117) - Error in loading libraries : 
  dlopen failed: cannot locate symbol "EVP_camellia_128_cbc" referenced by "/data/app/com.myapp.mypackage-1/lib/arm64/libssl.so"...
  </code></pre>
  
  <p>So exception will be thrown -> loading of other libraries after libssl.so will be not performed and app crashes during or after splashscreen.</p>
  
  <p>I found on StackOverflow, that it can be caused, if you compile native library (as openssl) against higher android version, then the used tablet is… But I make openssl with api 21, that’s Android 5.0, so there shouldn’t be problem. It seems, that openssl expects this symbol in libraries of the device and this device doesn’t have it.</p>
  
  <p>What I tried:</p>
  
  <ol>
  <li>To use different NDK’s to build openssl -> I used 15-19 NDK’s,
  with this version I built an app, but the same error occurred (with
  “cannot locate symbol”). I tried 12-14 NDK’s to be close to NDK we
  are using in our app for other native libs (which is 12b), but with
  this NDK I am not able to make openssl libs at all, it will fail
  during build. </li>
  <li>To use different NDK’s to build whole app -> I
  tried 16 and 19, but there were failures in the build and I don’t
  think, it would help.</li>
  <li>To use 21 as minsdkversion in
  AndroidManifests, project-properties and build.gradle files to have
  everything in the same api version, but with no success. </li>
  <li>I tried built and implement higher version of openssl – 1.1.1c – but the
  same error with Camellia occurred. </li>
  <li>I tried to add that missing
  symbol as a macro to evp.h, but with no success (maybe I should add
  it in the different way). </li>
  <li>I tried to exclude camellia cipher from
  build of openssl by editing makefile, but whole build ended with
  error</li>
  </ol>
  
  <p>Why might this be happening, and how can I fix it to run my app on Android 5.x 64bit?</p>