This question already has an answer here:
Please help me to retrieve the Bluetooth MAC Address of my Galaxy S3 phone connected via USB port. My device is rooted.
This question already has an answer here:
Please help me to retrieve the Bluetooth MAC Address of my Galaxy S3 phone connected via USB port. My device is rooted.
adb shell cat /sys/class/net/wlan0/address
Running
netcfg
will show you all interfaces on the system along with their MAC addresses.Isn't bluetooth MAC address available on every Android phone in Settings?
Currently I have 2 devices near:
On Samsung Galaxy S2 - Settings > About Phone > Status
On HTC Desire - Settings > About Phone > Hardware Information
(Bluetooth must be turned on)
I usually get the mac address of the WiFi interface of an Android device (that is connected to my PC through a USB port) by running these commands:
Find the device name using:
Results usually looks like:
In this case we have two devices connected
4e7354af
and1f97033e
. Let's work on the first one:4e7354af
Get the mac address for the first device:
In previous line, we used the
-s
option with theadb
commands to specify the serial number. Thenshell
indicate that is a linux command followed by theip addr show wlan0 | grep 'link/ether '| cut -d' ' -f6
this command can also be used in Linux if its interface has the same name aswlan0
.I generally use this approach because I have many devices connected to my testing environment. Good luck guys.