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.

33 lines
2.7 KiB

  1. # Anbox installation steps
  2. 1) Install Anbox (`anbox-git`), Anbox kernel modules `ashmem_linux` + `binder_linux` (`anbox-modules-dkms-git`)
  3. 2) Load installed kernel modules (`modprobe ashmem_linux && modprobe binder_linux`). Check existence of `/usr/lib/modules-load.d/anbox.conf` file
  4. 3) Check the kernel modules have been loaded (`lsmod | grep linux`)
  5. 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](https://build.anbox.io/android-images/)
  6. 5) Install [subuid](https://fjordtek.com/git/Fincer/anbox-install/src/branch/master/anbox_files/subuid) and [subgid](https://fjordtek.com/git/Fincer/anbox-install/src/branch/master/anbox_files/subgid) files into `/etc/` folder.
  7. 6) Enable and start `lxc.service` (LXC package required).
  8. - `sudo systemctl enable lxc && sudo systemctl start lxc && systemctl is-active lxc`
  9. 7) Enable and start `anbox-container-manager.service`
  10. - `sudo systemctl enable anbox-container-manager && sudo systemctl start anbox-container-manager && systemctl is-active anbox-container-manager`
  11. 8) Start user service `anbox-session-manager.service`
  12. - `systemctl --user start anbox-session-manager`
  13. - **NOTE**: to avoid further problems, instead of enabling `anbox-session-manager.service`, I recommend using [anbox-session-manager wrapper shell script](anbox_files/anbox-session-manager) to circumvent conflicts with X11 session start process
  14. 9) You should have several Android app desktop shortcuts. Test you can open any of those Android application.
  15. 10) Install new applications by using `adb install -r <apk-file-name>` command.
  16. 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)
  17. **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.