64-bit Android, 32-bit application with 32-bit source library

Let's say we have 64-bit hardware with a 64-bit Linux kernel and 64-bit Android.
Thus, Zygote will work as a 64-bit process with its own DVM instance.

Now suppose there is a third-party application that contains a 32-bit source library that is loaded at runtime with a call system.loadlibrary.

I think that when we try to run this application, zygote will be able to start the process, and DVM will be able to interpret the classes.dex file, even if apk was created for a 32-bit machine. But the crash will happen when the application tries to load the 32-bit source library, since there will be all 64 bits on the bionic libc device and other libraries.

Is this understanding correct?

+4
source share
1 answer

As I knew, 32-bit Native libraries will work successfully on a 64-bit OS if the OS supports many 32-bit libraries ( 32-bit dll for 32-bit Java interface on a 64-bit system ), and on Android OS -arca - 32 bit limit ( https://android.stackexchange.com/questions/36291/is-android-a-32-bit-or-64-bit-os ), so you need to build 32-bit native libraries.

As a result, 32 bits need 32-bit libraries if they work on a 64-bit OS.

0
source

Source: https://habr.com/ru/post/1532659/


All Articles