Google released Android 11 Developer Preview 2 earlier this month. With this release, Google has made a key change to enable more efficient debugging of apps on the Android emulator in Android Studio. Android 11 system images for x86 processors now allow applications with C or C ++ dependencies to run more easily without full ARM emulation and using hardware acceleration and processor virtualization of x86 hardware.
Android apps written in native code (i.e. C or C ++) should be compiled with different processor architectures in mind. There should be different versions of the application targeting different processor architectures such as ARM, ARM64, x86, or x86-64. This is because native code is directly compiled into machine instructions for the specific architecture, unlike Kotlin or Java applications that run on Android Runtime (ART).
In order to test your application through the Android emulator running on an x86 computer, you need a different version for the x86 processor. The x86 version of the app will not work on smartphones as they are usually based on ARM or ARM64 processors. Until now, the only solution to this problem has been to either use a physical Android device or install emulator images with full ARM emulation for x86 processors. The latter option is performance-intensive and cannot take full advantage of the hardware acceleration and processor virtualization offered by x86 processors.
To fix this, Google has now released the new Android 11 x86 system images with ARM compatibility. These system images use ABIs (Application Binary Interfaces) which serve as an intermediary between applications written in different languages or between applications and the operating system. The ARM instructions in the ARM binary are exclusively translated to x86 while the rest of the code continues to be executed in x86. Due to this isolation of ARM binaries, the process is less performance intensive and even runs on low level hardware.
Besides allowing easier debugging of Android apps using C ++ dependencies, this will also allow developers to simply release the ARM version of their apps with ABIs instead of an x86 version for Chromebooks in the future. . This will boost support for more Android 11 targeted apps on a variety of Chromebooks.