Notes on Changing an Android MAC address
I started investigating how to change MAC addresses on Android devices because things like in-store tracking and massive distributed tracking of mobile devices, and by extension their owners, is probably only going to become more common and more robust.
While this does not address the issue of spewing SSIDs all over the place that might identify a device, it is a step in the direction of more control over unique information devices vomit out into the public space.
So far I have found that I can change the MAC address with commands like ip link set address ... but have run into issues connecting to WPA2 secured access points after performing this command. From a number of packet captures my best guess is Android is still using the burned-in MAC address to calculate a few values for the WPA2 handshake, but sending the actual packets from the spoofed MAC address. This freaks out the access point, as it should, and triggers a deauthentication packet. This is further supported by the fact that I can get the device to connect to an open network after spoofing the MAC. I have not done any testing with WEP.
Other notes; the MAC address never appears to change in the WiFi > Advanced screen. Turning WiFi off and on again resets the MAC address back to the burned in MAC. Running ifconfig down;ifconfig up; appears to have the same affect. All testing was done on a Nexus S 4G.
I've rolled this into MacSpin; a very simple Android application that I hope to get to a point of working with WPA2 networks. As you might expect this requires a rooted Android device.

















