CaffeineAddict
Well-Known Member
There have been numerous questions about android emulators for Linux and how to play Android games on Linux.
This guide is about how to use Android Studio to emulate games or to run Android software.
Android Studio is IDE that's normally used for Android development, however due to availability of all API's it' excellent choice to emulate any games or software out there that are available in google play store.
You can also play games from other stores if you install them ofc.
All together it will take at least 8GB of disk space.
First step is to download Android Studio, from the link below:
developer.android.com
Click on "Download Android Studio" button, accept the terms and download to location of your choice.
In my case download file is named
You want to extract it to inside
Next you want to create a desktop and programs menu shortcut:
Copy code below and paste into terminal, then replace USER with your username (output of
When done editing press
For desktop shortcut to appear in programs menu, log out and log in again, you should find the icon in "Games" menu.
If for some reason this doesn't work you can run Android Studio directly from
When you run it you can opt in to send usage statistics, this is optional.
You'll be greeted with "Welcome" window, click "Next" to continue.
Then you're asked about setup type, either "standard" or "custom", choose custom:
Click "Next" and you're asked to select components...
Note that "Android Virtual Device" which we need for emulation may be grayed out as shown above, ignore it for now and hit "Next", "Next", accept the license, "Next", until you see window below:
In my case I already have KVM enabled and set up, but if you don't you'll need to set it up for better gaming performance which is significant, we'll be back to this step later, click "Next", accept listed libs with "Next" and finally click "Finish" to start downloading libraries.
When download is done click "Finish", the following window will appear:
Click on "New Project" and then "Next":
In the window that follows below, select "no activity" and click "Next":
In the window that comes next you can configure some project parameters, I'm fine with defaults and clicked "Finish":
At this point the IDE will open, and we need to deal with the "Android Virtual Device" that was grayed out...
In my case it was installed despite not being selected, to confirm click on gear button in top right corner and select "SDK Manager" from drop down menu:
Select "SDK Tools" as shown below and confirm "Android Emulator" is installed:
If it's not installed try installing it.
If it's grayed out then we need to enable KVM and try again later...
Here is link to guide about how to enable it:
developer.android.com
If you're lost with the guide, in short this is what you need to do on Debian based system:
For the
Verify with
You'll also need to enable virtualization in BIOS, for intel system the option is called
When you're done to check whether KVM is enabled run
Output of this command should be:
Then if needed install Android Emulator from SDK Manager as shown previously.
Next we open the IDE and a add a virtual device, see image below, click on "Device Manager", click
You'll be offered a bunch of devices:
The column "Play" tells us whether play store is also included, this is what you need, other columns are about API level, you can think of higher API level as of newer model phone or tablet, however some games require minimum API level and probably maximum as well.
The width, height and density columns tell you about phone resolution.
For this tutorial I've selected "Pixel 7 Pro", click "Next" and "Finish" to download device of choice.
You can ofc. experiment with tablet and other types of devices.
When downloaded click on play button to start the phone:
Next click on "Running Devices" in side bar:
When the Android OS starts up you can sign in to google play store, download games and play as you want.
Note that you can resize the phone, rotate etc. from the top menu bar, as well as forwarding keyboard input:
You can also resize the widget with phone to cover your entire screen.
I don't have google account to play a game but you should be able to figure out what to do from this point on
This guide is about how to use Android Studio to emulate games or to run Android software.
Android Studio is IDE that's normally used for Android development, however due to availability of all API's it' excellent choice to emulate any games or software out there that are available in google play store.
You can also play games from other stores if you install them ofc.
All together it will take at least 8GB of disk space.
First step is to download Android Studio, from the link below:
Download Android Studio & App Tools - Android Developers
Android Studio provides app builders with an integrated development environment (IDE) optimized for Android apps. Download Android Studio today.
Click on "Download Android Studio" button, accept the terms and download to location of your choice.
In my case download file is named
android-studio-panda2-linux.tar.gz, it's compressed file so when download is done we'll extract it.You want to extract it to inside
~/ your home directory to be able to update the software without root privileges, otherwise you'll need to run the studio as root which is neither wise not convenient.
Bash:
# Directory where we'll keep the installation and future updates
mkdir ~/Android
# Replace file location and name below with what you've downloaded.
tar -xzvf ~/Downloads/android-studio-panda2-linux.tar.gz -C ~/Android
Next you want to create a desktop and programs menu shortcut:
Bash:
cd ~/.local/share/applications
nano AndroidStudio.desktop
Copy code below and paste into terminal, then replace USER with your username (output of
id -un)
INI:
[Desktop Entry]
# 3 types of desktop entries: Application, Link and Directory
Type=Application
# Specific name of the application
Name=Android Studio
# Generic name of the application
GenericName=Android Studio
# Path to an executable file on disk used to determine if the program is actually installed
TryExec=/home/USER/Android/android-studio/bin/studio
# Program to execute, possibly with arguments
Exec=/home/USER/Android/android-studio/bin/studio
# If entry is of type Application, the working directory to run the program in.
Path=/home/USER/Android
# Icon to display in file manager, menus, etc
Icon=/home/USER/Android/android-studio/bin/studio.png
# Tooltip for the entry
Comment=Android Studio IDE
# Categories in which the entry should be shown in a menu
Categories=Game
# Whether the program runs in a terminal window
Terminal=false
# This application exists, but don't display it in the menus
NoDisplay=false
# If true, the application has a single main window, and does not support having an additional one opened
SingleMainWindow=true
When done editing press
CTRL+O to save and CTRL+X to close.For desktop shortcut to appear in programs menu, log out and log in again, you should find the icon in "Games" menu.
If for some reason this doesn't work you can run Android Studio directly from
/home/USER/Android/android-studio/bin/, and run studio executable.When you run it you can opt in to send usage statistics, this is optional.
You'll be greeted with "Welcome" window, click "Next" to continue.
Then you're asked about setup type, either "standard" or "custom", choose custom:
Click "Next" and you're asked to select components...
Note that "Android Virtual Device" which we need for emulation may be grayed out as shown above, ignore it for now and hit "Next", "Next", accept the license, "Next", until you see window below:
In my case I already have KVM enabled and set up, but if you don't you'll need to set it up for better gaming performance which is significant, we'll be back to this step later, click "Next", accept listed libs with "Next" and finally click "Finish" to start downloading libraries.
When download is done click "Finish", the following window will appear:
Click on "New Project" and then "Next":
In the window that follows below, select "no activity" and click "Next":
In the window that comes next you can configure some project parameters, I'm fine with defaults and clicked "Finish":
At this point the IDE will open, and we need to deal with the "Android Virtual Device" that was grayed out...
In my case it was installed despite not being selected, to confirm click on gear button in top right corner and select "SDK Manager" from drop down menu:
Select "SDK Tools" as shown below and confirm "Android Emulator" is installed:
If it's not installed try installing it.
If it's grayed out then we need to enable KVM and try again later...
Here is link to guide about how to enable it:
Configure hardware acceleration for the Android Emulator | Android Studio | Android Developers
Discover how the Android Emulator can use hardware acceleration features to improve performance.
If you're lost with the guide, in short this is what you need to do on Debian based system:
Bash:
sudo apt update
sudo apt install qemu-system-x86 virt-manager
sudo adduser $(id -un) libvirt
For the
adduser to take effect log out then wait (by default) 10 seconds before loging back in.Verify with
groups command you're added to libvirt group, if not wait longer after logout or reboot system and try again.You'll also need to enable virtualization in BIOS, for intel system the option is called
VT-xWhen you're done to check whether KVM is enabled run
emulator executable with -accel-check option:
Bash:
~/Android/Sdk/emulator/emulator -accel-check
Output of this command should be:
accel:
0
KVM (version 12) is installed and usable.
accel
Then if needed install Android Emulator from SDK Manager as shown previously.
Next we open the IDE and a add a virtual device, see image below, click on "Device Manager", click
+ button and "Add virtual device" from drop down menu:You'll be offered a bunch of devices:
The column "Play" tells us whether play store is also included, this is what you need, other columns are about API level, you can think of higher API level as of newer model phone or tablet, however some games require minimum API level and probably maximum as well.
The width, height and density columns tell you about phone resolution.
For this tutorial I've selected "Pixel 7 Pro", click "Next" and "Finish" to download device of choice.
You can ofc. experiment with tablet and other types of devices.
When downloaded click on play button to start the phone:
Next click on "Running Devices" in side bar:
When the Android OS starts up you can sign in to google play store, download games and play as you want.
Note that you can resize the phone, rotate etc. from the top menu bar, as well as forwarding keyboard input:
You can also resize the widget with phone to cover your entire screen.
I don't have google account to play a game but you should be able to figure out what to do from this point on
Last edited:

