The operating system Ubuntu has long established itself as a reliable platform for developers and enthusiasts, but its native application ecosystem is different from the usual world. Android. Users are often faced with the need to use mobile apps, games or specific tools that have no desktop counterparts. Solving this problem requires the implementation of a compatibility layer or full emulation of the environment, which opens access to thousands of APK files. If you are a developer, you will need a clean environment for testing, but for the average user, just launch a game or messenger. Modern methods allow you to achieve high performance using the advantages of containerization, which makes the process less resource-intensive compared to classic virtual machines. APK files straight from Linux.
There are several proven integration methods, each of which has its own characteristics depending on your goals. If you are a developer, you will need a clean environment for testing, but for the average user, just launch a game or messenger. Modern methods allow achieving high performance by taking advantage of containerization, which makes the process less resource-intensive compared to classic virtual machines.
In this article we will analyze in detail the current tools, including Waydroid, Genymotion and legacy solutions like Anbox. We'll look at prerequisites, installing dependencies, and potential driver issues so you can choose the best option for your hardware configuration. Choosing the right tool will save you hours of debugging and system configuration.
Choosing the right emulation tool
The first step is to understand the differences between the available solutions, since they are based on different technologies. Emulators Create a virtual device with its own kernel, which ensures maximum compatibility, but requires significant resources. At the same time, container solutions use the kernel of the host system, providing native speed, but can be sensitive to the configuration of the graphics server.
The most modern and recommended solution at the moment is Waydroid. It runs on top Wayland and uses Linux isolation mechanisms, delivering near-native performance. For users who need cross-platform or testing on different versions of Android, classic emulators like Genymotion or Android Studio Emulator.
โ ๏ธ Attention: are better suited. For work Waydroid it is critical that your Ubuntu session runs on Waylandand not on X11. You can check this with the command
echo $XDG_SESSION_TYPEin the terminal. If the result showsx11you will need to switch to Wayland when logging in or use an emulator.
The choice also depends on the hardware capabilities of your computer. Heavy 3D games will require hardware graphics acceleration, which is best implemented in solutions that use OpenGL or Vulkan directly. Light utilities and 2D applications will run smoothly even on less powerful configurations with the right choice of software.
Preparing the system and installing dependencies
Before you begin installing the main software, you need to make sure that your Ubuntu system is completely updated and contains the necessary packages for working with containers and graphical interfaces. The absence of key libraries can lead to launch errors or unstable operation of the emulator.
First of all, update the package lists and install basic package management tools. Many modern installation methods use snap or flatpak, but low-level integration often requires standard repositories.
- ๐ฆ Update the system with command
sudo apt update && sudo apt upgrade -yto get the latest security patches. - ๐ง Install utilities for working with repositories:
sudo apt install software-properties-common curl ca-certificates gnupg lsb-release. - ๐ฅ๏ธ Check the presence of kernel modules required for virtualization using the command
lsmod | grep kvm. - โ๏ธ Make sure that you have the kernel header files installed if you plan to compile modules:
sudo apt install linux-headers-$(uname -r).
Particular attention should be paid to access rights. To work with emulators, your user must be a member of the group kvm i libvirt (if a QEMU-based solution is used). This will allow you to start virtual machines without constant password requests through sudo.
โ๏ธ System readiness check
Method 1: Installing and Configuring Waydroid
Waydroid is a container approach that allows you to run Android as an application on Linux. It uses the same technologies as Docker, but is adapted for GUIs and mobile software. This the most productive method, since it does not emulate the processor, but executes the code directly.
The installation process requires adding a special repository, since this package is not available in standard Ubuntu sources. After adding keys and a list of sources, installation takes only a few minutes.
sudo apt install waydroid
sudo waydroid init
During initialization (waydroid init), the system will prompt you to select the image type. For most users, the option with GAPPS (Google Apps) is suitable if you require access to Google services, or VANILLA for a clean system. After initialization is complete, start the service with the command waydroid session start.
โ ๏ธ Attention: Interfaces and installation methods of the package manager can be updated by developers. Always check the latest commands for adding repositories on the official project page or in the distribution documentation to avoid compatibility errors.
After launch, you will see an Android window that can be scaled and used in parallel with other Ubuntu windows. To install applications, use the built-in browser or command waydroid app-install for APK files.
How to install Google Play Store in Waydroid?
If you selected Vanilla image, Google services will not work by default. You will need to download the GApps installation script (usually available in the waydroid-extras repository) and run it inside the container. This will add the necessary frameworks for the store and account authorization.
Method 2: Using the Genymotion emulator
If you need testing on different versions of Android or emulation of a specific device, Genymotion will be an excellent choice. This is a commercial product with a free version for personal use, which is based on technology VirtualBox.
The main advantage of this method is isolation. The emulator runs as a separate virtual machine, which ensures the stability of the main Ubuntu system even if Android crashes. You can create multiple virtual devices with different characteristics.
To install, you need to download the .deb package from the official website by registering an account. After installation via terminal (sudo dpkg -i genymotion_*.deb) and installing dependencies (sudo apt install -f), launch the application from the menu or command genymotion.
- ๐ฑ Create a new virtual device by selecting the desired phone model and Android version.
- โ๏ธ Configure resource allocation: a minimum of 2 GB is recommended RAM and 2 CPU cores for comfortable work.
- ๐ Install the plugin for Android Studio if you plan to use the emulator to debug applications.
Performance in Genymotion may be lower than in Waydroid due to virtualization overhead. However, the ability to emulate GPS, battery, camera and network makes it an indispensable tool for QA specialists and developers.
Genymotion is ideal for testing, as it allows you to emulate various network scenarios and hardware configurations that are not available in container solutions.
Method 3: Alternatives and Anbox
The previously popular project Anbox (Android in a Box) is now considered obsolete and is not actively supported. However, its forks and alternatives, such as virtual machine mode, still have a right to life, especially on older systems or with specific kernel requirements. Android-x86 is a full-fledged operating system adapted for the x86 architecture. By installing its image in VirtualBox or KVM, you get the most compatible environment, devoid of problems with proprietary drivers that sometimes arise in containers. Android-x86 in virtual machine mode are still valid, especially on older systems or with specific kernel requirements.
Android-x86 is a full-fledged operating system adapted for the x86 architecture. By installing its image in VirtualBox or KVM, you get the most compatible environment possible, free of the problems with proprietary drivers that sometimes arise in containers.
This method requires more resources, since the entire device is emulated, including BIOS/UEFI and drivers. But you get root access โout of the boxโ and full control over the file system without complex manipulations with access rights.
| Characteristics | Waydroid | Genymotion | Android-x86 (VM) |
|---|---|---|---|
| Type of work | Container | Virtual machine | Virtual machine |
| Performance | High (Native) | Average | Medium/Low |
| Setting complexity | Average | Low | High |
| Google Play support | Requires setup | Yes (in paid/plugins) | Requires installation of GApps |
Installing applications and working with APK
After the environment has been successfully launched, the question of installing the software arises. Unlike a smartphone, there is no single โinstallโ button for all methods. In Waydroid you can drag APK files into the emulator window or use the command waydroid app-install package_name.apk.
For emulators based on VirtualBox (Genymotion), the use of ADB (Android Debug Bridge) is often required. It is a powerful command line tool that allows you to manage your device remotely. Install the package adb in Ubuntu (sudo apt install adb) for interaction.
adb connect 192.168.56.101:5555
adb install my_app.apk
It is important to remember security: install applications only from trusted sources. In an emulator environment, malware can gain access to your local network or files if folder forwarding is not configured correctly. Use isolated profiles to test questionable software.
Use the adb logcat command to monitor Android system logs in real time. This helps to understand why the application crashes immediately after launch.
Optimizing performance and solving problems
If applications run slowly or graphics do not display correctly, the problem often lies in the video card drivers. Make sure you have proprietary drivers installed NVIDIA or the latest open source drivers Mesa for AMD/Intel.
To speed things up, you can change the memory allocation settings. In emulators, increasing the amount of RAM often solves problems with freezes, but do not allocate more than 50% of the total memory of your computer so as not to โchokeโ the main Ubuntu system.
A frequent problem is the lack of sound. In Waydroid this can be solved by installing the package waydroid-audio or manual configuration PulseAudio/PipeWire. In VirtualBox solutions, you need to enable sound card emulation in the VM settings and select the correct controller (usually Intel HD Audio or AC97).
Why won't Waydroid run on my Ubuntu?
Most likely, you are using an X11 session instead of Wayland. Check the session type. If switching to Wayland is not an option, consider using the Genymotion emulator, which does not have this limitation.
How to transfer files between Ubuntu and Android?
In Waydroid, files are usually available in a folder /var/lib/waydroid/data/media/0. In emulators, use the "Drag and Drop" function or set up a shared folder (Shared Folders) in the virtual machine settings.
Can you play heavy 3D games?
Yes, but performance will depend on your video card and the selected method. Waydroid shows the best results thanks to the direct transmission of OpenGL commands, but anti-cheat systems of some online games can block the launch on emulated devices.
Is it safe to enter bank card details in the emulator?
Not recommended. Emulators do not have the Trusted Execution Environment (TEE) protection level that real smartphones do. Use the emulator only for testing or running data-insensitive applications.