4

I'm trying to install Anbox in my new Ubuntu 16.04 using instructions from this page. It seemed to work, but I got no icon in my dash, so I suspect that the installation is not complete. With Synaptic Package Manager I can see that anbox-common & anbox-modules-dkms are installed, but I have no icon in my dash, so I tried running

sudo snap install --edge --devmode anbox

and got this error:

error: cannot install "anbox": Get
   https://search.apps.ubuntu.com/api/v1/snaps/details/core?channel=stable&fields=anon_download_url%2Carchitecture%2Cchannel%2Cdownload_sha3_384%2Csummary%2Cdescription%2Cdeltas%2Cbinary_filesize%2Cdownload_url%2Cepoch%2Cicon_url%2Clast_updated%2Cpackage_name%2Cprices%2Cpublisher%2Cratings_average%2Crevision%2Cscreenshot_urls%2Csnap_id%2Csupport_url%2Ccontact%2Ctitle%2Ccontent%2Cversion%2Corigin%2Cdeveloper_id%2Cprivate%2Cconfinement%2Cchannel_maps_list:
   dial tcp: lookup search.apps.ubuntu.com on [::1]:53: read udp
   [::1]:54255->[::1]:53: read: connection refused

What am I doing wrong? Why was the connection refused? According to the instructions, it seems this is the correct command to install it.

ps: I'm not that familiar with Linux, I'm more of a Windows guy, trying to learn Linux.

1

1 Answer 1

7

Ubuntu 19.04 and earlier

Anbox has >=4GB RAM recommended hardware requirements.

The anbox-installer is DEPRECATED.

Please find updated installation instructions for Anbox (64-bit architecture only) at https://github.com/anbox/anbox/blob/master/docs/install.md.

Install necessary kernel modules

In order to add the PPA to your Ubuntu system please run the following commands:

sudo add-apt-repository ppa:morphis/anbox-support
sudo apt update
sudo apt install anbox-modules-dkms

These will add the PPA to your system and install the anbox-modules-dkms package which contains the ashmem and binder kernel modules. They will be automatically rebuild everytime the kernel packages on your system update.

After you installed the anbox-modules-dkms package you have to manually load the kernel modules. The next time your system starts they will be automatically loaded.

sudo modprobe ashmem_linux
sudo modprobe binder_linux

Now you should have two new nodes in your systems /dev directory:

ls -1 /dev/{ashmem,binder}
/dev/ashmem
/dev/binder

Install the Anbox snap

Installing the Anbox snap is very simple:

snap install --devmode --beta anbox

In order to update Anbox to a newer version you can run:

snap refresh --beta --devmode anbox

Ubuntu 16.04-17.04

You got the error error: cannot install "anbox" because anbox is not the correct name of the anbox snap package. The anbox snap package is compatible with 64-bit architecture OSs only. The correct name is anbox-installer. Open the terminal and type:

sudo snap install --edge --classic anbox-installer

Start the anbox-installer script.

anbox-installer   

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.

sudo reboot  

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 (although you can install it) 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 had Java installed in my Ubuntu, 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.

enter image description here

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-desktop 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.

7
  • Thanks so much for your help, it seems to be working now, at least is installing. Sorry to bother you again, but I've tried so many commands and right now I'm confused, which command should I use if something goes wrong and I have to restart all over again? Is this the right command to install it? $ sudo apt install -y software-properties-common linux-header-generic $ sudo add-apt-repository -y 'ppa:morphis/anbox-support' $ sudo apt update $ sudo apt install -y anbox-modules-dkms then $sudo snap install --edge --devmode anbox-installer? Thanks again for your help
    – Michael
    Aug 8, 2017 at 15:18
  • I believe it worked, it's asking me to reboot, I'll have to logout and test it, I'll post what happened soon. Thanks again so much for your help, if it's not too much trouble, could you please write the correct sequence of command that I have to enter for a fresh install? Just in case if something happened and I have to reinstall Ubuntu again.
    – Michael
    Aug 8, 2017 at 15:25
  • What about these commands? $ sudo apt install -y software-properties-common linux-header-generic $ sudo add-apt-repository -y 'ppa:morphis/anbox-support' $ sudo apt update $ sudo apt install -y anbox-modules-dkms
    – Michael
    Aug 8, 2017 at 15:28
  • I copied/pasted the whole sequence of commands in case to want to revert them. If you keep commenting past the limit for comments here, I will receive a notification if I want to open a new private chatroom for this question that allows unlimited comments. I will open the private chatroom and a link to it will appear in the comments so you can visit your question's chatroom. The pre-installed Anbox Android apps are working in my Ubuntu 17.04 and as you can see in my screenshot I also installed WhatsApp.
    – karel
    Aug 8, 2017 at 16:51
  • Thanks again for your reply, it seems to be working, I don't think there's a need for a private chatroom,
    – Michael
    Aug 11, 2017 at 14:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .