WAYDROID formerly referred to as Anbox-Halium which is a rebuild of Anbox, intended to use more of the native host’s hardware resulting in faster performance as compared to Anbox .
https://wiki.archlinux.org/title/Waydroid
https://github.com/waydroid/waydroid
Though you might be able to follow the above guides and get Waydroid running,
most probably you might get stuck somewhere and find it all confusing, just like I was before getting it running.
The instructions are all the more similar to that for getting anbox running!
These steps should definitely work for everyone, and I have made sure everything step is explained well enough so that even someone new to Linux would be able to do it!
- Choose a kernel from here: List of Arch Linux Kernels patched for Anbox .
[ Anbox works with following kernels :-
- linux-zen (it is in the Arch Official Repositories),
- linux-tkg-bmq (it is in the chaotic-aur for Garuda users),
-
linux-cacule (it is in the chaotic-aur for Garuda users,
for more details refer:https://forum.garudalinux.org/t/linux-cacule-feedback-testing) -
linux-xanmod-anbox (it is in the chaotic-aur for Garuda users),**(Anbox doesn't work with linux-lts) ]
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.
-
To install the Xanmod kernel:
sudo pacman -S linux-xanmod-anbox linux-xanmod-anbox-headers
or
To install the Zen Kernel:
sudo pacman -S linux-zen linux-zen-headers
or
To install Linux-tkg-bmq:
sudo pacman -S linux-tkg-bmq linux-tkg-bmq-headers
or
To install Linux-cacule:
sudo pacman -S linux-cacule linux-cacule-headers
-
Reboot and choose the patched kernel that you just installed
-
Setting up Kernel Modules:
i) To enable module loading at boot(Kernel module - ArchWiki):
create a file inside /etc/modules-load.d/
, which contains the lines:
(sudo nano /etc/modules-load.d/waydroid.conf
)
/etc/modules-load.d/waydroid.conf
ashmem_linux
binder_linux
(Save and exit)
ii) Load Modules(Kernel module - ArchWiki):
sudo modprobe -a binder-linux ashmem-linux
(Might not be necessary for some kernels)
iii) To enable creating mount point of binderfs at boot(systemd - ArchWiki):
create a file in /etc/tmpfiles.d/
with the content:
(sudo nano /etc/tmpfiles.d/waydroid.conf
)
/etc/tmpfiles.d/waydroid.conf
d! /dev/binderfs 0755 root root
(Save and exit)
iv) Mount binderfs:
(mkdir(1) — Arch manual pages)
(mount(8) — Arch manual pages)
sudo mkdir -p /dev/binderfs
sudo mount -t binder none /dev/binderfs
v) To enable mounting binderfs at boot, add a line in the fstab. Using the option nofail
here will not greet you with a recovery shell when you are booting a kernel without binderfs support (such as the standard kernel):
(sudo nano /etc/fstab
)
/etc/fstab
none /dev/binderfs binder nofail 0 0
There is a
anbox-support
package(For Garuda Users) which pulls dependencies, sets the required configs in place and gives instructions how to complete the setup (/etc/fstab for example needs to be edited manually).
vi) Now to check the required modules are loaded and mounted automatically on boot, run:
sudo ls -1 /dev/{ashmem,binderfs}
It should give a somewhat similar output (depending on the kernel being used, I use linux-cacule
btw):
❯ sudo ls -1 /dev/{ashmem,binderfs}
/dev/ashmem
/dev/binderfs:
anbox-binder
anbox-hwbinder
anbox-vndbinder
binder
binder-control
features
hwbinder
vndbinder
5) Wayland
Waydroid only works in a Wayland session manager, so make sure you are in a Wayland session.
Note that even if you are in X11, many Wayland session manager supports nested session (so you can run it inside your X11 session), the simplest example is weston.
6) Setting up Waydroid:
- Install Waydroid (available in chaotic-aur for Garuda users):
sudo pacman -Syu waydroid && sudo waydroid init
- After installing, you will want to start the waydroid-container service
sudo systemctl start waydroid-container
- Then launch waydroid container:
sudo waydroid container start
- And launch the session:
waydroid session start
- Then launch the waydroid app in full UI mode by running the Waydroid app in the app drawer, or through the terminal:
waydroid show-full-ui
-
For network in your Waydroid container:
Please check this out:
Network in Waydroid -
Install an application:
waydroid app install $path_to_apk
Happy New Year 2022!