Identify WiFi Mac, Product Model, Serial Number using ADB

If you are looking for the device information of your Android device such as, product model, manufacturer, serial number or WiFi mac address etc, we will show how this can be obtained using following adb shell commands

First connect your android device/mobile over USB/Ethernet and check if that device is connected as

$ sudo adb devices
List of devices attached
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
B2NGAA8831702707 device

Check the Mac Address of the WiFi

$ adb shell cat /sys/class/net/wlan0/address
6c:c4:d5:6f:84:dc 

Check Android Device Model using adb shell

$ adb shell getprop ro.product.model
Nokia 7 plus 

Check Android Device Manufacturer using adb shell

$ adb shell getprop ro.product.manufacturer
HMD Global 

Check Android Device Serial Number using adb shell

$ adb shell getprop ro.serialno
B2NGAA8831702707

Example shell script to extract device mac address using adb,

get_device_mac() {
    echo -n "getting device mac is ....."
    $ADB_PATH shell cat /sys/class/net/wlan0/address
    DEV_MAC=`$ADB_PATH shell cat /sys/class/net/wlan0/address`
    DEV_MAC=$(echo $DEV_MAC|tr -d '\n'|tr -d '\r') #cleaup \r \n output from adb
    echo "$DEV_MAC"
}

If you are looking for getting this information programatically, refer to “Identify Android API version, Device, Build Information programmatically

1 thought on “Identify WiFi Mac, Product Model, Serial Number using ADB”

Leave a Comment