The following guide will walk you through using Genymotion to configure an Android emulator for playing games (and using general apps) within a Linux desktop environment. This guide will probably be of particular interest to folks with Nvidia GPUs as Genymotion supports Nvidia GPU acceleration under Wayland.
I wrote this with the following system configurations:
- Ubuntu 24.04 / GNOME 46
- Fedora 40 / GNOME 46
The information provided in this guide is for educational purposes only. Emulation is not always 100% stable, and software crashes may occur, potentially resulting in data loss. I strongly suggest using this tool only for apps and games where crashes or data loss would not cause significant loss to yourself or others. I am not responsible for any data loss, damage, or other consequences that may result from following this guide. Proceed at your own risk.
Hopefully this guide saves you some time going down the rabbit hole of Android gaming on Linux!
This guide makes use of a tool called adb
which could be used to automate anything in the emulator should you be crafty enough.
DO NOT DO THIS IN GAMES.
Any form of automation in games could potentially get your account flagged for botting and eventually suspended or even permanently banned. Use adb
to launch your apps and then leave it at the door or proceed at your own risk.
- Installing Genymotion
- Creating & Configuring a Virtual Device
- Adding Support for ARM-Based Games
- Installing Apps & Games
- Desktop Shortcuts & App Specific Launchers
- Increasing Device Storage
- Troubleshooting
- Download and install Genymotion Desktop.
- Follow the installation instructions to install Genymotion in the directory of your choice.
- For simplicity, this guide installs Genymotion in:
~/bin
- For simplicity, this guide installs Genymotion in:
- Launch Genymotion Desktop and follow the on-screen instruction to create an account (note: personal use is free as of writing this guide).
-
Follow the instructions for creating a new device
-
NOTE: When selecting the Android version, use 9.0 (Pie) so you can add compatibility for ARM-based games (i.e. most games)
-
If you're not sure what to choose, here's my setup:
Form Factor / Type Name Processor(s) Memory Size VM Heap Size Resolution Density Phone Google Pixel 7 Pro 8 6000 MB (Setting this too close to your actual system RAM capacity might make your system unstable, leave headroom!) 256 MB 1440 x 2560 (9:16) 640 - XXXHDPI
-
If you are running your Linux OS on a non-ARM processor such as Intel or AMD, then you'll need to install a translation package in your virtual device.
-
Start your virtual device
-
Download the Genymotion ARM Translation for Android 9.0
- For older versions, see the list here
- Support for newer versions of Android is limited
-
With your virtual device running, drag the
Genymotion-ARM-Translation_for_9.0.zip
into the emulator window -
Accept Genymotion's prompt to flash the archive
With Open GApps installed, you'll now find the Play Store in your list of installed applications in your virtual device. Log into the Play Store with your Google account and you should be able to install any apps and games you want.
-
Note: Not seeing a game or app listed in the store? Check the following:
-
Make sure you've installed the ARM translation package as described above, otherwise the Play Store will hide ARM based games as they will be incompatible with your virtual device.
-
Are you running a phone-based virtual device or a tablet-based device? Not all apps & games are compatible with both form factors and the Play Store will hide the apps from you.
-
If you want to be able to launch your virtual device directly into a specific app from your desktop environment, follow the steps below. We'll use Arknights for educational purposes just to demonstrate how you could set this up for any app of your choosing.
-
For Gnome users, you can create a new
.desktop
file in your home directory (we'll use Arknights as an example)touch ~/.local/share/applications/arknights-genymotion.desktop
-
Populate the
.desktop
file with the following text (replacing with your own user name)[Desktop Entry] Encoding=UTF-8 Version=1.0 Type=Application Name=Arknights GenericName=Arknights Android Emulator Icon=/home/<user>/Pictures/Icons/arknights.webp Exec=/home/<user>/Scripts/arknights.sh Categories=Development;Emulator;Game;
- Note: You'll need to supply the icon yourself (or just reference an existing icon on your system if you prefer)
-
In your home directory, add a new directory called
Scripts
and navigate to itmkdir ~/Scripts cd ~/Scripts
-
In the
Scripts
directory create a new scripttouch arknights.sh
-
Populate the script with the following text
# !/bin/bash set -e ~/bin/genymotion-3.7.1/genymotion/gmtool admin start "Google Pixel 7 Pro" # Launch the app directly by starting the context by name ~/bin/genymotion-3.7.1/genymotion/tools/adb shell am start -n com.YoStarEN.Arknights/com.u8.sdk.U8UnityContext # Alternatively, if you don't know the context, you can simulate a tap on the screen for where you have placed the app's icon # The sleep is added to allow the virtual device to finish initializing so the tap actually registers correctly #sleep 2 #~/bin/genymotion-3.7.1/genymotion/tools/adb shell input tap 720 1280 # Rotate the screen to whatever orientation you prefer for this specific app ~/bin/genymotion-3.7.1/genymotion/genyshell -c "rotation setangle 90"
- If you installed Genymotion into a different path, be sure to update the script to reflect your installation location.
- Personally, I'm a fan of the tap approach as various apps/games might be able to detect that you launched the game via
adb
or some other automation tool and even though you're not using it maliciously, the app might defensively flag your account over zealously.
As you may have inferred from the script, adb
could be used to automate anything in the emulator should you be crafty enough. DO NOT DO THIS IN GAMES. Any form of automation in games, like Arknights, can get your account flagged for botting and eventually suspended or even permanently banned. Use adb
to launch your apps and then leave it at the door or proceed at your own risk.
By default, the data storage capacity of many of the images provided by Genymotion are quite small and will run out of space after installing even a single game. To work around this, you need to increase the size of the data partition for your virtual device. There are a few device images with larger starting storage sizes (i.e. 64 GB), but even that may be insufficient if you want to install more than a few games.
If you find your device is running out of memory, follow the steps below.
-
If the virtual device is running, shut it down (just hit the close window X, Genymotion takes care of gracefully shutting down the device)
-
Navigate to the directory containing the deployed data of your virtual device
cd ~/.Genymobile/Genymotion/deployed/<Device Name>
-
Resize the disk image to the maximum size you want your virtual device's storage to be able to use (i.e. 50 GB in this example)
qemu-img resize data.qcow2 50G
- Note:
data.qcow2
will not immediately become the size you select, instead it will slowly grow up to this maximum as your virtual device saves data to the disk image as it is thinly provisioned
- Note:
Once the maximum size of data.qcow2
has been increased, we need to expand the data partition in the disk image to enable it to use that newly added space.
-
Navigate to the directory containing the deployed data of your virtual device
cd ~/.Genymobile/Genymotion/deployed/<Device Name>
-
Enable the
nbd
kernel modulesudo modprobe nbd max_part=10
-
Mount the block device
sudo qemu-nbd -c /dev/nbd0 data.qcow2
-
Install GParted if needed:
sudo apt update sudo apt install -y gparted
-
Open the block device in GParted
gparted /dev/nbd0
- Note: If GParted opens with the error:
Can't have a partition outside the disk!
just click theIgnore
button
- Note: If GParted opens with the error:
-
Right-click the partition with the label
data
(most likely/dev/nbd0p3
) and selectDelete
⚠️ Note: This will delete any data in the partion! If you have data in the partition you want to keep, you can try simply resizing the partition instead and skipping to step 10. Just remember, there is always a chance for data loss when altering partitions, so back up anything you don't want to lose regardless of how you adjust the partition.
-
Right-click the
unallocated
partition and selectNew
-
Configure the new partition with the following properties
- Set
New size (MiB)
to be the size you expandeddata.qcow2
to be (i.e. 50000 MiB if you used the suggested size) - Set
Label
to bedata
- Set
-
Click
Add
-
Click the green check mark near the top of the GParted window to
Apply all operations
to the block device- Note: GParted may raise more
Can't have a partition outside the disk!
errors, just theIgnore
button on each pop-up
- Note: GParted may raise more
-
Close GParted
-
Unmount the block device
sudo qemu-nbd -d /dev/nbd0
-
(Optional) Unload the
nbd
kernel modulesudo modprobe -r nbd
With that, your virtual device will now have plenty of extra space to store applications! This process can be repeated later if you find that your device needs more storage space.
If you create a startup script and it doesn't seem to execute (especially if you are using ADB/gmtool and you notice that in the Genymotion menu it says your device is "booting" despite it having already launched, you may need to enable USB debugging.