Install Anbox (anbox-git
), Anbox kernel modules ashmem_linux
+ binder_linux
(anbox-modules-dkms-git
)
Load installed kernel modules (modprobe ashmem_linux && modprobe binder_linux
). Check existence of /usr/lib/modules-load.d/anbox.conf
file
Check the kernel modules have been loaded (lsmod | grep linux
)
Install Android base image android.img
(anbox-image
). I recommend patched image file (in androidOS_files folder) but you can get unpatched image on Anbox website
Enable and start lxc.service
(LXC package required).
sudo systemctl enable lxc && sudo systemctl start lxc && systemctl is-active lxc
anbox-container-manager.service
sudo systemctl enable anbox-container-manager && sudo systemctl start anbox-container-manager && systemctl is-active anbox-container-manager
anbox-session-manager.service
systemctl --user start anbox-session-manager
NOTE: to avoid further problems, instead of enabling anbox-session-manager.service
, I recommend using anbox-session-manager wrapper shell script to circumvent conflicts with X11 session start process
You should have several Android app desktop shortcuts. Test you can open any of those Android application.
Install new applications by using adb install -r <apk-file-name>
command.
If you encounter any errors os start up issues, consult log files /var/lib/anbox/logs/{console.log,container.log}
. Additionally, check anbox-session-manager
status (systemctl --user status anbox-session-manager
), anbox-container-manager
status (systemctl status anbox-container-manager
), LXC service status (systemctl status lxc.service
), network interface information (ifconfig
or ip addr
). Additionally, run the Anbox session manager directly from command line with debug options: ANBOX_LOG_LEVEL=debug anbox session-manager
(non-root)
NOTE: In many cases, failures on start up are caused by errors in LXC user/group mapping, stuck Android processes or network failures. I strongly recommend reading log files instead of purely relying on standard output of the Anbox container or session manager. For instance, the Anbox session manager complained about Boost TLS error, although the true issue was improper LXC user/group mappings. I fixed the situation by analysing and reading log entries.