Skip to main content

Android Native CPU ABI

Every piece of native code generated with the Android NDK matches a given ABI(Application Binary Interface). ABI defines exactly how machine code is expected to interact with the system at runtime.
ABI describes following things at runtime:
  • the CPU instruction set that the machine code should use
  • the endianness of memory stores and loads at runtime
  • the format of executable binaries (shared libraries, programs, etc...) and what type of content is allowed/supported in them.
  • various conventions used to pass data between your code and the system (e.g. how registers and/or the stack are used when functions are called, alignment constraints, etc...)
  • alignment and size constraints for enum types, structure fields and arrays.
  • the list of function symbols available to your machine code at runtime, generally from a very specific selected set of libraries.
Android Supported ABIs:

1.armeabi: This ABI is for ARM-based CPUs that support at least the ARMv5TE instruction set.It is the ARM Architecture.
2.armeabi-v7a: Thi is an extension of armeabi for ARM-based CPUs which has included a few cpu instruction.
3.X86: This is the name of an ABI for CPUs supporting the instruction set which targets Pentium Pro instruction set.Generated code is optimized for Atom CPU
4.mips: This is the name of an ABI for MIPS-based CPUs that support at least the MIPS32r1 instruction set. It includes MIPS32 revision 1 ISA, Little-Endian, O32, Hard-Float, no DSP application specific extensions.

By default, The Android NDK generats machine code for 'armeabi' ABI.However we can define APP_ABI in file to generate ABI for compatible machine code. For more this.

When we install apk, the package manager service will scan the .apk and look for any shared library form:


If anyone is found, then it's copy under $APPDIR/lib/lib<name>.so, where $APPDIR corresponds to the application's specific data directory.
If none is found, and a secondary ABI is defined, the service will then scan for shared libraries of the form: 
If anything is found, then it's copy under $APPDIR/lib/lib<name>.so

This automatically extract the best machine code for the target device from the package at installation time.


Popular posts from this blog

Display video from specific folder with rounded shape thumbnail

Hi friends ,This is complete post, about how to display video form specific folder and display it with rounded shape and play it on click event. For Rounded shape I have used custom ImageView.
Now have a look on code part.
<?xml version="1.0" encoding="utf-8"?>
<GridView xmlns:android=""
    android:stretchMode="columnWidth" >

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android=""

Custom Android SeekBar Developement

Before starting coding for Custom SeekBar,You must have good concept of following topics. 1.Layer List 2.Animation List 3.Selector Layer List:A LayerDrawableis a drawable object that manages an array of other drawables. Each drawable in the list is drawn in the order of the list—the last drawable in the list is drawn on top.
<layer-listxmlns:android=""> <item android:id="@android:id/background" android:drawable="@drawable/seekbar_total"/> <itemandroid:id="@android:id/secondaryProgress"> <clipandroid:drawable="@drawable/seekbar_buffer"/> </item> <itemandroid:id="@android:id/progress"> <clipandroid:drawable="@drawable/seekbar_played"/> </item> </layer-list> Animation List:A AnimationDrawable is a drawable object that is used to create frame-by-frame animation.It's oneshotelement should be true if u want loop animation otherwise false.

Custom Volley-Gson request implementation

This page covers Volley-Gson integration and also Volley custom Request. We assume that, you are familiar with Volley and Gson.

Volley has some inbuilt request which you can use, if your response is a String, Image, or JSON, in that case, you don't need to implement a custom Request.  To use Gson with Volley, we need to implement a custom request.
To make a custom request, you need to perform following operation.
Extend Request<T> class, where T is the type of parsed response or expected response. Implement the abstract methods parseNetworkResponse() and deliverResponse().  parseNetworkResponse:  A response contains parse response of a given type i.e Gson.

    protected Response<T> parseNetworkResponse(NetworkResponse response) {
        try {
            String json = new String(
          , HttpHeaderParser.parseCharset(response.headers));
            if (BuildConfig.IS_DEBUG)
                Log.d(TAG, "Response :: " + …