how to install anbox ubuntu 20.04

The Android emulator is available as a Snap, so you can install it like this:

sudo snap install --beta --devmode anbox

From there you can start the session and application managers:

anbox session-manager
anbox.appmgr

That's really all there is to it. If you get a message like "Failed to connect to DBus", then you'll need to install the dbus-x11 package:

sudo apt update
sudo apt install dbus-x11
export $(dbus-launch)

When done, restart the session and app managers:

anbox session-manager
anbox.appmgr