x86 architecture for Android phone compatibility issues
Http://www.cnblogs.com/guoxiaoqian/p/3984934.html
There have been some X86-based Android phones on the market since Intel released the Medfield platform for the mobile market in CES2012.
Most Android apps are developed using Dalvik-based Java code. Theoretically, because the Dalvik code executes in the virtual machine of the system, there is no performance loss on the Atom platform of x86. However, due to the limited execution efficiency of virtual machines, Google allows developers to use native C-language code for Applications with high performance pursuits. The native code is compiled for the hardware platform, X86,arm or MIPS have their corresponding binary files. Generally speaking, the binary code compiled for the arm platform cannot be run directly by the x86 processor. While mainstream Android products are powered by ARM processors, although Google's Android Ndk introduced the x86 compilation option early on, a significant portion of the app has been compiled for the arm platform so far, resulting in a x86 Android platform compatibility issue.
In order to solve this problem , Intel introduced the "Binary conversion" (binary translation) function at the beginning of the Atom platform of Android mobile phone system to solve the problem that x86 cannot run the ARM library directly. binary code compiled for arm will be translated by the Atom processor into code executed by x86 to run the application containing native code compiled for arm.
With this feature, x86 atom is compatible with most applications on the market. Lenovo K900, the newest Atom Z2580 processor, has advertised that it can be compatible with top 20000 applications on the market.
After solving the compatibility problem, plus x86 atom single-core dual-core, dual-core second four core performance (running points), x86 seems to have no black spots, sweeping the market is around the corner. But unfortunately, x86 propaganda "compatibility" and "performance", due to the current ecological environment constraints, and can not be combined.
While top 20000 applications are already compatible, individuals have counted the top 250 applications in the Pea pod market, with 31% of the apps not using native code. Of the remaining 69% applications containing native code, only 8% contained the x86 library, while the remaining 61% had only the arm native library. In other words, only this 8% application, x86 can play their best performance, and most of them need to do binary conversion to be compatible.
By counting the hottest games in TOP100, we found that only 6% of the games did not contain native libraries, and that more than 94% of the games contained native code. Of these, only 5% of the games contain the x86 native library, and nearly 90% of the remaining games require the Atom processor to run the code compiled for arm through a binary conversion.
In the experimental comparison, we found that when using the x86 native library, we can find Atom's single-threaded performance exceptionally strong, especially memory performance . In the case of compatibility mode, the binary switch runs the arm library, and the performance is greatly reduced. can see binary conversion compared to native execution x86 code, the loss of performance is very considerable, in the application of performance claims, the loss can be as high as 50%. In some game applications, it also brings about a 400mW increase in CPU power consumption .
Overall,x86 has a long way to go, despite the efforts of Intel and the vendors to address compatibility and performance issues, but the relatively poor eco-environment makes performance and compatibility not available .
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
It turns out that after my testing, x86 's application compatibility has been done very well, Intel has previously announced that up to 95% compatibility is not false, we can put down the burden of the heart. But how Intel does it, the reason behind it is a lot of people do not know. Just on IDF, I met an Intel software Department engineer who told me in layman's account why.
In fact, the problem is mainly in the instruction set , x86 uses the SSE instruction set, and ARM is the NEON instruction set, the difference causes the application incompatibility. Fortunately, most Android applications run on Dalvik VMS and do not rely on CPU architectures, so these applications can run well on x86.
Programs that support Dalvik occupy the majority, but there are still some applications that bypass Dalvik. For example, when higher performance or hardware support is required, the former is usually a large game, and the latter is a combination of hardware-related applications such as sensors or power management. Angry Bird both are not accounted for, so can be compatible, racing games are both needed, so most are incompatible.
These slightly more complex applications are not low, and the user needs strong. To solve these problems quickly, Intel is trying to improve by technology and has developed a conversion technology, "Houdini". "Houdini" is the equivalent of an intermediate layer that allows an otherwise incompatible application to run on the x86. But the force-combined technology is often inefficient, prone to problems, and increases power consumption by about 2%.
Solving the problem from the source is obviously a better approach, albeit slowly. Since Intel and Android have partnered, Intel has provided the x86 NDK. developers only need to support the NDK in the app, which automatically generates 2 apps at the time of submission, and the device downloads the right app based on its own architecture. This method is not difficult, the effect is the best, difficult is how to make many developers willing to cooperate. So Intel and handset makers will work with the application vendors to push them to support x86 's NDK.
There are many big games now that support the x86 architecture, including need for speed, endless swords, etc. Users do not have to worry, because of the impact of compatibility is very small.
And the most frequently used users are those that are very simple and do not need to be re-adapted. Because Android uses virtual machines, application performance is often criticized, but the benefit is that applications can easily run across platforms. Without this, it would be disastrous for Intel, and in that case Intel was lucky.
x86 architecture for Android phone compatibility issues