Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: running armeabi only apps on Intel devices

Tags:

android

intel

arm

I'm testing the app that contains some native libraries. So far these libraries are delivered for armeabi arch only. The device used for testing purposes is Asus Zenfone 4. It is Intel based device, so I was expecting problems running the app, as there is no x86 version of the library.

Surprisingly, the app runs fine. The question is why? Is it because of some kind of ARM emulation? Is this emulation the case for all Intel Android devices?

/proc/cpuinfo contains the following:

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 53
model name  : Intel(R) Atom(TM) CPU Z2520  @ 1.20GHz
stepping    : 1
microcode   : 0x110
cpu MHz     : 800.000
cache size  : 512 KB
physical id : 0
siblings    : 4
core id     : 0
cpu cores   : 2
apicid      : 0
initial apicid  : 0
fdiv_bug    : no
hlt_bug     : no
f00f_bug    : no
coma_bug    : no
fpu     : yes
fpu_exception   : yes
cpuid level : 10
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc arch_perfmon pebs bts nonstop_tsc aperfmperf nonstop_tsc_s3 pni dtes64 monitor ds_cpl vmx est tm2 ssse3 xtpr pdcm movbe lahf_lm arat dtherm tpr_shadow vnmi flexpriority
bogomips    : 2396.16
clflush size    : 64
cache_alignment : 64
address sizes   : 32 bits physical, 32 bits virtual
power management:
like image 872
aguyngueran Avatar asked Jun 25 '15 10:06

aguyngueran


1 Answers

Is it because of some kind of ARM emulation?

Yes. It is called libhoudini. Quoting myself:

libhoudini is a proprietary ARM translation layer for x86-powered Android devices. It allows an app that has NDK binaries for ARM, but not x86, to still run on x86 hardware, albeit not as quickly as it would with native x86 binaries.

Note that libhoudini only comes into play with the NDK. Pure Java-based apps should work fine on any supported CPU architecture.

Is this emulation the case for all Intel Android devices?

"All" is a strong word. I'll hedge and say "most Intel-powered Android devices from major manufacturers".

like image 119
CommonsWare Avatar answered Nov 11 '22 20:11

CommonsWare