Unable to start anbox

Starting anbox session-manager gives following errors:

[ 2020-12-31 18:34:20] [client.cpp:48@start] Failed to start container: Failed to start container: Failed to start container
[ 2020-12-31 18:34:20] [session_manager.cpp:161@operator()] Lost connection to container manager, terminating.
[ 2020-12-31 18:34:20] [daemon.cpp:61@Run] Container is not running

Running ls -1 /dev/{ashmem,binderfs} shows:

    /dev/ashmem

    /dev/binderfs:
    binder
    binder-control
    hwbinder
    vndbinder

Installed anbox-git from AUR. Using kernel 5.10 from manjaro repos. What should I do further?

1 Like

Have you checked the Arch Wiki page? Anbox - ArchWiki

I have probably same problem with anbox. Couldn’t get it run…

$ ANBOX_LOG_LEVEL=debug anbox session-manager
[ 2021-01-02 14:07:25] [Renderer.cpp:165@initialize] Using a surfaceless EGL context
[ 2021-01-02 14:07:25] [Renderer.cpp:248@initialize] Successfully initialized EGL
[ 2021-01-02 14:07:26] [client.cpp:48@start] Failed to start container: Failed to start container: Failed to start container
[ 2021-01-02 14:07:26] [session_manager.cpp:161@operator()] Lost connection to container manager, terminating.
[ 2021-01-02 14:07:26] [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 358327:
#16   Object "", at 0xffffffffffffffff, in

I should have kernel settings ok: (kernel 5.10.2-2-MANJARO)

$ zgrep -i -e android -e ashmem /proc/config.gz
# Android
CONFIG_ASHMEM=y
# end of Android
# Android
CONFIG_ANDROID=y
CONFIG_ANDROID_BINDER_IPC=y
CONFIG_ANDROID_BINDERFS=y
CONFIG_ANDROID_BINDER_DEVICES="binder,hwbinder,vndbinder"
# CONFIG_ANDROID_BINDER_IPC_SELFTEST is not set
# end of Android

also have created dir /dev/binderfs:

$ mount | grep binder   
binder on /dev/binderfs type binder (rw,relatime,max=1048576)

I’m little bit concerned about the modules though…

$ modprobe -a binder-linux ashmem-linux
modprobe: WARNING: Module binder-linux not found in directory /lib/modules/5.10.2-2-MANJARO
modprobe: WARNING: Module ashmem-linux not found in directory /lib/modules/5.10.2-2-MANJARO

in anbox system-info it seems that just binder mod is missing…

$ anbox system-info                                                                   
version: local-6c10125
cpu:
  arch:  x86
  brand: Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz
  features: 
    - aes
    - sse4_1
    - sse4_2
    - avx
    - avx2
os:
  name: Manjaro Linux
  version: 
  snap-based: false
kernel:
  version: Linux version 5.10.2-2-MANJARO (builduser@LEGION) (gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.35.1) #1 SMP PREEMPT Tue Dec 22 08:14:42 UTC 2020
  binder: false
  ashmem: true

I have created network connection trough nmcli:

$ nmcli connection show anbox-net 
connection.id:                          anbox-net
connection.uuid:                        634fd1a0-0b7b-4047-adb0-6d5b318ce088
connection.stable-id:                   --
connection.type:                        bridge
connection.interface-name:              anbox0
connection.autoconnect:                 yes
connection.autoconnect-priority:        0
connection.autoconnect-retries:         -1 (default)
connection.multi-connect:               0 (default)
connection.auth-retries:                -1
connection.timestamp:                   1609597328
connection.read-only:                   no
connection.permissions:                 --
connection.zone:                        --
connection.master:                      --
connection.slave-type:                  --
connection.autoconnect-slaves:          -1 (default)
connection.secondaries:                 --
connection.gateway-ping-timeout:        0
connection.metered:                     unknown
connection.lldp:                        default
connection.mdns:                        -1 (default)
connection.llmnr:                       -1 (default)
connection.wait-device-timeout:         -1
ipv4.method:                            shared
ipv4.dns:                               --
ipv4.dns-search:                        --
ipv4.dns-options:                       --
ipv4.dns-priority:                      0
ipv4.addresses:                         192.168.250.1/24
ipv4.gateway:                           --
ipv4.routes:                            --
ipv4.route-metric:                      -1
ipv4.route-table:                       0 (unspec)
ipv4.routing-rules:                     --
ipv4.ignore-auto-routes:                no
ipv4.ignore-auto-dns:                   no
ipv4.dhcp-client-id:                    --
ipv4.dhcp-iaid:                         --
ipv4.dhcp-timeout:                      0 (default)
ipv4.dhcp-send-hostname:                yes
ipv4.dhcp-hostname:                     --
ipv4.dhcp-fqdn:                         --
ipv4.dhcp-hostname-flags:               0x0 (none)

when I run the “.desktop” launcher there’s just “Starting” image & then it crashes:

$ anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity
[ 2021-01-02 14:31:01] [daemon.cpp:61@Run] [org.freedesktop.DBus.Error.ServiceUnknown] The name org.anbox was not provided by any .service files

btw. I have installed these anbox aur packages:

$ pacman -Qs anbox    
local/anbox-git 1:r1319.6c10125-1
    Running Android in a container
local/anbox-image-gapps-magisk 2018.07.19-17
    Android image for running in Anbox, with OpenGApps, Houdini and Magisk (Bootless)

when I try to run adb…

$ adb shell  
adb: no devices/emulators found

there are some errors in /var/lib/anbox/logs/container.log

lxc 20210102143012.386 ERROR    conf - conf.c:turn_into_dependent_mounts:3012 - Invalid argument - Failed to copy "/proc/self/mountinfo"
lxc 20210102143012.387 DEBUG    storage - storage/storage.c:storage_query:233 - Detected rootfs type "dir"
lxc 20210102143012.765 ERROR    dir - storage/dir.c:dir_mount:152 - No space left on device - Failed to mount "/var/lib/anbox/rootfs" on "/usr/lib/lxc/rootfs"
lxc 20210102143012.765 ERROR    conf - conf.c:lxc_mount_rootfs:1256 - Failed to mount rootfs "/var/lib/anbox/rootfs" onto "/usr/lib/lxc/rootfs" with options "(null)"
lxc 20210102143012.765 ERROR    conf - conf.c:lxc_setup_rootfs_prepare_root:3141 - Failed to setup rootfs for
lxc 20210102143012.765 ERROR    conf - conf.c:lxc_setup:3277 - Failed to setup rootfs
lxc 20210102143012.765 ERROR    start - start.c:do_start:1218 - Failed to setup container "default"
lxc 20210102143012.765 TRACE    sync - sync.c:lxc_sync_wake_parent:78 - Child waking parent with sequence error
lxc 20210102143012.765 ERROR    sync - sync.c:__sync_wait:36 - An error occurred in another process (expected sequence number 5)
lxc 20210102143012.765 DEBUG    network - network.c:lxc_delete_network:3665 - Deleted network devices
lxc 20210102143012.765 TRACE    start - start.c:lxc_serve_state_socket_pair:502 - Sent container state "ABORTING" to 13
lxc 20210102143012.765 TRACE    start - start.c:lxc_serve_state_clients:438 - Set container state to ABORTING
lxc 20210102143012.765 TRACE    start - start.c:lxc_serve_state_clients:441 - No state clients registered
lxc 20210102143012.765 ERROR    lxccontainer - lxccontainer.c:wait_on_daemonized_start:859 - Received container state "ABORTING" instead of "RUNNING"
lxc 20210102143012.765 ERROR    start - start.c:__lxc_start:1999 - Failed to spawn container "default"

What can we do about this…? :slight_smile:

P.S.: I just found some weird behavior in mount output - there is repeatedly this:

/dev/loop1 on /usr/lib/lxc/rootfs type squashfs (ro,relatime)
/dev/sdb1 on /usr/lib/lxc/rootfs/cache type ext4 (rw,noatime)
/dev/sdb1 on /usr/lib/lxc/rootfs/data type ext4 (rw,noatime)
none on /usr/lib/lxc/rootfs/dev type tmpfs (rw,relatime,size=492k,mode=755,inode64)
proc on /usr/lib/lxc/rootfs/proc type proc (rw,nosuid,nodev,noexec,relatime)
proc on /usr/lib/lxc/rootfs/proc/tty type proc (rw,nosuid,nodev,noexec,relatime)
proc on /usr/lib/lxc/rootfs/proc/sys type proc (rw,nosuid,nodev,noexec,relatime)
$ mount | wc -l       
28751

There is probably some infinite loop when mounting devices…?

Anybody? Or where should I ask - on anbox git issues? But I doubt they would help me, because it says, that binder is not functional… I don’t think that’s even issue of arch. Or should I just move to arch to solve all the issues…?

Both of the above are not problems, because even for me it shows the same but still Anbox is working.

Did you start/enable anbox-container-manager.service, as mentioned here?

yes. Did not work. Didn’t compile the kernel. Did other steps

Yes service is running

I can confirm that Anbox isn’t working in the stable branch with the kernel 5.10.2-2-MANJARO. So currently the solution is to switch to testing branch or waiting until the stable branch gets required updates. In testing branch with the kernel 5.10.4-2-MANJARO Anbox is working well.