要获取Android手机的IP地址,必须先保证你的Android手机已经连接到无线网络(此处的无线网络包括WiFi和WAPI,不包括3G或2G的移动网络)。
先执行命令
adb shell netcfg
再执行命令
adb shell ifconfig rm net0
修改网关
ifconfig eth0 gateway 192.168.0.1
开启
ifup eth0
关闭
ifdown eth0
要获取Android手机的IP地址,必须先保证你的Android手机已经连接到无线网络(此处的无线网络包括WiFi和WAPI,不包括3G或2G的移动网络)。
先执行命令
adb shell netcfg
再执行命令
adb shell ifconfig rm net0
修改网关
ifconfig eth0 gateway 192.168.0.1
开启
ifup eth0
关闭
ifdown eth0