Please help me to retrieve the Bluetooth MAC Address of my Galaxy S3 phone connected via USB port. My device is rooted.
While iOS devices advertise Bluetooth continuity messages it's not possible to track iOS devices using their Bluetooth MAC address because the address changes over time in order to defeat such tracking. However, as previously mentioned, Bluetooth MAC randomisation can be defeated.
They are so specific that they cannot be changed. MAC addresses can be used to identify devices on a network but they are not always visible to the general public.
Running netcfg
will show you all interfaces on the system along with their MAC addresses.
adb shell cat /sys/class/net/wlan0/address
What I usually do to get the mac address of the WiFi interface of an Android device (that is connected to my PC through a USB port) is following these easy steps:
adb devices
Results usually looks like:
List of devices attached 4e7354af device 1f97033e device
In this case we have two devices connected 4e7354af
and 1f97033e
. Let's work on the first one: 4e7354af
adb -s 4e7354af shell "ip addr show wlan0 | grep 'link/ether '| cut -d' ' -f6"
The result will be looks like:
8e:5a:e7:c2:01:9b
In previous line, we used the -s
option of the adb
command to specify the serial number. Then we call the shell
command to indicate that we will run a Linux command. Finally, we run the command: ip addr show wlan0 | grep 'link/ether '| cut -d' ' -f6
this command can also be used in Linux if its interface has the same name as wlan0
.
I generally use this approach because I have many devices connected to my testing environment. Good luck guys.
Note: If you run commands like cat /sys/class/net/wlan0/address
you will get an error like cat: /sys/class/net/wlan0/address: Permission denied
due to the security policies of Android.
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With