获取Android设备的MAC地址不带WiFi [英] Get MAC Address of android device without Wifi

查看:134
本文介绍了获取Android设备的MAC地址不带WiFi的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何获取MAC地址的Andr​​oid设备的网络接口不具有一个无线接口(如Android模拟器)? WifiInfo通过WifiManager获得回报的的。

How do I get the MAC-Address of the network interface of an android device which doesn't have a Wifi-Interface (e.g. the android emulator)? WifiInfo obtained via the WifiManager returns null.

修改

要更清楚:我有一个本地网,我要在注册阶段发送有效载荷内的通信接口的MAC地址在现有的网络协议(不是我设计的)进行通信。

To be more clear: I have to communicate with an existing network protocol (not designed by me) on the local network where I have to send the mac address of the communicating interface within the payload during a registration phase.

推荐答案

读/ SYS /班/ NET / [东西] /地址为文本文件

Read /sys/class/net/[something]/address as a text file

但它不太可能在你的思考方式是有用的。

But it's unlikely to be useful in the way you think.

这篇关于获取Android设备的MAC地址不带WiFi的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