Android ethernet configure IP using dhcp [closed]

强颜欢笑 提交于 2019-12-04 15:25:45

Android's got ifconfig, just like Linux. Unfortunately that just changes the interface configuration and doesn't, e.g., tell applications that the interface has come up, so they may not be aware that there's any internet access, so it may not help much. I'm afraid I can't help there.

For reference, you use ifconfig like this:

ifconfig <interface> up <ip address> mask <netmask> gw <gateway>

<interface> will probably be eth0, and the other fields are the appropriate IP addresses. You can see what interfaces are available by catting /proc/net/dev.

To be honest, you shouldn't need to do this --- Android (or at least modern Android, you didn't say which version you're using) has proper support for ethernet configuration via Settings -> Wireless and Networks. Is there any reason why this isn't working for you?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!