Ultimate Guide to install Anbox in any Arch-based distro(especially Garuda)

Yes, the part before "Second try" didn't work for me as well.

Yes, I used your guide to Load Modules: sudo modprobe -a binder-linux ashmem-linux (which was the part which was not working above, with the ReDroid procedure/script.

This happened to me only using zen kernel, while it worked using the linux-cacule kernel.
But be careful, in the terminal / docker nothing will show up, apart from the ID of your instance, and in my case a couple of error message that at a quick look on the Internet could be disregarded.
To open the "Android" you should have a VNC client (I use TigerVNC), open it and connect with YourIPaddress:5900

Graphically OK but with a bad standard resolution 720x1280, which can be changed passing additional parameters in the docker command, e.g. redroid.width=XXXX redroid.height=YYYY e.g. after -p 5555:5555

It's really worth studying it.
For a certain period I had to use it with other distros (but it shouldn't change much, you should only be careful with some aspects of brtfs, if insterested just search on the forum).
To give you an example, there was a solution I had to use composed by 6 or 7 modules/systems (a web server, a DB server, etc. etc., all configured to work one with each other). I followed the standard procedure and it took a whole day to compile/install, when I found the docker equivalent just the time to copy and paste a string...

1 Like

should I have my IP address in place of 'YourIPaddress'
.So I guess I have to include it in the initial command

Once again, thank you so much

1 Like

no, the command should remain as is, there you define the ports.
check your ip address and connect with e.g. in the appropriate TigerVNC field 192.168.1.125:5900

$ docker ps
CONTAINER ID   IMAGE                           COMMAND                  CREATED         STATUS         PORTS                                       NAMES
4197c18715b5   redroid/redroid:10.0.0-latest   "/init qemu=1 androi…"   2 minutes ago   Up 2 minutes   0.0.0.0:5555->5555/tcp, :::5555->5555/tcp   elegant_hopper

What does this mean, I can't see any graphical interface

I just ran:

$docker run -v ~/data:/data -d -p 5555:5555 --rm --memory-swappiness=0 --privileged redroid/redroid:10.0.0-latest                                                  ─╯
 adb connect <IP>:5555
 scrcpy --serial <IP>:5555

whole as a single command in linux-cacule, then Garuda suddenly got logged out.
when I log back in, I find a container running

Thanks

This is correct and created your instance.

In these two you should enter your ip address instead of < IP >.
I used the port for VNC instead, but what you did is correct and should work.

1 Like

Sorry to disturb you again and again

I tried this as you suggested, but :point_down: won't execute( I typed the command, and pressed enter, but terminal got freeze and I had to 'ctrl+c')

Now that I got some idea of all this,
and again checked the TigerVNC method
I first ran:

❯ docker run -v ~/data:/data -d -p 5900:5900 -p 5555:5555 --rm --memory-swappiness=0 --privileged redroid/redroid:10.0.0-latest redroid.vncserver=1

then,
adb connect localhost

then,
image
pressed connect

I waited... (just like in case with the terminal)
and got an error ->

image

It kind of doesn't work for me.

The scrcpy method works for, the container is even recognized by guiscrcpy. However its incredible slow compared to Anbox & input is delayed for some reason :confused:

2 Likes

Yes, that was terribly slow for me too, as I said a few posts above :blush:

1 Like

There is now a anbox-support package 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), thought that might help :grin:

5 Likes

It seems like my own instructions aren't working for me now (lol),
Anbox nor running in both xanmod and cacule, I tried a Garuda reinstall, still not working.
:thinking:
Is any body else facing this issue?

We need logs. But you are right, it doesnt work for me either right now. Looking at the systemd logs I get this:

Mai 03 10:44:53 T440p-void systemd[2536]: Started Anbox Session Manager.
Mai 03 10:44:54 T440p-void anbox[2543]: Failed to initialize EGL
Mai 03 10:44:54 T440p-void anbox[2543]: Failed to start container: Failed to start container: Failed to set config item lxc.group.devices.deny
Mai 03 10:44:54 T440p-void anbox[2543]: Lost connection to container manager, terminating.
Mai 03 10:44:54 T440p-void anbox[2543]: Container is not running
Mai 03 10:44:54 T440p-void anbox[2543]: Stack trace (most recent call last) in thread 2897:
Mai 03 10:44:54 T440p-void anbox[2543]: #5    Object "", at 0xffffffffffffffff, in
Mai 03 10:44:54 T440p-void systemd[2536]: anbox-session-manager.service: Main process exited, code=exited, status=1/FAILURE
Mai 03 10:44:54 T440p-void systemd[2536]: anbox-session-manager.service: Failed with result 'exit-code'.

which is pretty much the same issue reported here:

Best thing to do is to keep track of the issues :smiley:

Edit: downgrading lxc to 4.0.6 is indeed a temporary fix, taken from above linked issue :wink:

2 Likes

An update on this: its needed to reinstall anbox-git as a dependency (protobuf) got updated and the package needed to be rebuilt.

1 Like

Anbox has really pushed me to the limits of my sanity in getting it to work....and I LOVE that.

I guess it's what defines me as a linux user. This is a great project and I love being a Garuda user who is able to stay on top of it as things are changed and updated. :slight_smile:

4 Likes

Hi, did you try the GPU options? the redroid rendering with swiftshader (software) by default, and it's pretty slow. you can enable GPU options just like the doc says. Anbox rendering with GLES Host emulation (API forward with socket), and redroid can rendering with DRM directly (which should much more efficient). the redroid projects are still in early stage, and there are much work to do (libva to accelerate media codec; auto detect GPU and fallback to soft etc.).

1 Like

I tried this out. It seems like the binder module isn't loading for me:

╭─existingdude@existingdude in ~
╰─λ lsmod | grep -e ashmem_linux -e binder_linux
ashmem_linux           20480  0

Do you know why? I am using linux-cacule kernel

Anbox doesn't load up. It stays on Starting... for some time then crashes

Secure Boot and Fast Boot is disabled.

There seems to be a bug with lxc:

1 Like

Tried that still not working. Is this a cacule problem? Maybe I needed to change some configs in cacule before installing it to enable anbox. :thinking:

You need to downgrade to lxc 4.0.6, get all required configs in place by installing anbox support and enable both systemd services then it should work, linux-cacule is compatible ( tested :smiley: )

1 Like

Tried that, anbox is not working. Its not crashing but it is still stuck.

╰─λ lsmod | grep -e ashmem_linux -e binder_linux
ashmem_linux           20480  15

Same with me. I tried replacing binder_linux in the command:
lsmod | grep -e ashmem_linux -e binder_linux with binderfs_linux, binder and binderfs . But it didn't work

run this command sudo ls -1 /dev/{ashmem,binderfs}

and you will find binderfs module loaded

1 Like