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

To downgrade lxc to version 4.0.6:

  • Install downgrade (a Bash script to downgrade one (or multiple) packages, by using the pacman cache or the Arch Rollback Machine) : sudo pacman -S downgrade
  • Downgrade by: sudo downgrade lxc
  • To varify run: lxc-info --version
1 Like

Still not working. Maybe I am doing something wrong?

You can share your logs, run: anbox session-manager

Anbox session manager is stuck and not printing anything.

try rebooting, and then run the command

Still the same.

try reinstalling anbox and its depende...... if possible, you can leave the image as it is

Now frankly speaking has anyone been successful in installing an app in anbox? :face_with_raised_eyebrow:

I didn't.
But I gave up one month ago, since at that time I was able to start-up the system, it seemed usable/working, but the only app I was interested in (Roblox, for my kids) could be installed, but was not starting.
I haven't followed it up afterwards...

Yes, before, I used WhatsApp, F-Droid, Aurora Droid, Aurora Store and much more.

Try using some other kernel and update us

@Austin It does not launch for me, when run in terminal I get

[ 2021-05-30 22:55:02] [client.cpp:48@start] Failed to start container: Failed to start container: Failed to start container
[ 2021-05-30 22:55:02] [session_manager.cpp:164@operator()] Lost connection to container manager, terminating.
[ 2021-05-30 22:55:02] [daemon.cpp:61@Run] Container is not running
terminate called after throwing an instance of 'boost::wrapexcept<boost::exception_detail::error_info_injector<boost::log::v2_mt_posix::system_error> >'
  what():  Failed to set TLS value: Invalid argument
Stack trace (most recent call last) in thread 54810:

My log of anbox session-manager is same too. What kernel are you using?

I am using tkg-bmq

Did you follow every step in my post?

You should run all these commands too:

I did, the problem is that the binder and ashmem modules aren’t building properly.
Running sudo dkms autoinstall:

Error! Could not locate dkms.conf file.
File: /var/lib/dkms/nvidia/465.24.02/source/dkms.conf does not exist.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j4 KERNELRELEASE=5.12.8-2-cacule all KERNEL_SRC=/lib/modules/5.12.8-2-cacule/build...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.12.8-2-cacule (x86_64)
Consult /var/lib/dkms/anbox-ashmem/1/build/make.log for more information.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j4 KERNELRELEASE=5.12.8-2-cacule all KERNEL_SRC=/lib/modules/5.12.8-2-cacule/build...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.12.8-2-cacule (x86_64)
Consult /var/lib/dkms/anbox-binder/1/build/make.log for more information.

So its probably an issue with the drivers, the kernel, or the modules itself.
The binder modules make.log:

DKMS make.log for anbox-binder-1 for kernel 5.12.8-2-cacule (x86_64)
Tue Jun  1 07:54:31 AM IST 2021
make -C /lib/modules/5.12.8-2-cacule/build V=0 M=$PWD
make[1]: Entering directory '/usr/lib/modules/5.12.8-2-cacule/build'
  CC [M]  /var/lib/dkms/anbox-binder/1/build/deps.o
  CC [M]  /var/lib/dkms/anbox-binder/1/build/binder.o
In file included from ././include/linux/kconfig.h:5,
                 from <command-line>:
./include/generated/autoconf.h:3406: warning: "CONFIG_ANDROID_BINDER_DEVICES" redefined
 3406 | #define CONFIG_ANDROID_BINDER_DEVICES "binder,hwbinder,vndbinder"
      | 
<command-line>: note: this is the location of the previous definition
In file included from ././include/linux/kconfig.h:5,
                 from <command-line>:
./include/generated/autoconf.h:3406: warning: "CONFIG_ANDROID_BINDER_DEVICES" redefined
 3406 | #define CONFIG_ANDROID_BINDER_DEVICES "binder,hwbinder,vndbinder"
      | 
<command-line>: note: this is the location of the previous definition
/var/lib/dkms/anbox-binder/1/build/binder.c: In function ‘task_get_unused_fd_flags’:
/var/lib/dkms/anbox-binder/1/build/binder.c:444:16: error: implicit declaration of function ‘__alloc_fd’ [-Werror=implicit-function-declaration]
  444 |         return __alloc_fd(files, 0, rlim_cur, flags);
      |                ^~~~~~~~~~
/var/lib/dkms/anbox-binder/1/build/binder.c: In function ‘task_fd_install’:
/var/lib/dkms/anbox-binder/1/build/binder.c:454:17: error: implicit declaration of function ‘__fd_install’; did you mean ‘fd_install’? [-Werror=implicit-function-declaration]
  454 |                 __fd_install(proc->files, fd, file);
      |                 ^~~~~~~~~~~~
      |                 fd_install
