In all currently supported versions of Ubuntu and Debian-based Linux distros (Linux Mint, Kali Linux, Elementary OS, Tails, KDE Neon, etc.) that have the snapd package from the default Debian repositories installed, open the terminal and type:
sudo snap install --edge --classic anbox-installer
Start the anbox-installer script.
This will add a PPA to your software sources, download 406.8MB of archives and install new Linux kernel packages, all this in order to install anbox which is currently alpha software. To see what happens during the installation you can watch this screencast:
During the installation you will see this warning message:
IMPORTANT: THIS IS ALPHA LEVEL SOFTWARE. EXPECT INSTABILITY AND BUGS !!!!!
I installed Anbox anyway in Ubuntu 17.04, and the built-in Android apps included in Anbox worked out of the box, although the expected bugs and instability arrived as promised.
Reboot to finish the anbox installation.
Type "anbox" in the Dash and click the Anbox icon to start the Anbox Application Manager. In the Anbox Application Manager you will see a row of application icons. Click on an icon to launch it. The Android application will launch in a new window and you will be able to run it.
Anbox doesn't come with Google Play Store pre-installed and does not even have a package installer, so the only way to install additional applications in Anbox is through an Ubuntu software package named Android Debug Bridge (adb). You have to download the .apk file of the app you want to install, open the terminal, change directories using
cd to the directory of the .apk file, and then install the app with a command that looks like this:
adb install /path/to/file.apk
Downloading an .apk file from a warez website is a miserable security risk, however some applications allow you to download the .apk file from the application's official website, for example WhatsApp Messenger for Android.
Then maybe the app will install or maybe it won't install if the app requires additional dependencies that are not installed in your operating system. For example WhatsApp requires Java as a dependency. I already have Java installed in Ubuntu 17.04 so I tried to install WhatsApp.
adb install WhatsApp.apk
I got an error message that said
error: cannot connect to daemon. I closed Anbox and reopened it. I got another error message that said
write: Broken pipe. I closed Anbox and opened it again and got the same error message. Anbox is buggy just like the anbox-installer script says it is. I closed Anbox and reopened it again and finally WhatsApp installed in Anbox.
Anbox in Ubuntu 17.04
When you open WhatsApp for the first time it shows you a screen with a message that says:
WhatsApp will send an SMS message to verify your phone number.
Enter your country code and phone number.
WhatsApp also asks if you want to give the app permission to access the files on your device which is another security risk in my opinion. I think it's OK to give WhatsApp permission to access the files on my phone, but I don't want to give the app permission to access the files on my computer. Permissions are a matter of fundamental importance in Linux. You should be very careful about giving permissions to an application that it doesn't already have by default, and the telegram-latest snap package in Ubuntu 16.04 has better support than WhatsApp including Telegram Calls voice calls which are currently available to users around the world.