73

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?

Lii
  • 11,553
  • 8
  • 64
  • 88
Esmaeel ibrahim
  • 723
  • 1
  • 5
  • 5
  • [Those](/q/56824557 "What is the difference between armeabi-v7a, arm64-v8a, x86?") [two](/q/3594394 "What are 16, 32 and 64-bit architectures?") are directly related and [those](/q/33228158) [are](/q/46453457) [further](/q/30782848) related questions. – cachius Sep 10 '22 at 08:56

3 Answers3

119

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.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
50

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'])
}
18

I recently saw a pretty good article related to the different CPUs and suggestions on maintaining APK size while supporting them. The report provides some info for the following at the end:

  • armeabi
  • armeabi-v7a
  • arm64-v8a
  • X86
  • X86-64
  • mips
  • mips64
cachius
  • 1,743
  • 1
  • 8
  • 21
cking24343
  • 3,173
  • 1
  • 21
  • 23