Skip to main content

Command Palette

Search for a command to run...

Running Android Apps and Games on Linux: A Comprehensive Guide

Published
5 min read
Running Android Apps and Games on Linux: A Comprehensive Guide
P

As an experienced Linux user and no-code app developer, I enjoy using the latest tools to create efficient and innovative small apps. Although coding is my hobby, I still love using AI tools and no-code platforms.

With the popularity of Android apps and games, many Linux users wish they could run their favorite mobile apps on their Linux desktop or laptop. Thankfully, there are several great options for running Android apps on Linux systems.

In this comprehensive guide, we'll explore the top methods to emulate Android and install APK app files on a Linux PC.

Evaluating the Best Options for Android Emulation on Linux

There are a few key options Linux users should consider when looking to run Android apps on a desktop operating system:

  • Waydroid - This open-source project allows users to run Android apps as containers within the Linux desktop environment. It is currently one of the best options available.

  • Anbox - This application aimed to seamlessly integrate Android apps into the Linux desktop. However, the Anbox project was deprecated in February 2023 so it is no longer a viable option.

  • Android Virtual Machine - Creating a virtual machine with Android x86 allows full Android emulation. This requires more setup but provides more flexibility.

  • Android Studio - Primarily used for development, the Android Emulator in Android Studio can also be used for app testing purposes.

  • Genymotion - This paid software offers great performance and usability for Android emulation on Linux, Mac, and Windows.

The right choice depends on your needs and comfort with virtualization and emulation. For most Linux users looking to easily run Android apps on a desktop, Waydroid is currently the best approach.

Installing and Configuring Waydroid on Linux

Waydroid leverages Linux container technology to provide a simple way to run Android apps on Linux that support the Wayland display server protocol. Here is how to set up Waydroid:

  1. First, check that your Linux distro uses Wayland as the display server, rather than the older Xorg server. You can check this by running:

     echo $XDG_SESSION_TYPE
    

    If it prints "x11" your system is using Xorg. If it prints "Wayland" you can proceed with Waydroid installation.

  2. Update your package manager:

     sudo apt update
    
  3. Install the prerequisites to add the Waydroid repository:

     sudo apt install curl git android-tools-adb android-tools-fastboot
    
  4. Add the Waydroid repository:

     curl -s https://raw.githubusercontent.com/waydroid/waydroid/master/install-waydroid.sh | bash
    
  5. Finally, install Waydroid:

     sudo apt install waydroid
    
  6. With Waydroid installed, start the Waydroid container:

     waydroid container start
    
  7. Enable the GUI:

     waydroid gui
    

Waydroid is now ready to install and run Android apps!

Downloading and Installing Android APK Files with Waydroid

To install apps, first download APK files from a trusted source like APKMirror.

Then, to install your downloaded APK files using Waydroid, use the following command, replacing "app.apk" with your file:

waydroid install app.apk

The app will be installed in the Waydroid container. You can then access and launch Android apps through the Waydroid GUI or from your Linux desktop app menu.

This provides seamless Android integration directly within the Linux desktop!

Creating an Android Virtual Machine with Android x86

If you are comfortable with virtual machines, installing Android x86 on a VM provides full Android OS emulation. Here is an overview:

  1. Download the Android x86 ISO file from the official site.

  2. Download and install virtualization software like VirtualBox.

  3. In VirtualBox, create a new VM setting the following configurations:

    • Type: Linux

    • Version: Other Linux 64-bit

    • Memory: At least 2048 MB

    • Storage: Create a virtual hard disk with at least 32 GB

  4. With the VM created, go to the Settings and configure:

    • System > Processor: Add 2+ CPU cores

    • System > Acceleration: Enable KVM paravirtualization

    • Display > Screen: Set Graphics to VBoxSVGA

    • Storage: Add the Android ISO file to the Optical Drive

  5. Start the VM and install Android x86 by choosing the auto-install option.

Once Android is installed, you'll have a full Android experience that can run any app or game! The performance will be better than software emulation options.

Emulation with Android Studio

Android Studio's built-in emulator offers solid software emulation as an alternative to solutions like Waydroid or full virtualization.

To use it:

  1. Download and install Android Studio.

  2. Create a new Android Virtual Device (AVD) through the "AVD Manager".

  3. Configure the virtual device settings as desired. A 64-bit system image running API level 30+ is recommended.

  4. Launch the emulator and then simply install and run any APK files.

While not as seamless as Waydroid, the official Android Studio emulator provides great flexibility if you need specific device testing scenarios or Android OS versions.

Purchasing Genymotion for Enhanced Android Emulation

For Linux users willing to purchase emulation software, Genymotion is an excellent choice providing high performance and great usability.

Some key things to know about Genymotion:

  • Personal use licenses start at $136/year. Education and non-profit discounts are available.

  • Features like Android 13, quick boot, and virtual camera require a paid license.

  • Easy to set up with VirtualBox or built-in QEMU support.

  • Excellent performance and device testing support.

While free options like Waydroid meet most casual use cases, Genymotion is a top choice for power users who want closer device simulation and testing capabilities.

Recommendations for Running Android Apps on Linux

With the retirement of Anbox, Waydroid is the easiest method for most Linux users to run Android apps. Setting up an Android VM or using Android Studio are also great options depending on your needs.

Here are some final recommendations when installing Android apps on Linux:

  • Always download APK files from trusted sites like APKMirror to avoid malware.

  • Stick to solutions like Waydroid unless you specifically need custom device testing scenarios.

  • Allocate sufficient CPU cores, RAM, and storage to ensure good performance.

  • Consider purchasing Genymotion if you'll be doing intensive Android development and testing.

With this guide, Linux users can evaluate the best options like Waydroid, Android x86 VMs, and Android Studio to meet their Android app needs. Running mobile apps on the Linux desktop is easier than ever.

I hope this comprehensive overview helps explain the key methods to install and run Android apps on Linux! Let me know if you have any other questions.

More from this blog

T

TheTechDeck | Tech Made Simple for Everyone

772 posts

Explore the best tech tips and tricks for Windows, Mac, Linux, Android, and gaming. Simplify tech with TechUvy's expert guides

Running Android Apps and Games on Linux: A Comprehensive Guide