Is it safe to support only armeabi-v7a for Android 4 and above?-ThrowExceptions

Exception or error:

I have developed an app which is mostly in C++ and is compiled by NDK to .so libraries as usual. We know that native apps have to be build for each CPU architecture separately; So I have different so files for armeabi and armeabi-v7a. (I deliberately left out x86 and mips, since not many Android devices with these architectures are released.)

However, the size is very big and each so file takes about 90 MB of space and I want to reduce it.

I know I can leave out armeabi-v7a, because of backward compatibility, but in that case the app will run very slowly.

Considering the fact that my app supports only android ICS and above (minSdkVersion="14"), Can I safely remove armeabi and suppose that all of these new devices use armeabi-v7a? Or some of the devices may still use the old armeabi and not armeabi-v7a architectures?

How to solve:

The unmodified, original Android source for Android 4.0 and newer doesn’t support ARMv5/ARMv6 by default (but can be modified to build for ARMv5/ARMv6 – there are custom builds of it that run on ARMv6). I’m not sure if one can get an ARMv6 device certified compatible with such Android releases, or if it only is applicable for unofficial firmwares. Since Android 4.4, the CDD (compatibility definition) strictly requires ARMv7. See https://android.stackexchange.com/questions/34958/what-are-the-minimum-hardware-specifications-for-android for details on this.

So yes, maybe, in principle, you could drop armeabi if your app requires Android 4.0, but I’m not sure if there is any such official guarantee. If you require Android 4.4, it should absolutely be fine though.

###

There are no Android 4+ devices which support armeabi but not armeabi-v7a, so you can safely drop armeabi.

You can check this yourself in Google Play: create 2 APK’s (1 which supports armeabi and 1 which supports armeabi-v7a) and try uploading both to Google Play. You’ll notice they have the same number of supported devices.

You will even get an error when uploading to Google Play if you split your APK by architecture while trying to support both architectures:

Version xxx of this app can not be downloaded by any devices as they
will all receive APKs with higher version codes.

###

As a zenfone 2 owner I would say no – these devices run ICS+ but with x86 microarchitecture. If you search android x86 percent on google you should be able to come across a unity page telling you the market share of different microarchitecture. Also, there’re a few niche products using MIPS-bases CPUs and run ICS+.

While there do have a mechanism to let x86 android devices run apk compiled without a so for x86, that have other drawbacks.

Leave a Reply

Your email address will not be published. Required fields are marked *