How to Run Android Apps in Linux Without an Emulator

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

  2. Reboot and choose the patched kernel that you just installed

  3. Setting up Kernel Modules:

i) To enable module loading at boot, create a file inside /etc/modules-load.d/, which contains the lines:
(sudo nano /etc/modules-load.d/anbox.conf)

/etc/modules-load.d/anbox.conf

ashmem_linux
binder_linux

(Save and exit)

ii) Load Modules: sudo modprobe -a binder-linux ashmem-linux
(You can skip this step for linux-tkg-bmq)

iii) To enable creating mount point of binderfs at boot, create a file in /etc/tmpfiles.d/ with the content:
(sudo nano /etc/tmpfiles.d/anbox.conf)

/etc/tmpfiles.d/anbox.conf

d! /dev/binderfs 0755 root root

(Save and exit)

iv) Mount binderfs:

  • 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
  1. To check modules status:
    sudo ls -1 /dev/{ashmem,binderfs}

This should work here.