How To Install Anbox on Ubuntu 19.10

I love the idea of being able to install PlayStore apps on Ubuntu but I'm getting errors installing Anbox. I'm interested in a step by step answer (that takes any trouble shooting into consideration) so a casual Ubuntu user like myself can benefit from a working solution.

This may be a duplicate of the following question but the difference is that I'm asking for an answer that is a how to for causal users of Ubuntu 19.10: possible duplicate

I've followed the installation instructions: here which then sent me here

TROUBLESHOOTING

Due to troubleshooting comments below it appears the tutorial is leading me to install both deb and snap installations. So I have split them to troubleshoot them seperately.

Install Through Deb:

Here I've installed Anbox through deb:

max@msi:~$ sudo apt-get install anbox
[sudo] password for max: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  bridge-utils libboost-log1.67.0 libboost-program-options1.67.0
  libboost-regex1.67.0 liblxc-common liblxc1 libpam-cgfs libprotobuf-lite17
  libsdl2-2.0-0 libsdl2-image-2.0-0 lxc lxc-utils lxcfs uidmap
Suggested packages:
  ifupdown btrfs-tools lvm2 lxc-templates lxctl
The following NEW packages will be installed:
  anbox bridge-utils libboost-log1.67.0 libboost-program-options1.67.0
  libboost-regex1.67.0 liblxc-common liblxc1 libpam-cgfs libprotobuf-lite17
  libsdl2-2.0-0 libsdl2-image-2.0-0 lxc lxc-utils lxcfs uidmap
