Android NDK. A lot of ABIs: armeabi, armeabi-v7a, arm64-v8a… Which one of them is really worth building native.so-libs for?

Armeabi, armeabi-v7a, arm64-v8a, x86, x86_64, mips, mips64...

Well, armeabi-it seems clear. This kind of architecture is on all (or almost all) real gadgets.
x86-it seems also clear. This is primarily for Genymotion and other emulators where Android is x86.

And the others?

Would it be an ideal solution to just build a lib for all ABIs? And if it is not possible to test everywhere, but only on x86 and armeabi?

And why so many agms: armeabi, armeabi-v7a, arm64-v8a? Which one is more relevant? How do I determine which one is supported by my gadget? Can there be several at once?

Author: pavlofff, 2016-03-07

1 answers

x86 is primarily Intel Atom processors, which are installed in a considerable number of real devices, and not emulators. The emulator, just can emulate any architecture, regardless of the architecture of the processor on which it is hosted - that's why it is an emulator. You can see this for yourself by looking at the list of images for emulation:

scrn

The minimum set of supported architectures is the set APP_ABI := x86 armeabi. Next, you should decide whether there will be your application uses additional features of the armeabi-v7a architecture, for example NEON - if this is the case, then this architecture should also be included in the list (extended list of arm-v7 instructions) - in fact, now almost all ARM processors, at least v7

Recently, devices with processors on 64-bit architecture are increasingly appearing on the market, so they are also worth considering.

You can definitely ignore it mips/mips64

You can find out what architecture your device has by looking at the specification of the processor it uses. For example, Qualcomm Snapdragon 820 - ARM-V8A. You can also find programs in the market that will show system information.

There can't be multiple ARM architectures in a single processor, but each next one includes the previous one, that is, ARM-V7 includes ARM, and ARM-V8 includes ARM-V7. In fact, the most relevant ARM platform now is ARM-V7, on it the absolute majority of existing processors are built, but ARM-V8 is actively advancing.
The difference in ARM architectures is obvious, each next one is a step in evolution, new features are added at the level of the iron core.

You can specify to build a library for all abis, and this will be a good solution if the final size of the application suits you - each additional platform - new files that have a size.

The official guide on this subject.

 7
Author: pavlofff, 2016-03-08 04:06:51