Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Android x86 emulate ARM?

Trying to figure out how apps work on Android x86 in VMWare when they were compiled for ARM. Is the GUI running on Qemu? How exactly do they run if Android x86 is really x86?

like image 486
Joel Avatar asked Aug 09 '13 12:08

Joel


People also ask

Is Android 11 ARM or x86?

Android 11 system imagesx86: Includes both x86 and ARMv7 ABIs. x86_64: Includes x86, x86_64, ARMv7 and ARM64 ABIs.

Can x86 emulate ARM?

The WOW64 layer of Windows allows x86 code to run on the Arm64 version of Windows. x86 emulation works by compiling blocks of x86 instructions into Arm64 instructions with optimizations to improve performance.

Can Android Studio run on ARM?

Unfortunately, the architecture of the Linux container on an ARM-based Chromebook isn't compatible with Android Studio and many other Linux apps that run natively on x86 devices.

Does Android x86 run ARM apps?

The new Android 11 system images are capable of translating ARM instructions to x86 without impacting the entire system. This allows the execution of ARM binaries for testing without the performance overhead of full ARM emulation.


2 Answers

intel has released a library ('libhoudini') which translates arm instructions to x86. Then they get executed on x86 CPU.

like image 74
user739711 Avatar answered Oct 20 '22 00:10

user739711


First thing first, Android apps (pure Java) are not actually being "compiled for ARM, just like Java apps are compiled into a intermediate Java bytecodes to to executed by any platforms that supports JVM, Android apps written in Java are compiled into Dalvik bytecodes to be run on any platform that supports Dalvik VM. In this regard, how Android apps run x86 or ARM or MIPS is similar to how Java apps run on x86, SPARC, POWER, etc.

Of course if an app contains native code, then the app would need to include support for x86 to be run on an x86 emulator or an actual x86 phone/tablet.

As for the second part of your question, remember that the OS part of Android has been compiled to the x86 platform, so I would assume running x86 Android on a x86 computer is exactly same as running, for example, a Windows in a VM when using OSX.

like image 45
Kai Avatar answered Oct 19 '22 22:10

Kai