= Installing Anbox
1. __'''Setting up compatible Kernel, Headers, and Modules'''__:
1.1. __'''Installing the Kernel and Headers'''__: Perform __one__ of the below options ('''not both''')
1.1.1. '''Install a patched kernel''':
1.1.1.1. Choose a kernel from here: [https://aur.archlinux.org/packages/?K=linux+anbox List of Arch Linux Kernels patched for Anbox]. For simplicity, this guide talks about the installation of {{{linux-xanmod-anbox}}}. However, you could use any of the kernels from the above link and follow similar steps to install the ''kernel'' and the '''corresponding''' ''kernel header''. [[BR]]
1.1.1.2. Install the above kernel (along with headers) using
{{{ pre
yay -S --needed linux-xanmod-anbox linux-xanmod-anbox-headers
}}}
1.1.2 (''Not recommended if you have not built a kernel before'') '''Build your kernel with configuration options''': Follow [https://wiki.archlinux.org/index.php/Anbox#Prerequisite How to Build Linux Zen Kernel with Configuration Options for Anbox].
1.2. __'''Boot through the new kernel'''__: This guide assumes that you use ''Grub'' as the bootloader (this is the default in RebornOS). Instead of steps 2.1 and 2.2, you could alternatively use [https://archlinux.org/packages/?name=grub-customizer grub-customizer] to accomplish the same tasks
1.2.1. '''Edit the Grub file''':
{{{ pre
sudo gedit /etc/default/grub
}}} to add the following lines (modify existing lines if they exist):
{{{ code bash
GRUB_DISABLE_SUBMENU=y
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
}}}
(''Save and exit'') [[BR]]
1.2.2 '''Regenerate grub.cfg''':
{{{ pre
sudo grub-mkconfig -o /boot/grub/grub.cfg
}}} [[BR]]
1.2.3. ''Reboot'' and '''choose''' the patched kernel that you just installed
1.3. __'''Setting up Kernel Modules'''__:
1.3.1. '''Enable module loading at boot''':
{{{ pre
sudo gedit /etc/modules-load.d/anbox.conf
}}} to create '''anbox.conf''' and add the below lines:
{{{ code bash
ashmem_linux
binder_linux
}}}
(''Save and exit'')
1.3.2. '''Load Modules''':
{{{ pre
sudo modprobe -a binder-linux ashmem-linux
}}} [[BR]]
1.3.3. '''Enable creating mount point of binderfs at boot''':
{{{ pre
sudo gedit /etc/tmpfiles.d/anbox.conf
}}} and add the following line:
{{{ code bash
d! /dev/binderfs 0755 root root
}}}
(''Save and exit'') [[BR]]
1.3.4. '''Mount binderfs''':
{{{ code bash
sudo mkdir -p /dev/binderfs
sudo mount -t binder none /dev/binderfs
}}} [[BR]]
1.3.5. '''Enable mounting binderfs at boot''':
{{{ pre
sudo gedit /etc/fstab
}}} and edit the file to add the following line:
{{{ code bash
none /dev/binderfs binder nofail 0 0
}}}
(''Save and exit'') [[BR]]
2. __'''Setting up Anbox'''__:
2.1. __'''Install Anbox'''__:
{{{ pre
yay -S anbox-git
}}}
(''Select one of the options. If you are not sure, you can pick '' {{{anbox-image-gapps-magisk-xposed}}})
2.2. __'''Configure Networking'''__:
{{{ pre
sudo systemctl enable --now systemd-networkd
}}}
2.3. __'''Enable the Container Manager Service'''__:
{{{ pre
sudo systemctl enable --now anbox-container-manager.service
}}}
2.4. __'''Enable the Session Manager Service'''__:
{{{ pre
sudo systemctl --user enable --now anbox-session-manager.service
}}}
2.5 __'''Verify modules'''__: Check if the modules are loaded correctly by running the below:
{{{ code bash
anbox systeminfo | grep binder -1
anbox systeminfo | grep ashmem -1
}}}