要获取Android手机的IP地址,必须先保证你的Android手机已经连接到无线网络(此处的无线网络包括WiFi和WAPI,不包括3G或2G的移动网络)。
先执行命令
adb shell netcfg
再执行命令
adb shell ifconfig rm net0
修改网关
ifconfig eth0 gateway 192.168.0.1
开启
ifupeth0
关闭
ifdown eth0
本文介绍了如何通过ADB命令获取已连接无线网络的Android设备的IP地址,并提供了设置网关及开启、关闭网络接口的方法。
要获取Android手机的IP地址,必须先保证你的Android手机已经连接到无线网络(此处的无线网络包括WiFi和WAPI,不包括3G或2G的移动网络)。
先执行命令
adb shell netcfg
再执行命令
adb shell ifconfig rm net0
修改网关
ifconfig eth0 gateway 192.168.0.1
开启
ifupeth0
关闭
ifdown eth0
3786
2837
861
8609
8695

被折叠的 条评论
为什么被折叠?