The Android Canary branch, which has replaced the Android Developer Preview and is used for testing features for future Android releases, now includes support for running graphical applications compiled for Linux. This is done via the Linux Terminal application, which allows running a Debian GNU/Linux virtual machine in the Android environment, where standard Linux applications can be executed.
To launch the graphical environment, the Linux Terminal application has added a 'Display' button that enables graphics redirection through components in the main Android environment. Once the 'Display' button is activated in the terminal, a compositor server called Weston can be launched, providing a minimalist window session, which can then be used to run any graphical applications, such as demonstrating the launch of the Gedit text editor.
The development of the Linux Terminal application is carried out in the AOSP (Android Open Source Project) repository as part of the core Android platform. The functionality of the Linux virtual machine is being developed within the Ferrochrome project. In the guest environment, Debian GNU/Linux 12 is launched. The virtualization is implemented using the AVF (Android Virtualization Framework), based on the hypervisor. KVM and the crosvm toolchain. The graphical environment uses the Wayland protocol and is based on a compositor. server Weston. Applications built for X11 are launched using the DDX component XWayland.
The created environment has the capability to utilize hardware graphics acceleration, allowing for the execution of resource-intensive graphical applications like games. The VirGL - virtual GPU Virgil3D for QEMU/KVM is used for graphics acceleration. By default, hardware acceleration is disabled, and to activate it, a blank file named 'virglrenderer' must be created in the /sdcard/linux directory, after which one should look for the message 'VirGL enabled' when opening the terminal.
Source: opennet.ru
