AndroidIdChanger icon indicating copy to clipboard operation
AndroidIdChanger copied to clipboard

Core: Spoof MAC address

Open lars18th opened this issue 8 years ago • 5 comments

Hi,

In order to change the MAC address of Wireless, Wired, Bluetoooth networks, two options are available:

  1. Physical change of the MAC. This will change the effective Ethernet address, and the network will use this address. This implies to modify the value in the Kernel. I think this can't be done using Xposed.

  2. Change the value readed by Apps & SystemUI. This will not change the network address, but the App will think that the value is different.

To achieve the option 2 some examples (for wifi already in the code):

XposedHelpers.findAndHookMethod("android.net.wifi.WifiInfo", loadPackageParam.classLoader, "getMacAddress", ...
XposedHelpers.findAndHookMethod("android.bluetooth.BluetoothAdapter", loadPackageParam.classLoader, "getAddress", ...

I'll search for wired connections.

lars18th avatar Oct 18 '17 12:10 lars18th

Hi,

For Wired Ethernet I feel no Network Manager exists.

Futhermore from Android M the MAC address returns "02:00:00:00:00:00" if you don't have claimed the permission ACCESS_WIFI_STATE.

So, for read the "original" values of MAC addresses I suggest to add <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/> in the Manifest of the App.

lars18th avatar Oct 18 '17 12:10 lars18th

This implies to modify the value in the Kernel. I think this can't be done using Xposed.

can i change it by NDK(using c++)?

bigsinger avatar Oct 18 '17 14:10 bigsinger

Futhermore from Android M the MAC address returns "02:00:00:00:00:00"

on my N9 device(Android N), i got "02:00:00:00:00:00"

i'll try to add <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>

bigsinger avatar Oct 18 '17 15:10 bigsinger

on my N9 device(Android N), i got "02:00:00:00:00:00"

Me too! Add the permission and you will show the correct value.

This implies to modify the value in the Kernel. I think this can't be done using Xposed.

can i change it by NDK(using c++)?

May be! However, I suggest to try this after the support for Nougat is ready.

lars18th avatar Oct 18 '17 15:10 lars18th

I suggest to try this after the support for Nougat is ready.

OK

bigsinger avatar Oct 18 '17 15:10 bigsinger