为获取IP地址的分配由运营商ADB命令 [英] adb command for getting ip address assigned by operator

查看:414
本文介绍了为获取IP地址的分配由运营商ADB命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要获取一个成功的3G或LTE数据呼叫分配后,由操作员输入IP地址。

I need to fetch the IPaddress assigned by the operator after a successful 3G or LTE data call.

$adb shell netcfg >> doesnt have the assigned IP address.

我试过亚行外壳dumpsys 和grep的IP地址,但不成功。任何帮助/指针?

I tried adb shell dumpsys and grep ip address, but in vain. Any help/pointers?

推荐答案

试一下这个命令,它会帮助你获得ip地址

Try this command, it will help you to get ipaddress

$ adb shell ifconfig tiwlan0

tiwlan0是设备上的Wi-Fi网络接口的名称。这是通用的命令获取ip地址,

tiwlan0 is the name of the wi-fi network interface on the device. This is generic command for getting ipaddress,

 "adb shell netcfg"

它会喜欢这个输出

It will output like this

usb0     DOWN  0.0.0.0         0.0.0.0         0×00001002
sit0     DOWN  0.0.0.0         0.0.0.0         0×00000080
ip6tnl0  DOWN  0.0.0.0         0.0.0.0         0×00000080
gannet0  DOWN  0.0.0.0         0.0.0.0         0×00001082
rmnet0   UP    112.79.87.220   255.0.0.0       0x000000c1
rmnet1   DOWN  0.0.0.0         0.0.0.0         0×00000080
rmnet2   DOWN  0.0.0.0         0.0.0.0         0×00000080

这篇关于为获取IP地址的分配由运营商ADB命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