Development issue/problem:
I need to retrieve the IP address assigned by the operator after a successful 3G or LTE data call.
The $adb netcfg >> shell has no IP address assigned.
I tried resetting the adb shells and warming up the IP address, but to no avail. Help / Indicators ?
How can I solve this problem?
Solution 1:
Try this command, it will help you find the IP address.
Display the ifconfig tiwlan0 shell
tiwlan0 is the name of the device’s Wi-Fi network interface. This is a common command to get the IP address,
beehives
It is produced as follows
usb0 DOWN 0.0.0 0.0 0.0 0×00001002sit0 DOWN 0.0.0 0.0 0.000080ip6tnl0 DOWN 0.0.0 0.0 0.0 0.0 0×00000080gannet0 DOWN 0.0.0 0.0 0.0 0.0 0x000080gannet0 DOWN 0.
Solution 2:
Try it:
Adb shell ip addr show rmnet0
He’s going to take something like this:
3: rmnet0: mtu 1500 qdisc htb state UNKNOWN qlen 1000
link/[530]
inet 172.22.1.100/29 area global rmnet0
inet6 fc01:abab:cdcd:efe0:8099:af3f:2af2:8bc/64 area global dynamic
valid_lft forever preferred_lft forever
inet6 fe80::8099:af3f:2af2:8bc/64 area link
valid_lft forever preferred_lft forever
This part is your IPV4 assigned by the operator.
within a period of 172.22.1.100
This part is your IPV6 assigned by the network operator.
inet6 fc01:abab:cdcd:efe0:8099:af3f:2af2:8bc
Solution 3:
According to the comments: netcfg has been removed in Android 6.
Try
beehives
Or
Show Shell
[email protected]:/ $netcfg
Solution 4:
Try this command for the <= Marshmallow version,
Means of advertising
Attached device list
38ccdc87 Device
Doping control 5555
Restart in TCP port mode : 5555
Adb shell ip addr show wlan0
24: wlan0: mtu 1500 qdisc mq state UP qlen 1000
link/air ac:c1:ee:6b:22:f1 brd ff:ff
inet 192.168.0.18/24 brd 192.168.0.255 scope global wlan0
valid_lft forever preferred_lft forever
inet6 fd01::1d45:6b7a:a3b:5f4d/64 scope global temporary dynamic
valid_lft 287sec preferred_lft 287sec
inet6 fd01 ::aec1:eeff:fe6b:22f1/64 scope global dynamic
valid_lft 287sec preferred_lft 287sec
inet6 fe80::aec1:eeff:fe6b:22f1/64 scope link
valid_lft forever preferred_lft forever
To establish a connection with the device, proceed as follows
adb connection 192.168.0.18
connected to 192.168.0.18:5555
Make sure you place adb in this android platform toolset
Solution no. 5:
This way you can determine the IP address of the device:
adb shell ip route > addrs.txt
#case 1:Nexus 7
#192.168.88.0/23 dev wlan0 proto kernel scope link src 192.168.89.48
#Business 2: Smartsian T1,Huawei C8813
#default via 192.168.88.1 dev eth0 metric 30
#8.8.8 via 192.168.88.1 dev eth0 metric 30
#114.114.114.114 via 192.168.88.1 dev eth0 metric 30
#192.168.88.0/23 dev eth0 kernel link src 192.168.89.152 metric 30
#192.168.88.1 dev eth0 kernel link 30
ip_addrs=$(awk {‘if( NF >=9){print $9;}’}’addrs.txt’)
echo device ip address $ip_addrs
Solution no. 6:
Try it:
Adb shell ip addr show rmnet0 | grep ‘inet’ | cut -d ‘ -f6|cut -d/ -f1
It returns the LPI4 assigned by the operator.
172.22.1.215
Solution no. 7:
Adb shell ip addr > ippdetails.txt
Lists all IPs assigned to the devices.
Solution no. 8:
You can also try this:
Step 1: shell adb
Step 2: ip -f inet addr show wlan0
Solution no. 9:
Download this application from here, it will help you to understand all the commands. I ran netcfg and it displays the result as attached to the screen.
Solution no. 10:
ip route | grep rmnet_data0 | cut -d -f1 | cut -d/ -f1
Change rmnet_data0 to the desired nickname, in my case rmnet_data0 is the data nickname.
For a list of available nicknames, please use ip-route.
Good luck!
Related Tags:
adb shell ifconfig permission denied, adb shell netcfg not found, android check device ip adb, adb connect ip, android dhcp 9, v4-rmnet_data0, minishift bridge network, minishift public ip, how to access minishift console, minishift iso, minishift hyper-v, minishift docker, http external ip 8080, [external-ip]:8080, openshift 3.11 nodeport, external ip openshift, openshift exposing a service, openshift 3.11 external ip, android localhost ip address, find public ip of android phone, android local ip address, how to find default gateway on android phone, how do i find the ip address of my iphone, what is my external ip address, external ip address range, how to find the dns server, static ip primary dns, how to check website from command prompt, cmd whats my ip, how to enable usb debugging using adb command, adb commands, adb command to connect to wifi, adb commands for mobile testing, adb ifconfig permission denied, how to get ip address and names of all devices in local network on android, adb connect to device