|
|
@ -0,0 +1,33 @@ |
|
|
|
# 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](https://build.anbox.io/android-images/) |
|
|
|
|
|
|
|
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. |
|
|
|
|
|
|
|
6) Enable and start `lxc.service` (LXC package required). |
|
|
|
|
|
|
|
- `sudo systemctl enable lxc && sudo systemctl start lxc && systemctl is-active lxc` |
|
|
|
|
|
|
|
7) 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` |
|
|
|
|
|
|
|
8) 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](anbox_files/anbox-session-manager) to circumvent conflicts with X11 session start process |
|
|
|
|
|
|
|
9) You should have several Android app desktop shortcuts. Test you can open any of those Android application. |
|
|
|
|
|
|
|
10) 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. |