• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Changing(spoofing) MAC address

Saw this thread and tweaked around a bit on my LG L9 and was able to write a 3 line script that works... easily. Run the script and it'll toggle OFF you wifi, change your mac then toggle back on. Toggle wifi off then on to revert to original one. Easy, work and you DON'T have to worry about changing file or permissions. Just execute VIA rom toolbox or script manager. NEED ROOT AND BUSYBOX INSTALLED. Should be a given


anyways, here it is (assuming your device uses wlan0. If not try eth0)
You need a usb chord
a rooted phone
and terminal emulator
I posted this tutorial over at rohitab under Leisure Suit Larry
But it never seem to have posted and the more the merrier
After your rooted head into terminal emulation type su and go into /data/misc/wifi
Look for a file called nvram.txt
Copy it to your sdcard and then to your cpu desktop
open it with notepad and at the
bottom of nvram.txt is the mac address
This i was able to verify and test on android Citrus Ciena
Edit that mac address and save it as nvram1.txt onto sdcard
Now go back to data wifi misc and copy nvram.txt to nvram.bak
Head into gui and then settings then wifi then turn on the wifi but don't connect to any wifi
turn off the wifi,switch back to terminal
Copy the nvram1.txt to data misc wifi
remove the original (make sure you got it backed up)
Rename nvram1.txt to nvram.txt
head back into gui and then settings then wifi
Now for me it immediately stated unable to turn on wifi
Ignore it and try to turn it on anyways
When it turns on your newly edited mac address will take effect
Connect to your AP
NOW B4 REBOOTING YOU MUST CHANGE NVRAM BACK TO THE ORIGINAL!

did this and verified a fake mac address with tcpdump-arm
Busybox ip link show eth0
And a router with wpa2 table reflected the new fake mac


#!/system/bin
busybox ifconfig wlan0 down
busybox ifconfig wlan0 hw ether [MAC]
busybox ifconfig wlan0 up
#end


I also noticed on my network I get duplicate IP's with the spoofed mac... not sure why but will look into it.


*EDIT*
"busybox ifconfig wlan0 up" not needed as it automatically enabled WiFi after MAC change.

You need a usb chord
a rooted phone
and terminal emulator
I posted this tutorial over at rohitab under Leisure Suit Larry
But it never seem to have posted and the more the merrier
After your rooted head into terminal emulation type su and go into /data/misc/wifi
Look for a file called nvram.txt
Copy it to your sdcard and then to your cpu desktop
open it with notepad and at the
bottom of nvram.txt is the mac address
This i was able to verify and test on android Citrus Ciena
Edit that mac address and save it as nvram1.txt onto sdcard
Now go back to data wifi misc and copy nvram.txt to nvram.bak
Head into gui and then settings then wifi then turn on the wifi but don't connect to any wifi
turn off the wifi,switch back to terminal
Copy the nvram1.txt to data misc wifi
remove the original (make sure you got it backed up)
Rename nvram1.txt to nvram.txt
head back into gui and then settings then wifi
Now for me it immediately stated unable to turn on wifi
Ignore it and try to turn it on anyways
When it turns on your newly edited mac address will take effect
Connect to your AP
NOW B4 REBOOTING YOU MUST CHANGE NVRAM BACK TO THE ORIGINAL!

did this and verified a fake mac address with tcpdump-arm
Busybox ip link show eth0
And a router with wpa2 table reflected the new fake mac
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones