设置android板子ip
来源:互联网 发布:淘宝csv数据包制作 编辑:程序博客网 时间:2024/06/05 07:54
通过shell命令设置(获取)IP、网关、dns信息,需要获取root权限
查看所有网络信息
C:\>adb shellroot@android:/ # netcfgnetcfgip6tnl0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00gre0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00eth0 UP 192.168.0.180/24 0x00001043 00:00:00:ec:0a:00sit0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00lo UP 127.0.0.1/8 0x00000049 00:00:00:00:00:00tunl0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
查看eth0
root@android:/ # ifconfig eth0ifconfig eth0eth0: ip 192.168.0.180 mask 255.255.255.0 flags [up broadcast running multicast]
查看dns
root@android:/ # getprop net.eth0.dns1getprop net.eth0.dns18.8.8.8root@android:/ # getprop net.eth0.dns2getprop net.eth0.dns28.8.4.4
设置ip
root@android:/ # ifconfig eth0 192.168.0.173 netmask 255.255.255.0ifconfig eth0 192.168.0.173 netmask 255.255.255.0root@android:/ # ifconfig eth0ifconfig eth0eth0: ip 192.168.0.173 mask 255.255.255.0 flags [up broadcast running multicast]
设置网关Gateway
root@android:/ # route add default gw 192.168.0.1 dev eth0route add default gw 192.168.0.1 dev eth0
添加dns
root@android:/ # setprop net.eth0.dns1 8.8.8.8setprop net.eth0.dns1 8.8.8.8root@android:/ # setprop net.eth0.dns2 8.8.4.4setprop net.eth0.dns2 8.8.4.4
查看eth配置信息
root@android:/ # getprop | grep eth0getprop | grep eth0[dhcp.eth0.dns1]: [192.168.0.1][dhcp.eth0.dns2]: [][dhcp.eth0.dns3]: [][dhcp.eth0.dns4]: [][dhcp.eth0.gateway]: [192.168.0.1][dhcp.eth0.ipaddress]: [192.168.0.180][dhcp.eth0.leasetime]: [3600][dhcp.eth0.mask]: [255.255.255.0][dhcp.eth0.pid]: [13800][dhcp.eth0.reason]: [PREINIT][dhcp.eth0.result]: [failed][dhcp.eth0.server]: [192.168.0.1][dhcp.eth0.vendorInfo]: [][net.change]: [net.eth0.dns2][net.eth0.dns1]: [8.8.8.8][net.eth0.dns2]: [8.8.4.4]
阅读全文
0 0
- 设置android板子ip
- 嵌入式 在板子上设置ip、dns、mask
- 修改板子的IP
- 修改tiny6410板子IP
- AD设置板子原点
- 添加板子ip的方法
- Android Wifi IP 设置
- android之ip设置
- android设置以太网ip
- Android静态IP设置
- android 安卓 IP设置
- android系统启动时IP设置
- ipnc rdk 385板子修改ip地址
- Android模拟器代理设置、ip设置
- 板子
- 板子
- 设置板子上linux系统开机执行
- android 两个模拟器通信IP的设置
- Android获取设备文件目录下权限
- 30天自制操作系统------命令行
- 去掉vue 中的代码规范检测(Eslint验证)
- Applying plugin configuration to rabbit@XXXX... failed.
- WebApp 移动web资源整理
- 设置android板子ip
- Unity3d日记--第一天
- tableExport.js对table进行导出excel
- android随机整屏幕鲜花掉落
- sklearn 0.17 版本 方法过时问题
- bzoj 3688: 折线统计 (DP+树状数组)
- 162. Find Peak Element
- 创建线程并让它开始执行的实例
- 4. Median of Two Sorted Arrays-python