0

I have an app that relies on some ARM 32-bit native libraries along with my own native library. Due to the new 64-bit requirement I need to have both 32- and 64-bit libraries in my APK, but I do not have access to the source code of those libraries so cannnot compile them to satisfy this demand.

I looked for 64-bit versions of the libraries I rely on and am sure they don't exist. Is it possible to somehow translate binaries from 32-bit to 64-bit or create fake libraries that won't be loaded at all?

prl
  • 11,716
  • 2
  • 13
  • 31
IchZerowan
  • 41
  • 6
  • Just double checking that you are referring Intel x86 to x64 or ARM-32 to ARM-64. – Morrison Chang Feb 01 '19 at 22:34
  • ARM-32 to ARM-64 – IchZerowan Feb 01 '19 at 23:21
  • Related: [How to make Android apps which support both 32-bit and 64-bit architecture?](https://stackoverflow.com/q/48549563/295004) – Morrison Chang Feb 01 '19 at 23:49
  • _"or create fake libraries that won't be loaded at all?"_ They *would* be loaded though. If your app contains both 32-bit and 64-bit versions of a library and it's running on a 64-bit device, then the 64-bit library would be loaded. I think even trying to explicitly load the 32-bit version would fail, but I may be misremembering. – Michael Feb 02 '19 at 08:55

1 Answers1

0

No this is not possible. Your problem is similar to: Linking 32-bit library to 64-bit program

Sadly the already bad solution for this type of problem, which is interprocess communication between an 32bit and a 64bit application will not work since the application which runs the native code needs to be 64bit.

This solution won't work anymore too see the statement at the bottom.

So you have only the following options:

  • Contact the publisher / owner of the library and request 64bit binaries.
  • Look for another library which might replace the current one.
  • Recode the needed functionality yourself. You might wanna disassemble the original library for that.
  • Run the 32bit library on a Server and make the app communicate with the Server. May be super slow and it requires an permanet internet connection.

I am pretty sure that providing "Fake" 64bit binaries will violate the ToS of the PlayStore so even if it get's accepted in first place it your app might get removed at any time.

But if you are willing to take the risk you can create you own 64bit version of the library you just need to make sure the linker is satisfied.

Crigges
  • 1,083
  • 2
  • 15
  • 28