Sunday, June 5, 2011

To get Network Interface list in Android

The ifconfig command on android requires you specify an interface name
explicitly. Without argument, it doesn't show all interfaces.
To find out all interfaces on the device, you can use
#adb shell ls /sys/class/net
command.

6 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. how to set ipaddress for an interface?

    ReplyDelete
  3. Satya, you can use following commands:
    $adb shell
    $abb ip addr show

    ip addr show list all the interfaces with ip addresses

    ReplyDelete
  4. The post is written in very a good manner and it contains many useful information for me. bookmetoday.com

    ReplyDelete