[Samsung Galaxy R i9103] Adam77Root:
Hello everybody!

I have managed to change the Wi-Fi MAC address of my device and now I share this technique with you. With this method, you can change your address permanently!

What is a MAC address?

A Media Access Control address (MAC address) is a unique identifier assigned to network interfaces for communications on the physical network segment. It may also be known as a burned-in address, an Ethernet hardware address (EHA), hardware address or physical address. (Source: Wikipedia)

Why would somebody change his/her MAC address?

- To access the internet where it is restricted to particular addresses.

- To hide his/her illegal activity. (Though this is not effective enough since the Android system sends product information and a lot of other things to the Google servers and I'm sure that previous IP addresses could be searched for if somebody does something really nasty.)

Is it legal to change the MAC address?

As far as I know, it is. However, I firmly discourage you on doing anything illegal with changed/unchanged MAC.

Let's do it!

What do you need?

- A rooted device.

- A kernel with MAC address changing support. (I include my ICS kernel (version 3.1.10) for those who want to try it out and the method of implementing it into other custom kernels.)

- A file manager that can explore the root filesystem.

How does this exactly work?

Normally, the Wi-Fi driver gets the MAC address from the built-in chip then it writes the address to '/efs/wifi/.mac.info' and '/data/.mac.info'. This is the original burned-in address. This cannot be changed with software modifications, but only by soldering off the chip from the motherboard and rewriting its contents. Our Wi-Fi device is a Broadcom BCM4330. It has very good built-in features and the open source driver can be found in our kernel sources.

There are two different options in the driver (READ_MACADDR and RDWR_MACADDR (actually, there is a WRITE_MACADDR option too, which stands for creating the two files I have mentioned before)), which enable us changing the address. I tested both and found READ_MACADDR better. By enabling it in the kernel, you get some options regarding MAC changing.

Before you change your MAC address in any way, turn off Wi-Fi! I recommend writing down your original address somewhere (just to be extra secured). You can always return to your original one using the second method (read further) or by flashing a kernel that doesn't have the patch.

- If you flash a patched kernel and delete the '/efs/wifi/.mac.info' file, the driver will generate (!!) a custom MAC address based on some predefined rules (The first 24 bits are common in all generated addresses.).

- Of course you can set your own custom MAC address. Do this by editing the '/efs/wifi/.mac.info' file with a file manager. If you change it to an incorrect address, the system will automatically use the original (burned-in) MAC.

For kernel developers who want to enable this:

Find '#define WRITE_MACADDR' after '#ifdef CONFIG_MACH_N1' in 'drivers/net/wireless/bcmdhd/src/dhd/sys/dhd_sec_feature.h' and insert '#define READ_MACADDR' after that line. This is for ICS kernels (version 3.1.10), but the patch must work on GB ones too. You just have to insert the define somewhere else (I didn't look into this.).

(I count on you guys in implementing this! :))

I attach my prebuilt (secure, MMC_ERASE_CAP disabled) kernel for trying out this feature. It is an ICS kernel (version 3.1.10).

Every custom modification to devices have risks. Use this at your own risk!

Have fun and enjoy! :)