-
Notifications
You must be signed in to change notification settings - Fork 1.2k
The anbox container can not connect to the network #443
Comments
Same issue in ARCH. There is no default gateway in the container (adb shell) and bridge 192.168.250.1 is not accessible. |
If you
This can be manually fixed (either as root inside the container, or using
I don't understand how it would have ended up in this state, though. |
@ephemient how do you run commands as root in adb shell? I have issue #429 :
Additionally |
Yeah, and @velemas I was using my own anbox-shell script to enter the Anbox container. |
@ephemient thanks a lot, now it works with your script. Last time I tried anbox in May and it was working fine but now we have this issue. |
@ephemient it works,thx.在adb shell中,切换到root,用上面的ip route和ip rule命令执行,就能连上网了。 |
I am using your script, but when I type |
@webmagnets you might have done it very early when eth0 address hasn't yet been set to 192.168.250.2. Try using |
This is what I see:
|
@webmagnets You're not root. |
I just now ran this
|
You're not root inside the container. Maybe a userns uid mapping issue or something. Not sure how your system is set up, though, the script works elsewhere. |
I really appreciate you taking the time to help me. Does this help?:
|
My installation isn't snap-based, it could be something Snap is setting up differently. It's possible that |
Running the following commands made my network work in Anbox, running Ubuntu 17.10:
|
Its seems these commands have to be run everytime anbox is started. I guess the only real fix now is a script? |
I can confirm #443 (comment) fixes the issue for me in 17.10 but it needs to be run everytime Anbox is started. |
@ephemient The script gives me the following error
|
I have same/similar issue but workaround fails for me.
It may be relevant to fact my host machine has no eth0 as well? I mean:
|
As an additional remark, the unofficial packages for Debian, where can be obtained here: |
I can confirm this is still an issue with the Snap package version 4-558d646. I can no longer find the current snap when using |
@kode54 You should not have been able to find the Can you provide the output of |
Here you go: anbox-system-diagnostics-2018-08-08.zip I also look forward to that install-playstore.sh being updated to take advantage of the rootfs overlay functionality, although it looks like it also needs to be used to restore permissions that are normally revoked. I don't think they're actually needed, though. E: Worse still, when I try this with the edge version, Play Store locks up on launch. E2: Running the package unmodified is probably the best course of action. Revision 134 seems to have working network, and seems to work fine, so long as I'm not modifying it to install the Play Services and Play Store. |
I have a network/routing problem, too. I can ping my anbox from my host, but I can't ping my host or anything beyond the anbox network from anbox. x86_64:/ # ip a l |
Also had this issue on 18.04 where I had to manually add an ip rule described in #443 But on my host machine I have |
Hi there. Installed anbox on 18.04, upgraded the system to 18.10 now. My anbox is a snap package, and the kernem modules were installed from ppa / apt In this configuration, it seems there is no internet connectivity in the android apps. However $ adb shell
x86_64:/ $ ifconfig -a
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope: Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:248 TX bytes:248
eth0 Link encap:Ethernet HWaddr aa:a4:86:61:54:4a
inet addr:192.168.250.2 Bcast:192.168.250.255 Mask:255.255.255.0
inet6 addr: fe80::a8a4:86ff:fe61:544a/64 Scope: Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:282 errors:0 dropped:0 overruns:0 frame:0
TX packets:311 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:38403 TX bytes:24538
x86_64:/ $ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.250.1 0.0.0.0 UG 0 0 0 eth0
192.168.250.0 * 255.255.255.0 U 0 0 0 eth0
x86_64:/ $ ping -c1 8.8.8.8
ping: icmp open socket: Operation not permitted
2|x86_64:/ $ su
x86_64:/ # ping -c1 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=122 time=25.7 ms
--- 8.8.8.8 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 25.785/25.785/25.785/0.000 ms Very strange. But what I have also noticed now is that there is an anbox deb package in 18.10 cosmic repos. Which is the following version: anbox/cosmic 0.0~git20180915-1 amd64
Android in a box
anbox-modules-dkms/now 13 all [installed,local]
Android kernel driver (binder, ashmem) in DKMS format. vs my snap package, which is the version: anbox 4-e1ecd04 158 beta morphis devmode Maybe I will try nuking the snap package, and reinstalling |
No, the deb won't help you. It's a much older version coming from Debian. We only support the snap package as we can keep it updated.This needs further investigation.Am 19.01.2019 11:09 schrieb Dreamcat4 <notifications@github.com>:Hi there. Installed anbox on 18.04, upgraded the system to 18.10 now. My anbox is a snap package, and the kernem modules were installed from ppa / apt anbox-dkms.
In this configuration, it seems there is no internet connectivity in the android apps. However adb shell and then it shows the following situation, where onlt the root user has network access. And the regular android user (that the andoid apps use) does not have permission to open up network sockets:
$ adb shell
x86_64:/ $ ifconfig -a
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope: Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:248 TX bytes:248
eth0 Link encap:Ethernet HWaddr aa:a4:86:61:54:4a
inet addr:192.168.250.2 Bcast:192.168.250.255 Mask:255.255.255.0
inet6 addr: fe80::a8a4:86ff:fe61:544a/64 Scope: Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:282 errors:0 dropped:0 overruns:0 frame:0
TX packets:311 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:38403 TX bytes:24538
x86_64:/ $ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.250.1 0.0.0.0 UG 0 0 0 eth0
192.168.250.0 * 255.255.255.0 U 0 0 0 eth0
x86_64:/ $ ping -c1 8.8.8.8
ping: icmp open socket: Operation not permitted
2|x86_64:/ $ su
x86_64:/ # ping -c1 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=122 time=25.7 ms
…--- 8.8.8.8 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 25.785/25.785/25.785/0.000 ms
Very strange. But what I have also noticed now is that there is an anbox deb package in 18.10 cosmic repos. Which is the following version:
anbox/cosmic 0.0~git20180915-1 amd64
Android in a box
anbox-modules-dkms/now 13 all [installed,local]
Android kernel driver (binder, ashmem) in DKMS format.
vs my snap package, which is the version:
anbox 4-e1ecd04 158 beta morphis devmode
Maybe I will try nuking the snap package, and reinstalling anbox main package as a .deb, via apt? Will that help?
—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.
|
Using the anbox-bridge script and following this https://www.rudraraj.net/internet-connection-sharing-ics-on-centos-7/ solved for me. |
This Works fine for me. Kudos. |
How do I detect the effect of this change? When I run Plus the default DNS 8.8.8.8 doesn't work for a long time. Is there a way to change it to use systemd.resolved? |
Simple solution that worked for me...just run |
Greetings I congratulate you for making this tool. But I would like to use it well from my Ubuntu 18.04 that I will soon put a 20.04 or some Mint. Of course, the official solution to connect to the Internet could not be downloaded to a wiki or FAQ, to be able to use Google Play or some other app that requires the Internet? PS: In all repositories, the response to an issue is waited a long time and when it stops asking; they respond with: since there is no activity the issue is closed! |
anbox in ubuntu 18.04 lts not works anbox-bridge.sh and every adb frozes my pc, so I can't connect in anbox |
Anbox on Arch Linux doesn't work with networking. ADB says it cannot connect. |
I looked at the container service status and found it isn't able to create
|
I had this issue while running Mint 18.3 and Anbox version: 4, snap-revision: 186. It happened whenever I killed Anbox say from System Monitor or after restarting Cinnamon while Anbox was running. (An aside: Cinnamon tends to not resume from Suspend.) After digging around the web and trying all the above to no end and even after an uninstall and reinstall I finally came across a command that resolved it for me: |
I'm investigating Anbox issues on Mobian (Debian Bullseye derivative) and got hit with this issue as well. The workaround from @ephemient ( from this comment ) works but it still needs to be applied manually. Looking at init.goldfish.rc and init.goldfish.sh the default configuration seems to assume a |
@Djhg2000 : I had a look at the two files you mention above the other day, and tried changing the values to the correct ones. Unfortunately, that didn't help. (though setting them to random values does break the network, so they seem to be doing something). Note that postmarketOS suffers from the issue as well. https://gitlab.com/postmarketOS/pmaports/-/issues/480 |
In case it helps, an alternative way to have Internet access in Anbox is to use a proxy like Squid (or mitmproxy if you want to sniff network traffic) on your computer connected to Internet. Then in the Anbox container, you can use the proxy with a command like |
@Djhg2000 No, there's no need to change IPs or adding routes, proxies or whatever. The issue happens when the kernel you use is built without support for network handling features that Android is using. With a properly configured kernel it works fine out of the box. |
Do you have some info on the kernel option necessary?
People reported it works for them once they removed the
`ipv6.disable=true` kernel parameter. I'm suspecting it only works with
ipv6 support, and that the ipv4 setup is really broken.
…On Mi, Nov 11, 2020 at 13:20, Sebastian Krzyszkowiak ***@***.***> wrote:
@Djhg2000 No, there's no need to change IPs or adding proxies or
whatever. The issue happens when the kernel you use is built without
support for network handling features that Android is using. With a
properly configured kernel it works fine out of the box.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I don't remember which one it was exactly (it was while ago that I debugged it), but l found it by looking at why netd was failing to set up the route (my browser search history suggests that it was failing at |
On Debian, downloading the Anbox package and following Arch Wiki (Network section), everything went fine. I bet that Debian Team have made some magic to make it work. =) |
My guess is that the Debian kernel isn't missing some kernel options. I had to enable them explicitly in pmOS to fix the same issue on the pinephone.
Le 25 janvier 2021 13:03:02 GMT+01:00, renanwp2 <notifications@github.com> a écrit :
…On Debian, downloading the Anbox package and following Arch Wiki,
everything went fine. I bet that Debian Team have made some magic to
make it work. =)
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#443 (comment)
|
Network and changes to the route param like 'ip route add default dev eth0 via 192.168.250.1' |
run this command then start the ./anbox-bridge.sh script |
This works for me, but I need to do the first "ip rule" command before the "ip route" one, otherwise I get:
Also, for some reason I don't need the "local" rule at all. Running on Linux from Scratch. |
Thanks, this worked Another note: |
|
anbox system-info:
I use the openSUSE TumbleWeed + GNOME + 4.12.8 kernel, the installation of anbox after the application can start normally, but the anbox container can not connect to the network.
ifconfig:
adb shell ifconfig:
sudo brcli show:
sudo systemctl status anbox-container-manager.service :
sudo systemctl status anbox-bridge.service :
The text was updated successfully, but these errors were encountered: