나는 팔로우했다Waydroid 아치 위키 페이지그리고 waydroid
, binder_linux-dkms
그리고 waydroid-image-gapps
.
waydroid를 실행하면 네트워킹 부분을 제외하고는 잘 작동합니다.
호스트 컴퓨터에 새 인터페이스가 있습니다.
30: waydroid0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 00:16:3e:00:00:02 brd ff:ff:ff:ff:ff:ff
inet 192.168.240.1/24 brd 192.168.240.255 scope global waydroid0
valid_lft forever preferred_lft forever
inet6 fe80::216:3eff:fe00:1/64 scope link
valid_lft forever preferred_lft forever
31: vethbrQLNw@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master waydroid0 state UP group default qlen 1000
link/ether fe:3e:17:46:42:95 brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet6 fe80::fc3e:17ff:fe47:4295/64 scope link
valid_lft forever preferred_lft forever
하지만 네트워크 인터페이스를 올바르게 구성하지 않았습니다.waydroid shell
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0@if31: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 00:16:3e:f9:d3:03 brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet6 fe80::fba7:3c32:8e2f:857/64 scope link stable-privacy
valid_lft forever preferred_lft forever
그래서 ping을 시도하면 1.1.1.1
오류가 발생합니다: connect: Network is unreachable
. 그리고 Wayland에는 인터넷이 없습니다.
ufw나 방화벽이 설치되어 있지 않습니다.
나는 시도했다:
- 재시작
waydroid-container.service
- 멈추다
nftables.service
- 재시작
iptables.service
추신 : Journalctl에 다음이 있습니다.
окт 27 15:16:53 nous dnsmasq[139035]: started, version 2.87 cachesize 150
окт 27 15:16:53 nous dnsmasq[139035]: compile time options: IPv6 GNU-getopt DBus no-UBus i18n IDN2 DHCP DHCPv6 no-Lua TFTP con>
окт 27 15:16:53 nous dnsmasq-dhcp[139035]: DHCP, IP range 192.168.240.2 -- 192.168.240.254, lease time 1h
окт 27 15:16:53 nous dnsmasq-dhcp[139035]: DHCP, sockets bound exclusively to interface waydroid0
окт 27 15:16:53 nous dnsmasq[139035]: reading /etc/resolv.conf
окт 27 15:16:53 nous dnsmasq[139035]: using nameserver 127.0.0.1#53
окт 27 15:16:53 nous dnsmasq[139035]: read /etc/hosts - 148944 addresses
(127.0.0.1은 마운트를 바인딩하지 않았기 때문입니다)
waydroid log
산출:
(138954) [15:16:45] % chmod 666 -R /dev/binder
(138954) [15:16:45] % chmod 666 -R /dev/anbox-vndbinder
(138954) [15:16:45] % chmod 666 -R /dev/anbox-hwbinder
(138954) [15:16:45] Container manager is waiting for session to load
(139008) [15:16:52] Save session config: /var/lib/waydroid/session.cfg
(139008) [15:16:52] UserMonitor service is not even started
(139008) [15:16:52] Clipboard service is not even started
(138954) [15:16:52] % /usr/lib/waydroid/data/scripts/waydroid-net.sh start
vnic is waydroid0
(138954) [15:16:53] % mount /usr/share/waydroid-extra/images/system.img /var/lib/waydroid/rootfs
(138954) [15:16:53] % mount -o remount,ro /usr/share/waydroid-extra/images/system.img /var/lib/waydroid/rootfs
(138954) [15:16:53] % mount /usr/share/waydroid-extra/images/vendor.img /var/lib/waydroid/rootfs/vendor
(138954) [15:16:53] % mount -o remount,ro /usr/share/waydroid-extra/images/vendor.img /var/lib/waydroid/rootfs/vendor
(138954) [15:16:53] % mount -o bind /var/lib/waydroid/waydroid.prop /var/lib/waydroid/rootfs/vendor/waydroid.prop
(138954) [15:16:53] Save config: /var/lib/waydroid/waydroid.cfg
(138954) [15:16:53] % mount -o bind /home/user/.local/share/waydroid/data /var/lib/waydroid/data
(138954) [15:16:53] % chmod 777 -R /dev/ashmem
(138954) [15:16:53] % chmod 777 -R /dev/dri
(138954) [15:16:53] % chmod 777 -R /dev/fb0
(138954) [15:16:53] % chmod 777 -R /dev/video3
(138954) [15:16:53] % chmod 777 -R /dev/video2
(138954) [15:16:53] % chmod 777 -R /dev/video1
(138954) [15:16:53] % chmod 777 -R /dev/video0
(138954) [15:16:53] % lxc-start -P /var/lib/waydroid/lxc -F -n waydroid -- /init
(138954) [15:16:53] New background process: pid=139115, output=background
(138954) [15:16:53] Save session config: /var/lib/waydroid/session.cfg
(139008) [15:17:02] waydroidusermonitor: Received transaction: 1
(139008) [15:17:02] Android with user 0 is ready
(146313) [15:40:48] % tail -n 60 -F /var/lib/waydroid/waydroid.log
(146313) [15:40:48] *** output passed to waydroid stdout, not to this log ***
답변1
해결 방법으로 NFT 사용을 비활성화할 수 있습니다(그렇지 않으면 네트워크를 사용할 수 없게 됩니다). 어떤 이유로 이 기능은 기본적으로 활성화되어 있습니다(범죄비활성화합니다).
Arch-linux인 경우 /usr/lib/waydroid/data/scripts/waydroid-net.sh
다음 줄을 수정하고 확인해야 합니다.
LXC_USE_NFT=false
답변2
스크립트가 waydroid-net.sh
다시 변경되었으므로 더 많은 패치가 필요합니다.
- 장애를 입히다
nftables
- 비활성화
iptables-legacy
하고ip6tables-legacy
이 작업은 다음 명령을 사용하여 수행할 수 있습니다.
sudo sed -i~ -E 's/=.\$\(command -v (nft|ip6?tables-legacy).*/=/g' \
/usr/lib/waydroid/data/scripts/waydroid-net.sh
서비스를 다시 시작해야 할 수도 있습니다.
sudo systemctl restart waydroid-container.service
Waydroid 1.4.1을 사용하여 Ubuntu 22.04에서 테스트되었습니다.