Can I find the MAC address of my Access point in Android?

The following method will return the MAC address of the access point, null if there is no network currently connected.

public String getMacId() {

    WifiManager wifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
    WifiInfo wifiInfo = wifiManager.getConnectionInfo();
    return wifiInfo.getBSSID();
}

I'm fairly sure that getMacAddress(), is, as you suspected for the Local Device.

If you can get the IP of the router/gateway/accesspoint, then you might be able to use the code in this post: https://web.archive.org/web/20160308014312/http://www.flattermann.net/2011/02/android-howto-find-the-hardware-mac-address-of-a-remote-host/ to do your bidding. Good luck!


getBSSID() of WifiInfo class will return MAC address of remote access point.

BSSID explained here.


Check out the application "Network Info II" from the Android Market. It does show the MAC address, but I'm not sure if this is still the phone's MAC. It also shows the BSSID, which has the same format as a MAC address so perhaps is what you're looking for.