mardi 24 novembre 2020

Adb shell on Android 10 : How to view IP address ?

If you have error "ifconfig: ioctl 8927: Permission denied" when trying to use "ifconfig" then you can use the following command :

ip -f inet addr show


Sample output :

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1

    inet 127.0.0.1/8 scope host lo

       valid_lft forever preferred_lft forever

11: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 3000

    inet 192.168.1.24/24 brd 192.168.1.255 scope global wlan0

       valid_lft forever preferred_lft forever