Easily Run Android Apps on Linux - WindowsTips.net - Windows Tips and Tricks with Geek

Thursday, October 21, 2021

Easily Run Android Apps on Linux

 

Android mascot figurine standing on a laptop keyboard

Installing and Running Anbox

Anbox is provided as a snap package, so the installation command is the same for all distributions. 

snap install --devmode --beta anbox

Installing Anbox from the command line

And that’s it. When the installation has finished you’re able to start Anbox. Press the “Super” key—usually located between the left “Ctrl” and “Shift” keys—and type “anbox” in the GNOME search field. When you see the Anbox icon, click it.

Searching for Anbox in the GNOME activities screen

The main Anbox window is already populated with some common Android apps, such as Calendar and Calculator.

A selection of Android applications in Anbox

Clicking one of the icons will open the app, just like it opens on your smartphone. A single click emulates a finger tap on a mobile device. A single click on the Calculator icon, for example, wil launch the familiar Android Calculator.

The Android calculator running on Linux

Clicking on the cogged Settings icon opens the Android settings app. This has all of the usual categories. You can scroll vertically in apps using the scroll wheel of your mouse. In apps that support sideways scrolling, you can left-click and hold the button down, then move the mouse right or left.

Settings categories in the Settings app

Installing Google Play

Anbox cannot supply the Google Play Store application. Google will only permit certified devices to ship with their applications. That goes for virtual devices too. You can manually install it yourself if you want, of course.

The process we need to follow is:

  • Install some Linux tools that will be required during the installation
  • Download an installation script from GitHub
  • Run the script
  • Set some permissions within Anbox

On Ubuntu, the command to install the tools is:

sudo apt install wget curl lzip tar unzip squashfs-tools

Installing the toolchain in Ubuntu

On Manjaro or another Arch distro, use:

sudo pacman -Sy wget curl lzip tar unzip squashfs-tools

On Fedora you need to type:

sudo dnf install wget curl lzip tar unzip squashfs-tools

To download the installation script—on all distributions—paste this into a terminal window. “Ctrl+Shift+V” is the shortcut for paste.

wget https://raw.githubusercontent.com/geeks-r-us/anbox-playstore-installer/master/install-playstore.sh

Downloading the installation script from the command line

The download will only take a few moments. Once it’s complete, we need to make the script executable. We’ll use chmod:

sudo chmod +x install-playstore.sh

Setting the executable permission for the installation script

And now we can run the script.

./install-playstore.sh

Running the installation script

This will take several minutes to run. You’ll see multiple progress bars during the installation. There are also long pauses when nothing seems to be happening. Be patient and the script will eventually terminate.

When the installation has finished, open Anbox. You’ll see the Google Play Store icon has been added to the list of apps. But don’t click it yet.

Instead, click the Settings icon, and click on “Apps.”

The Apps entry in the Settings menu

Scroll down until you can see the “Google Play Services” and “Google Play Store” entries.

The Google entries in the Apps listing

Click on the “Google Play Services” entry, scroll until you see the “Permissions” entry, and click it.

The permissions entry in the Google Play services settings list

Set all permissions to “On.”

The Google Play services permissions

Go back to the “Apps” listing, click on Google Play Store > Permissions, and set all of the permissions to “On.”

The Google Play store permissions

Close the Settings app and click on the Google Play store icon. You’ll see the Google Play welcome screen. This means the Google Play Store app is happily communicating with Google, just as though it were on a physical Android device.

Click the “Sign In” button.

The Google welcome screen

Enter your Google user name or smartphone number, and click the “Next” button.

The Google Play user name screen

Enter your Google password, and click the “Next” button.

The Google Play password screen

You’ll see a couple of screens of terms and conditions, and then you’re in the Play Store. This behaves exactly the same as the Play Store on your smartphone. Which it should, because it is actually the same.

The Google Play store

We searched for an app called “Trello” and clicked the green “Install” button.

Trello on the Google Play store

A few moments later, the Trello icon was added to the Anbox main window.

Clicking the Trello icon launches Trello, as expected.

The Trello welcome screen

No comments:

Post a Comment