【问题标题】:get MAC address in android 6 [duplicate]在android 6中获取MAC地址[重复]
【发布时间】:2016-05-08 19:53:04
【问题描述】:

我推荐了https://developer.android.com/about/versions/marshmallow/android-6.0-changes.html#behavior-hardware-idGetting MAC address in Android 6.0。 在 android 6 中似乎无法获取 MAC 地址。

如果没有WifiInfo.getMacAddress()BluetoothAdapter.getAddress(),我们是否可以通过其他方式以编程方式获取本地设备的 MAC 地址。

【问题讨论】:

    标签: android-wifi android-6.0-marshmallow android-bluetooth


    【解决方案1】:

    只需阅读文件/sys/class/net/wlan0/address。 MAC 地址将采用通常的冒号分隔形式。适用于运行 Android 6.0.1 的无根 Nexus 6P。

    【讨论】:

    • 在非root的小米红米4 Pro上无法使用
    猜你喜欢
    • 2016-01-14
    • 1970-01-01
    • 1970-01-01
    • 2012-11-16
    • 2015-01-23
    • 2010-11-09
    • 2012-08-25
    • 2011-10-09
    • 2014-07-24
    相关资源
    最近更新 更多