Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Will the binaries built for ARM work on Intel processors? [Android]

Using NDK I built binaries for ARM processor, but due to some dependencies I can't build them for x86. Is there any chance to use this binary on x86 or MIPS architecture?

like image 537
Taras Avatar asked Jan 31 '14 13:01

Taras


People also ask

Does Intel adopt ARM?

At its virtual Architecture Day 2021, Intel announced a number of new initiatives, key among them an Arm-like future for its x86 chipsets.

Can ARM run x86?

PCs powered by Arm provide great application compatibility and allow you to run your existing unmodified x86 win32 applications. Arm apps run natively without any emulation, while x86 amnd x64 apps run under emulation on Arm devices.

Are all Intel processors x86?

x86 is a term used to describe a CPU instruction set compatible with the Intel 8086 and its successors, including the Pentium and others made by Intel and other companies. This is the CPU architecture used in most desktop and laptop computers. Many 21st century workstations and servers also use x86 processors.

How is ARM different than x86?

ARM uses more memory to process multiple instructions. It consumes 5W power even when GPUs and other peripherals are used. X86 processors focus more on performance and high throughputs, and it uses more registers to achieve it. Hence the power consumption and heat generation are more here.


2 Answers

Is there any chance to use this binary on x86 or MIPS architecture?

I cannot comment on MIPS.

x86 devices that ship with libhoudini will be able to use your ARM-based NDK binaries. AFAIK, that's most of the current-generation x86 devices, like some of Samsung's tablets. If you ship through the Play Store, libhoudini-equipped devices should be able to download and install your app, without any changes on your end.

Note, though, that libhoudini runs the ARM binaries much more slowly than it would an x86 binary. This is akin to how the Android emulator runs ARM emulator images much more slowly than it does an x86 emulator image.

like image 90
CommonsWare Avatar answered Sep 24 '22 22:09

CommonsWare


Both x86 and MIPs devices are capable of doing ARM binary translation, using Magic Code on MIPs, and Houdini on x86. However, both of these come at a cost, and neither of them are likely to be long term solutions (both companies will likely want them to go away sooner rather than later).

You mentioned that due to some dependency issues you weren't able to build the lib for x86? Is that still the case? I take it you are using some lib that doesn't include an x86 version?

For future reference, if you do want to build for x86 native, the process is extremely simple, all you have to do is add APP_ABI+=x86 or add x86 to your existing APP_ABI list.....and....that is it. Really.

like image 45
ShriekBob Avatar answered Sep 22 '22 22:09

ShriekBob