code: public static String getMacAddr(Context context) {
          String mac = "";
          try {
              WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
              WifiInfo wifi = wifiManager.getConnectionInfo();
              mac = wifi.getMacAddress();
          } catch (Exception e) {
              mac = null;
              Log.e(TAG, "", e);
          }
  
          if (StringUtils.isNullOrEmpty(mac))
              mac = getLocalMacAddressFromBusybox();
  
          if (StringUtils.isNullOrEmpty(mac))
              mac = MAC_EMPTY;
  
          return mac;
      }
docs: get mac address.
  
  @param context
  @return if error, will return {@link #MAC_EMPTY}