Anbox on Ubuntu 20.04

Nicola Landro
2 min readMar 1, 2021

--

I usually use Mint but it is a Ubuntu derivate, so this guide work well for both or any other Ubuntu derivate like popos.

Anbox allow you to use Android app into linux without an emulator.

Also Waydroid is a very interesting alternative and it use LineageOS and Wayland.

Install with snap

If you use Mint you mast follow this guide otherwise follow this commands:

sudo apt update
sudo apt install snapd
sudo snap install --beta --devmode anbox

Now you can use with:

anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity

Anbox does not have a play store but if you need it you can follow this guide.

If you do not have any problem you can skip the following chapter and go to the Conclusion.

Desktop Entry

If you do not see the desktop entry (like this generic guide) we can create a file anbox.desktop:

[Desktop Entry]
Name=Anbox
GenericName=Android sub system
Keywords=android;mobile;
Exec=anbox.appmgr %f
Icon=/snap/anbox/current/meta/gui/icon.png
Terminal=false
Type=Application
Categories=Graphics;
MimeType=application/apk;

After get execturion permissions and copy into /usr/share/applications/

chmod +x anbox.desktop
sudo cp anbox.desktop /usr/share/applications/

Anbox Modules Problem

If you have problem to install the Anbox modules follow this steps.

The anbox modules are the source of Anbox Kernel Modules.

If you are in ubuntu 19.04 based

sudo add-apt-repository ppa:morphis/anbox-support
sudo apt update
sudo apt install linux-headers-generic anbox-modules-dkms
sudo apt install software-properties-common

Ubuntu 20.04 based:

git clone https://github.com/anbox/anbox-modules.git
cd anbox-modules
./INSTALL.sh

Check:

$ sudo modprobe ashmem_linux
$ sudo modprobe binder_linux
$ ls -1 /dev/{ashmem,binder}
/dev/ashmem
/dev/binder

DBus problem

If you have the error [daemon.cpp] Failed to connect to DBus on running anbox.appmgr or anbox session-manager the solution is to install and set the following:

sudo apt install dbus-x11
export $(dbus-launch)
# now it should wotk, you can test with follow
anbox session-manager
anbox.appmgr

Compile Anbox from source

Exist many issues ( issue1, issue2 , …) that manage toto compile anbox by yourself but also to the test the latests feature can be a good reason.

# after copy image
sudo anbox container-manager --data-path=/var/lib/anbox
# other terminal
export EGL_PLATFORM=x11
anbox session-manager --data-path=/var/lib/anbox
---:errors...

Conclusion

Use app android on your linux device can be usefull to a tablet to have much choice, but also to play game on your pc and anbox get you a very good experice.

Enjoy your linux experience.

--

--

Nicola Landro

Linux user and Open Source fun. Deep learning PhD. , Full stack web developer, Mobile developer, cloud engineer and Musitian.