1 程序中代码获取mac地址:
WifiManager wm = (WifiManager)getSystemService(Context.WIFI_SERVICE);
String mac = wm.getConnectionInfo().getMacAddress();
2 adb 命令查看mac地址:
adb shell cat /sys/class/net/wlan0/address
1 程序中代码获取mac地址:
WifiManager wm = (WifiManager)getSystemService(Context.WIFI_SERVICE);
String mac = wm.getConnectionInfo().getMacAddress();
2 adb 命令查看mac地址:
adb shell cat /sys/class/net/wlan0/address