Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is armeabi and why they use it?

I see this library (armeabi) many times when I explore open sources.

I net searched for an explanation of it, but all the results I found are talking ABOUT it and not defining it.

What is this armeabi and why are they using it in Android applications?

like image 289
Esmaeel ibrahim Avatar asked Apr 13 '14 11:04

Esmaeel ibrahim


People also ask

What is Armeabi?

EABI - Embedded Application Binary Interface. So ARMEABI are compiled binaries matching your android device's CPU architecture.

Which is better arm64 or Armeabi?

armeabi-v7a is the older target, for 32 bit arm cpus, almost all arm devices support this target. arm64-v8a is the more recent 64 bit target (similar to the 32-bit -> 64 bit transition in desktop computers).

What is Armeabi-v7a and arm64?

o lib/armeabi-v7a is the older target, for 32 bit arm cpus. o lib/arm64-v8a is the more recent 64 bit target. o arm64-v8a devices can run code compiled against armeabi-v7a. o some lib/x86 & lib/x86_64 devices can run code compiled for arm devices.

What is v7a?

armeabi-v7aThis ABI is for 32-bit ARM-based CPUs. The Android variant includes Thumb-2 and the VFP hardware floating point instructions, specifically VFPv3-D16, which includes 16 dedicated 64-bit floating point registers.


2 Answers

Android devices have CPUs. Many of those CPUs are based on the ARM architecture, while some are based on x86, and a few others are based on other stuff like MIPS.

Some Android apps use the Native Development Kit (NDK) to create C/C++ code to link into their app. C/C++ code needs to be compiled for a specific CPU architecture. The NDK places the version of the C/C++ code compiled for each architecture into an architecture-specific directory. One of those directories is armeabi/, which is for a generic ARM CPU. There is also armeabi-v7/ (for an ARM v7-compatible CPU), x86/ (for x86 CPUs), etc.

like image 179
CommonsWare Avatar answered Sep 29 '22 01:09

CommonsWare


ABI - Application Binary Interface

EABI - Embedded Application Binary Interface

So ARMEABI are compiled binaries matching your android device's CPU architecture.

e.g.

arm64-v8a (Nexus 5x) - 64bit - ARM Cortex-A35, ARM Cortex-A53, ARM Cortex-A57, ARM Cortex-A72, ARM Cortex-A73

armeabi-v7a - 32bit - ARM Cortex-A5, ARM Cortex-A7, ARM Cortex-A8, ARM Cortex-A9, ARM Cortex-A12, ARM Cortex-A15, ARM Cortex-A17

enter image description here

To include *.so binary jniLibs using Android Studio 2.3 place them in src/main/jniLibs folder and add the following configuration to your *.gradle file:

android {     sourceSets {         main {             jniLibs.srcDirs = ['src/main/jniLibs']         }     } }  dependencies {     compile fileTree(dir: 'jniLibs', include: ['*.so']) } 
like image 38
kosiara - Bartosz Kosarzycki Avatar answered Sep 29 '22 00:09

kosiara - Bartosz Kosarzycki