daemon.cpp:61@run org.freedesktop.DBus.Error.Disconnected 打开时无法刷新总线(对端重置连接)

daemon.cpp:61@run org.freedesktop.DBus.Error.Disconnected 打开时无法刷新总线(对端重置连接)

我正在尝试在我的 jetson nano arm64 上运行 Anbox。下面您可以看到我如何安装 anbox:

Step 1: We need /dev/binder and /dev/ashmem devices for android support.

Because the kernel is 4.9.140, its not possible dkms, or build them as loadable modules. But we can still build the modules in-tree with a kernel build.

Edit the file:

Linux_for_Tegra/source/public/kernel/kernel-4.9/arch/arm64/configs/tegra_defconfig file
and add these lines at the end

#Anbox Configuration
CONFIG_ANDROID=y
CONFIG_ANDROID_BINDER_IPC=y
CONFIG_ANDROID_BINDER_IPC_SELFTEST=y
CONFIG_ASHMEM=y

And do a kernel build with nvbuild.sh and install the modules and new kernel. Now we have the /dev/binder and /dev/ashmem.

Step 2: Set the permissions for the special files

cd /etc/udev/rules.d

Add a new file called 99-anbox.rules with content as:
KERNEL==“ashmem”, NAME="%k", MODE=“0666”
KERNEL==“binder”, NAME="%k", MODE=“0666”

then

sudo udevadm control --reload-rules && udevadm trigger

Step 3: Install an upgraded libSDL2 library

Due to a bug in the libSDL2 library available in 18.04, we need an upgraded version to be built from sources.

Download the libSDL2 sources of 19.04 from here:

https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/libsdl2/2.0.9+dfsg1-1ubuntu1.19.04.1/libsdl2_2.0.9+dfsg1.orig.tar.xz

Extract and build:

sudo apt-get build-dep libsdl2-2.0-0
./configure
make
sudo make install

Step 4: Build anbox arm64 from sources

Get the anbox arm64 sources from here:

https://github.com/anbox/anbox

git clone https://github.com/anbox/anbox.git --recurse-submodules
cd anbox
mkdir build
cd build
cmake ..
make
make install

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

which will allow cmake to find the upgraded libSDL2 library.

Step 5: Make it a proper installation

The Step 4 build and install of anbox is not a complete installation unfortunately. We need android image and services and launcher to be setup.

Download a sample android image from here:

http://anbox.postmarketos.org/android-7.1.2_r39-anbox_arm64-userdebug.img

Copy to /var/lib/anbox and rename it as android.img

Since we have to make it a proper installation, we refer to 20.04 arm64 deb of anbox. Its found here:

http://ports.ubuntu.com/pool/multiverse/a/anbox/anbox_0.0~git20191115-1build1_arm64.deb

Extract the deb file and make a copy of the files in data folder in our filesystem with a few changes.

i) copy the anbox executable from `/usr/local/bin to /usr/bin`

ii) Add these lines :

Environment=“DISPLAY=:1”
Environment=XAUTHORITY=/run/user/1000/gdm/

before ExecStart in /usr/lib/systemd/user/anbox-session-manager.service file

Step 6: Start the anbox services

sudo systemctl unmask anbox-container-manager.service
sudo systemctl start anbox-container-manager.service
sudo systemctl enable anbox-container-manager.service

systemctl --user unmask anbox-session-manager.service
systemctl --user start anbox-session-manager.service
systemctl --user enable anbox-session-manager.service

// Check status of the services
sudo systemctl status anbox-container-manager.service
systemctl --user status anbox-session-manager.service

reboot

launch the anbox application manager from the terminal with the command :

anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity

它不起作用。错误是:

[daemon.cpp:61@run] [org.freedesktop.DBus.Error.Disconnected] 打开时刷新总线失败(对端重置连接)

在此处输入图片描述

有人能给我一些修复该错误的建议吗?谢谢。

答案1

以下对我有用:

sudo pacman -S anbox anbox-image
export EGL_PLATFORM=x11
sudo systemctl start anbox-container-manager
anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity

永久的解决方案是将变量添加到/etc/environment

sudo vi /etc/environment 然后附加到文件EGL_PLATFORM=x11

就我而言,/etc/environment 有:

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
EGL_PLATFORM=x11

相关内容