Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mono for Android - Supported Architecture - Drop x86?

We have a near complete application, and are trying to squeeze under the 50MB download limit for Google Play.

When inspecting our APK to try to find ways to drop our file size, I noticed the lib\x86, lib\armeabi, and lib\armeabi-v7a directories that are described here. They correspond to the 'Supported architecture' option in project options of a Mono for Android project.

If I remove x86, I save around 1.1 MB on our APK size. (This is almost enough to get us under 50MB)

  • What are the drawbacks for removing x86?
  • Will my APK still run on x86 devices?
  • Is there any substantial market share on Google Play for x86 devices?
  • If it will not work on x86, will Google Play prevent my APK from being installed on x86 devices?
like image 716
jonathanpeppers Avatar asked Nov 07 '12 19:11

jonathanpeppers


People also ask

Is armeabi v7a 64-bit?

Note in this example the presence of armeabi-v7a and arm64-v8a libraries, which means the app supports 64-bit architectures.

What is arm64-v8a in Android?

arm64-v8a. This ABI is for ARMv8-A based CPUs, which support the 64-bit AArch64 architecture. It includes the Advanced SIMD (Neon) architecture extensions. You can use Neon intrinsics in C and C++ code to take advantage of the Advanced SIMD extension.

What is ARM APK?

There are three main CPU architectures used in today's Android phones. ARM is perhaps the most common, as it's optimized for battery consumption. ARM64 is an evolution of the original ARM architecture that supports 64-bit processing for more powerful computing, and it's quickly becoming the standard in newer devices.

What arch is my phone?

For the Android version, look at the OS version under the Device section. This explicitly displays the version number. For architecture info, slide over to the System tab and check out the CPU Architecture and Instruction Sets entries under the Processor tab.


1 Answers

Note that the following answers are for general Android development and do not reflect anything specific to Mono:

What are the drawbacks for removing x86?

Your app will not run on x86 devices. Intel may cry.

Will my APK still run on x86 devices?

No.

Is there any substantial market share on Google Play for x86 devices?

IMHO, not presently. A few handsets were released in 2012 that are Intel-powered (e.g., Motorola RAZR i), and the first generation of Google TV devices were powered by Intel CPUs. But Google TV has switched to ARM, and it will be some time before Intel CPUs make up a substantial portion of the Android device ecosystem (again IMHO).

If it will not work on x86, will Google Play prevent my APK from being installed on x86 devices?

It should. If not, the Play Store has serious issues. While I have a RAZR i sitting here, I don't off the top of my head know an app that uses native code that does not ship with x86, to see if the app in question is indeed filtered out of the Play Store.

are trying to squeeze under the 50MB download limit for Google Play

If a 1.1MB savings "is almost enough to get [you] under 50MB", you are already in trouble. Apps tend to grow, not shrink, over time. If you expect that you will be able to switch to some other distribution architecture (e.g., use APK expansion files) eventually and just need a short-term stop-gap solution, cutting x86 may be OK. But you really need to have a plan for dealing with app size growth that takes you back over the 50MB barrier, and you may be better served addressing that now rather than shipping something and finding yourself painted into a corner as a result.

like image 79
CommonsWare Avatar answered Sep 24 '22 10:09

CommonsWare