0 upgraded, 15 newly installed, 0 to remove and 0 not upgraded.
Need to get 3,844 kB of archives.
After this operation, 18.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu eoan/universe amd64 lxcfs amd64 3.0.4-2 [40.7 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu eoan/universe amd64 libboost-regex1.67.0 amd64 1.67.0-13ubuntu1 [458 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu eoan/universe amd64 libboost-log1.67.0 amd64 1.67.0-13ubuntu1 [584 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 libboost-program-options1.67.0 amd64 1.67.0-13ubuntu1 [333 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu eoan/universe amd64 liblxc-common amd64 3.0.4-0ubuntu1 [440 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu eoan/universe amd64 liblxc1 amd64 3.0.4-0ubuntu1 [257 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 libprotobuf-lite17 amd64 3.6.1.3-2 [129 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu eoan/universe amd64 libsdl2-2.0-0 amd64 2.0.10+dfsg1-1ubuntu1 [405 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu eoan/universe amd64 libsdl2-image-2.0-0 amd64 2.0.5+dfsg1-1 [63.7 kB]
Get:10 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 bridge-utils amd64 1.6-2ubuntu1 [30.5 kB]
Get:11 http://us.archive.ubuntu.com/ubuntu eoan/universe amd64 lxc-utils amd64 3.0.4-0ubuntu1 [354 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu eoan/universe amd64 lxc all 3.0.4-0ubuntu1 [2,960 B]
Get:13 http://us.archive.ubuntu.com/ubuntu eoan/multiverse amd64 anbox amd64 0.0~git20190124-1 [651 kB]
Get:14 http://us.archive.ubuntu.com/ubuntu eoan/universe amd64 libpam-cgfs amd64 3.0.4-0ubuntu1 [30.8 kB]
Get:15 http://us.archive.ubuntu.com/ubuntu eoan/universe amd64 uidmap amd64 1:4.5-1.1ubuntu4 [65.7 kB]
Fetched 3,844 kB in 2s (1,655 kB/s)
Selecting previously unselected package lxcfs.
(Reading database ... 198438 files and directories currently installed.)
Preparing to unpack .../00-lxcfs_3.0.4-2_amd64.deb ...
Unpacking lxcfs (3.0.4-2) ...
Selecting previously unselected package libboost-regex1.67.0:amd64.
Preparing to unpack .../01-libboost-regex1.67.0_1.67.0-13ubuntu1_amd64.deb ...
Unpacking libboost-regex1.67.0:amd64 (1.67.0-13ubuntu1) ...
Selecting previously unselected package libboost-log1.67.0.
Preparing to unpack .../02-libboost-log1.67.0_1.67.0-13ubuntu1_amd64.deb ...
Unpacking libboost-log1.67.0 (1.67.0-13ubuntu1) ...
Selecting previously unselected package libboost-program-options1.67.0:amd64.
Preparing to unpack .../03-libboost-program-options1.67.0_1.67.0-13ubuntu1_amd64.deb ...
Unpacking libboost-program-options1.67.0:amd64 (1.67.0-13ubuntu1) ...
Selecting previously unselected package liblxc-common.
Preparing to unpack .../04-liblxc-common_3.0.4-0ubuntu1_amd64.deb ...
Unpacking liblxc-common (3.0.4-0ubuntu1) ...
Selecting previously unselected package liblxc1.
Preparing to unpack .../05-liblxc1_3.0.4-0ubuntu1_amd64.deb ...
Unpacking liblxc1 (3.0.4-0ubuntu1) ...
Selecting previously unselected package libprotobuf-lite17:amd64.
Preparing to unpack .../06-libprotobuf-lite17_3.6.1.3-2_amd64.deb ...
Unpacking libprotobuf-lite17:amd64 (3.6.1.3-2) ...
Selecting previously unselected package libsdl2-2.0-0:amd64.
Preparing to unpack .../07-libsdl2-2.0-0_2.0.10+dfsg1-1ubuntu1_amd64.deb ...
Unpacking libsdl2-2.0-0:amd64 (2.0.10+dfsg1-1ubuntu1) ...
Selecting previously unselected package libsdl2-image-2.0-0:amd64.
Preparing to unpack .../08-libsdl2-image-2.0-0_2.0.5+dfsg1-1_amd64.deb ...
Unpacking libsdl2-image-2.0-0:amd64 (2.0.5+dfsg1-1) ...
Selecting previously unselected package bridge-utils.
Preparing to unpack .../09-bridge-utils_1.6-2ubuntu1_amd64.deb ...
Unpacking bridge-utils (1.6-2ubuntu1) ...
Selecting previously unselected package lxc-utils.
Preparing to unpack .../10-lxc-utils_3.0.4-0ubuntu1_amd64.deb ...
Unpacking lxc-utils (3.0.4-0ubuntu1) ...
Selecting previously unselected package lxc.
Preparing to unpack .../11-lxc_3.0.4-0ubuntu1_all.deb ...
Unpacking lxc (3.0.4-0ubuntu1) ...
Selecting previously unselected package anbox.
Preparing to unpack .../12-anbox_0.0~git20190124-1_amd64.deb ...
Unpacking anbox (0.0~git20190124-1) ...
Selecting previously unselected package libpam-cgfs.
Preparing to unpack .../13-libpam-cgfs_3.0.4-0ubuntu1_amd64.deb ...
Unpacking libpam-cgfs (3.0.4-0ubuntu1) ...
Selecting previously unselected package uidmap.
Preparing to unpack .../14-uidmap_1%3a4.5-1.1ubuntu4_amd64.deb ...
Unpacking uidmap (1:4.5-1.1ubuntu4) ...
Setting up libboost-program-options1.67.0:amd64 (1.67.0-13ubuntu1) ...
Setting up libboost-regex1.67.0:amd64 (1.67.0-13ubuntu1) ...
Setting up libpam-cgfs (3.0.4-0ubuntu1) ...
Setting up lxcfs (3.0.4-2) ...
Created symlink /etc/systemd/system/multi-user.target.wants/lxcfs.service → /lib/systemd/system/lxcfs.service.
Setting up libprotobuf-lite17:amd64 (3.6.1.3-2) ...
Setting up uidmap (1:4.5-1.1ubuntu4) ...
Setting up libboost-log1.67.0 (1.67.0-13ubuntu1) ...
Setting up bridge-utils (1.6-2ubuntu1) ...
Setting up libsdl2-2.0-0:amd64 (2.0.10+dfsg1-1ubuntu1) ...
Setting up libsdl2-image-2.0-0:amd64 (2.0.5+dfsg1-1) ...
Setting up liblxc1 (3.0.4-0ubuntu1) ...
Setting up lxc-utils (3.0.4-0ubuntu1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/lxc-net.service → /lib/systemd/system/lxc-net.service.
Created symlink /etc/systemd/system/multi-user.target.wants/lxc.service → /lib/systemd/system/lxc.service.
Setting up lxc dnsmasq configuration.
Setting up lxc (3.0.4-0ubuntu1) ...
Setting up liblxc-common (3.0.4-0ubuntu1) ...
Setting up anbox (0.0~git20190124-1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/anbox-container-manager.service → /lib/systemd/system/anbox-container-manager.service.
Processing triggers for desktop-file-utils (0.24-1ubuntu1) ...
Processing triggers for mime-support (3.63ubuntu1) ...
Processing triggers for gnome-menus (3.32.0-1ubuntu1) ...
Processing triggers for libc-bin (2.30-0ubuntu2) ...
Processing triggers for systemd (242-7ubuntu3.7) ...
Processing triggers for man-db (2.8.7-3) ...

I rebooted at this point and attempted to run Anbox and found this error:

max@msi:~$ anbox session-manager
[ 2020-02-19 15:01:01] [session_manager.cpp:130@operator()] Failed to start as either binder or ashmem kernel drivers are not loaded
max@msi:~$ 

I was able to get past this error with the following:

I downloaded the anbox-modules here under by pressing the Clone/Download button:

I extracted and used Terminal to navigate to anbox-modules-master directory:

cd anbox-modules-master/

I ran these commands:

sudo cp anbox.conf /etc/modules-load.d/
sudo cp 99-anbox.rules /lib/udev/rules.d/
sudo cp -rT ashmem /usr/src/anbox-ashmem-1
sudo cp -rT binder /usr/src/anbox-binder-1
sudo dkms install anbox-ashmem/1
sudo dkms install anbox-binder/1

I loaded the modules here:

sudo modprobe ashmem_linux
sudo modprobe binder_linux

I verified things went okay with this command:

lsmod | grep -e ashmem_linux -e binder_linux

The output looks like this:

binder_linux          163840  0
ashmem_linux           20480  0

I verified with this command as well:

ls -alh /dev/binder /dev/ashmem

I got this output:

ls: cannot access '/dev/binder': No such file or directory
crw------- 1 root root 10, 55 Feb 19 15:54 /dev/ashmem

Now I'm not sure what to do at this point because anbox won't start:

max@msi:~/anbox-modules-master$ anbox session-manager
[ 2020-02-20 00:38:23] [session_manager.cpp:130@operator()] Failed to start as either binder or ashmem kernel drivers are not loaded

I have installed and tested the edge release from snap and it worked. Anbox from snap can be installed with the following command and run from the GUI applications:

sudo snap install --devmode --edge anbox

Important:

Please read and understand what an edge release mean before installing.

edge: for users wanting to closely track development.

Edge releases often include a moving stream of changes without QA or review promises and are typically built automatically by a CI process from an arbitrary source code snapshot. Often the CI will only publish after some sort of automatic QA passed, and code reviews remain a good practice, but these are project specific. Assume edge releases may break often.

Source