Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to change the MAC address on a device running Android. It has been rooted and a command line installed ("ConnectBot"); I was looking around Google for methods of changing the MAC address on it and I found something called ip and ip link. Initially I thought I would use ifconfig but I haven't found the name of the network interface to change.

How would this be done on an Android device?

share|improve this question

migrated from May 24 '11 at 2:44

This question came from our site for system and network administrators.

As superuser run:

# netcfg

A list with the interfaces will appear. For example my interface was eth0

# ifconfig eth0 down
# ifconfig eth0 hw ether your:new:mac
# ifconfig eth0 up

Note that not all drivers support this operation, and the Android ifconfig do not support these commands. You will need another ifconfig executable, perhaps that from busybox will be suitable.

After the reboot these changes are lost.

share|improve this answer
How can this command be executed on each reboot, or does this change stick? My galaxy nexus randomly changes the mac id on every reboot due to an error in the kernel. (Google is aware but seems to be in no hurry to fix it. It makes mac id authentication impossible.) – user14633 Apr 27 '12 at 22:18
@user14633: funny. that's the behavior I'm looking to implement, in order to avoid being identified by my MAC wherever I go. – mc0e Dec 8 '13 at 4:20

ifconfig -a to list interfaces.

ifconfig wlan0 hw ether ff:ff:ff:ff:ff:ff to set the MAC address, replacing wlan0 with the interface you want to use, and the MAC address with the one you want to spoof. Not all drivers support changing the MAC address though, so this may not work.

share|improve this answer
ifconfig -a returns the error "-a: no such device" on my rooted Desire. – Robert Jun 24 '11 at 14:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.