I need to get WiFi mac address of my android TV box.
I have tried to read /sys/class/net/wlan0/address file. The problem is when device is connected to ethernet(via lan cable) /sys/class/net/wlan0/address file and even /sys/class/net/wlan0/ directory doesn't exists and it's appears only when device is connecting to wifi network. But for example ethernet mac address is always defined and available at /sys/class/net/eth0/address.
Also I have tried to do like it says hear, with java system application. In this case I got same results. My ethernet mac address is always available, but wifi mac appears when I connect to wifi network.
Is it possible to get wifi mac address when device is not connected to wifi ?
Android version: 5.1.1