/var/lib/dkms/anbox-binder/1/build/binder.c: In function ‘task_close_fd’:
/var/lib/dkms/anbox-binder/1/build/binder.c:467:18: error: implicit declaration of function ‘__close_fd’; did you mean ‘close_fd’? [-Werror=implicit-function-declaration]
  467 |         retval = __close_fd(proc->files, fd);
      |                  ^~~~~~~~~~
      |                  close_fd
/var/lib/dkms/anbox-binder/1/build/binder.c: In function ‘binder_update_page_range’:
/var/lib/dkms/anbox-binder/1/build/binder.c:633:33: error: ‘struct mm_struct’ has no member named ‘mmap_sem’; did you mean ‘mmap_base’?
  633 |                 down_write(&mm->mmap_sem);
      |                                 ^~~~~~~~
      |                                 mmap_base
/var/lib/dkms/anbox-binder/1/build/binder.c:683:31: error: ‘struct mm_struct’ has no member named ‘mmap_sem’; did you mean ‘mmap_base’?
  683 |                 up_write(&mm->mmap_sem);
      |                               ^~~~~~~~
      |                               mmap_base
/var/lib/dkms/anbox-binder/1/build/binder.c:710:31: error: ‘struct mm_struct’ has no member named ‘mmap_sem’; did you mean ‘mmap_base’?
  710 |                 up_write(&mm->mmap_sem);
      |                               ^~~~~~~~
      |                               mmap_base
/var/lib/dkms/anbox-binder/1/build/binder.c: In function ‘binder_mmap’:
/var/lib/dkms/anbox-binder/1/build/binder.c:3486:23: error: implicit declaration of function ‘get_files_struct’; did you mean ‘put_files_struct’? [-Werror=implicit-function-declaration]
 3486 |         proc->files = get_files_struct(current);
      |                       ^~~~~~~~~~~~~~~~
      |                       put_files_struct
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:271: /var/lib/dkms/anbox-binder/1/build/binder.o] Error 1
make[1]: *** [Makefile:1854: /var/lib/dkms/anbox-binder/1/build] Error 2
make[1]: Leaving directory '/usr/lib/modules/5.12.8-2-cacule/build'
make: *** [Makefile:8: all] Error 2

Reading this, I can’t figure out whats wrong, someone more experienced will have to check it out.

The ashmem modules log is shorter:

DKMS make.log for anbox-ashmem-1 for kernel 5.12.8-2-cacule (x86_64)
Tue Jun  1 07:54:30 AM IST 2021
make -C /lib/modules/5.12.8-2-cacule/build V=0 M=$PWD
make[1]: Entering directory '/usr/lib/modules/5.12.8-2-cacule/build'
  CC [M]  /var/lib/dkms/anbox-ashmem/1/build/ashmem.o
  CC [M]  /var/lib/dkms/anbox-ashmem/1/build/deps.o
  LD [M]  /var/lib/dkms/anbox-ashmem/1/build/ashmem_linux.o
  MODPOST /var/lib/dkms/anbox-ashmem/1/build/Module.symvers
ERROR: modpost: "kallsyms_lookup_name" [/var/lib/dkms/anbox-ashmem/1/build/ashmem_linux.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:145: /var/lib/dkms/anbox-ashmem/1/build/Module.symvers] Error 1
make[2]: *** Deleting file '/var/lib/dkms/anbox-ashmem/1/build/Module.symvers'
make[1]: *** [Makefile:1758: modules] Error 2
make[1]: Leaving directory '/usr/lib/modules/5.12.8-2-cacule/build'
make: *** [Makefile:12: all] Error 2

Overall, I don’t know whats wrong. Maybe the modules themselves are corrupted?

Now I am getting this error :thinking: :

anbox session-manager                                                                            
anbox: error while loading shared libraries: libboost_log.so.1.75.0: cannot open shared object file: No such file or directory

Aah, needs a rebuild due to boost having an update lately :slight_smile:

2 Likes

Tried building anbox-git ---->

make[2]: *** [src/CMakeFiles/anbox-core.dir/build.make:1002: src/CMakeFiles/anbox-core.dir/anbox/input/manager.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1682: src/CMakeFiles/anbox-core.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

I have probably some good news for you :smiley:

Anbox is building, Ill tell you once its ready :slight_smile:

Edit: its ready, enjoy :smiley: (might need a sudo pacman -Syu as pkgver/pkgrel didnt change, its a git package)

6 Likes