简体   繁体   English

可以将android设备连接到以太网并从adb shell执行ping操作,但无法浏览互联网

[英]can connect android device to ethernet and ping from adb shell but unable to browse internet

I connected my android device(on a board) to internet through Ethernet cable but not able to browse anything on device. 我将我的android设备(在板上)通过以太网电缆连接到Internet,但无法浏览设备上的任何内容。 Using adb shell, Ping to 8.8.8.8 is working but to www.google.com or other url is failing. 使用adb shell,可以Ping到8.8.8.8,但无法访问www.google.com或其他网址。 Same through browser. 通过浏览器也一样。 Can you please let me know how to solve this issue. 您能否让我知道如何解决此问题。

Try this: For Lollipop: 试试这个:对于棒棒糖:

ndc resolver setnetdns eth0 "" 8.8.8.8 8.8.4.4

For Kitkat: 对于奇巧:

ndc resolver setifdns eth0 "" 8.8.8.8 8.8.4.4
ndc resolver setdefaultif eth0

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM