0

I am able to use OpenSSL static libraries (libcrypto.a and libssl.a) in my iOS app thanks to this help. Now i can also use OpenSSL dynamic libraries (libcrypto.so and libssl.so) in my Android app version thanks to this info. I downloaded the files for Android in the OpenSSL_1.0.2g_Android.zip file from here. I just guessed and used the ARM files (armeabi-v7a folder) instead of the Intel files (x86 folder) and it worked on my Android test phone.

My question: How do I make an Android build that uses the correct library files on ARM devices AND also on Intel? I don't know how to deploy both sets of files for this. Below is snip of project window showing where i test added the second libcrytpo.so library file for x86. project explorer view

But, this second libcrypto.so does not show up in the deployment window, only the first version i added (the ARM version) remains. deployment window

I was hoping i could somehow use compiler directives but maybe i just need 2 independent projects altogether? One built for Android ARM and other for Android x86? Further, all i'm needing in my code is an IdHTTP1->Get() so maybe their is a way i can use the built in BoringSSL fork? If so, how?

russ

C++Builder 10.3 Version 26.0.33219.4899

relayman357
  • 793
  • 1
  • 6
  • 30

1 Answers1

1

RAD Studio does not support producing Android apps for Intel, only for ARM, so don't even worry about trying to use the x86 libs on Android.

Also, Indy does not support BoringSSL at this time.

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
  • Thanks Remy. I'm thinking ARM covers >95% of Android devices anyway. I just now found [this Embarcadero link](http://docwiki.embarcadero.com/RADStudio/Rio/en/Android_Devices_Supported_for_Application_Development) that says Intel Android devices (KitKat and above) include an emulation library called `libhoudini`. This is a translation library automatically invoked by the os, allowing the Intel cpu to interpret and execute binaries compiled for ARM cpus. Also says, "FireMonkey applications are generally compatible with `libhoudini` library." I may try to find an Intel Android and test this. – relayman357 Jun 15 '19 at 01:45
  • Remy - i bought an intel based tablet (Nuvision Solo 8) and my app built with the ARM Indy files (`libcrypto.so` and `libssl.so`) ran fine! It looks like `libhoudini` properly translates the ARM instructions for the Intel processor. So, even though RAD Studio does not support an Intel build, the ARM build will work fine. The only Indy function i'm using right now is `IdHTTP1->Get(temp)` where `temp` is a string with a full URL starting with `https`. Note: The cpu is X86 `Genuine Intel (R) CPU @ 728` per [SysCheck](https://play.google.com/store/apps/details?id=com.ss.syscheck&hl=en_US). – relayman357 Jun 18 '19 at 02:24