Anbox snap installation fails
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.
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.
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.