How to run Android apps on Linux

1 week ago 21
BOOK THIS SPACE FOR AD
ARTICLE AD
gettyimages-1483608707
Pulse/Getty Images

I'm both a Linux and Android user, and although there are apps to make syncing those two platforms fairly seamless, there are times when I'd rather just run an Android app on my desktop.

Fortunately, there's an app called Waydroid that allows you to run Android apps within a virtual environment. The process for getting this up and running isn't the easiest, but once it's working, you'll have full access to the Google Play Store, from which you can install and run Android apps as if you were working on an Android tablet.

Also: This lightweight Linux distro is the best (and easiest) way to revive your old computer. Here's how

Let me show you how it's done.

How to install and use Waydroid

What you'll need: To do this, you'll need a running instance of Linux (I'll be using Ubuntu Desktop 24.04), a valid Google account, and a user with sudo privileges. One thing to keep in mind is that this process will not work on a virtual machine because it won't be able to access the network, so make sure you install Waydroid on a standard desktop or laptop machine.

That's it. Let's make some Android magic.

The first thing to do is log into your Linux desktop and open a terminal window app.

Next, we must install a couple of dependencies with the command:

sudo apt install curl ca-certificates -y

We can now add the required Waydroid repository with the command:

curl https://repo.waydro.id | sudo bash

Install the Waydroid app with:

sudo apt-get install waydroid -y

5. Open and register Waydroid

Now that Waydroid is installed, open your desktop menu and launch the app. When the app opens, make sure to select GAPPS from the Android Type drop-down. If you go with Vanilla, you won't get access to Google Play Services, which means you can't install apps from the Google Play Store. 

Also: How to connect Linux and Android - and why you should

Once you've done that, click Download. The download will take some time. When it is complete, click Done, and the Waydroid app will close.

The Waydroid inititialization window.

Make sure to choose GAPPS as the Android Type.

Jack Wallen/ZDNET

6. Re-open Waydroid

Go back to your menu and open the Waydroid app again. It may take a moment, but you'll eventually see a virtual Android environment that's not quite ready.

waydroidhero
Jack Wallen/ZDNET

7. Retrieve your Android ID

By default, the device isn't trusted. In order to make use of the Google Play Store, it must be first registered. To do that, you have to know your Android ID. Go back to the terminal window and issue the command:

You should now be in a different shell with a different prompt. From there, locate your ID with:

ANDROID_RUNTIME_ROOT=/apex/com.android.runtime ANDROID_DATA=/data ANDROID_TZDATA_ROOT=/apex/com.android.tzdata ANDROID_I18N_ROOT=/apex/com.android.i18n sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "select * from main where name = \"android_id\";"

You should see a random string of numbers. Copy that ID to your clipboard.

8. Register your device

With your ID ready, head over to the Google Uncertified Page and paste the ID you just retrieved. Inform Google that you're not a robot and click Register. 

Also: One of the best budget Android tablets I've tested replaced both my Kindle and iPad

Once that's done, close and re-open Waydroid, and your device will be registered. You can now run all of the Android apps you need.

Read Entire Article