Custom Anbox installation files & patches, including patched Android OS image file.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

2.6 KiB

Anbox installation steps

  1. Install Anbox (anbox-git), Anbox kernel modules ashmem_linux + binder_linux (anbox-modules-dkms-git)

  2. Load installed kernel modules (modprobe ashmem_linux binder_linux). Check existence of /usr/lib/modules-load.d/anbox.conf file

  3. Check the kernel modules have been loaded (lsmod | grep linux)

  4. 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

  5. Install subuid and subgid files into /etc/ folder.

  6. Enable and start lxc.service (LXC package required).

  • sudo systemctl enable lxc && sudo systemctl start lxc && systemctl is-active lxc
  1. Enable and start anbox-container-manager.service
  • sudo systemctl enable anbox-container-manager && sudo systemctl start anbox-container-manager && systemctl is-active anbox-container-manager
  1. Start user service 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

  1. You should have several Android app desktop shortcuts. Test you can open any of those Android application.

  2. 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.