我已经从默认存储库安装了 anbox。
和ashmem
模块binder
已加载:
$ lsmod | grep _linux
binder_linux 163840 0
ashmem_linux 20480 0
系统anbox-container-manager
服务正在运行:
$ systemctl status anbox-container-manager
● anbox-container-manager.service - Anbox Container Manager
Loaded: loaded (/lib/systemd/system/anbox-container-manager.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2019-11-08 12:17:33 GMT; 7min ago
Docs: man:anbox(1)
Process: 1239 ExecStartPre=/sbin/modprobe ashmem_linux (code=exited, status=0/SUCCESS)
Process: 1250 ExecStartPre=/sbin/modprobe binder_linux (code=exited, status=0/SUCCESS)
Process: 1265 ExecStartPre=/usr/share/anbox/anbox-bridge.sh start (code=exited, status=0/SUCCESS)
Main PID: 1334 (anbox)
Tasks: 9 (limit: 4915)
Memory: 11.3M
CGroup: /system.slice/anbox-container-manager.service
└─1334 /usr/bin/anbox container-manager --daemon --privileged --data-path=/var/lib/anbox
Nov 08 12:17:33 frog systemd[1]: Starting Anbox Container Manager...
Nov 08 12:17:33 frog systemd[1]: Started Anbox Container Manager.
但是当我尝试启动会话管理器时,它声称内核模块未安装:
$ anbox session-manager
[ 2019-11-08 12:25:39] [session_manager.cpp:130@operator()] Failed to start as either binder or ashmem kernel drivers are not loaded
这是一个已知的问题?
答案1
内核模块在那里,但是/dev/binderbinder_linux
不是——因为模块现在不是这样工作的。莫菲斯不过,不要认为这是一个 bug,因为他们有一个 pull request 来让 anbox 与当前binder_linux
模块一起工作。据我所知,你应该能够让它与 snap 的“edge”通道一起工作。即,
sudo snap install --devmode --edge anbox
但我对 Snap 的使用经验为零
答案2
今天这里出现同样的错误,我的系统:
$ uname -a
Linux ntg-pc 5.3.0-26-generic #28-Ubuntu SMP Wed Dec 18 05:37:46 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
我注意到的一件事是,尽管 modprobe 运行正常,但仅/dev/ashmem
创建了...
sudo modprobe ashmem_linux
$ sudo modprobe binder_linux
$ lsmod | grep -e ashmem_linux -e binder_linux
2:ashmem_linux 20480 0
3:binder_linux 163840 0
$ ls -alh /dev/binder /dev/ashmem
ls: cannot access '/dev/binder': No such file or directory
crw------- 1 root root 10, 53 Jan 21 19:10 /dev/ashmem