I'm currently searching the developer forums, as this might be an easy app to make quickly, if it can be done. (Also it would be a really awesome app in conjunction with a WiFi sniffer app.)
I am not sure how to acomplish this, but from prior knowledge the MAC address is semi-hard coded into the NIC (Network Interface Card, I know it's a chip these days but the acronym still stands). Part of the MAC address is the manafacturer ID which is normally hard coded, the remainder of the address is left to be incremented when the card is rolled out, so supposedly no two addresses are ever the same. As the ID can be flashed prior to rolling out the card, by nature it can be changed after the fact. To do this, you will have to have low level access to the hardware, which can only be done at the OS level.
The ifconfig method mentioned a few posts down will give you what you want, you could write a small script to do this or write a library which can be used by java.
Enjoy!
__________________
Thyme wounds all heals
Last edited by Ageless Stranger; February 8th, 2009 at 02:56 PM.
1 Changing the MAC address on a device is similar to altering the serial number on something.
This may or may not be illegal, that really depends on the device, and more importantly how its being used. Basically as soon as you change the MAC address and try and use a fake one you're falsifying information. Which on a low level means you're probably breaking the user agreements or terms of service. (i.e. changing the MAC address on a cable modem means your device is trying to connect under a different user account as some cable companies (comcast) uses the MAC address as the only thing tied to your account).
2. Truly changing a MAC address is not an easy task. Sure in Linux and OS X you can tell the system to use a different address, the physically coded address' in the hardware is still the same, and if THEY are asked to authenticate they will provided their unique id number. (changing a MAC address at the system level is something network engineers will do to manage network/user security)
Can they be changed, yes, with either software or with a diagnostic tool.
Should they be changed, not really. They are meant to be unique, and if they're being used to identify you as an account holder you're breaking TOS.
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
Last edited by JMC31337; February 17th, 2011 at 03:33 PM.
Maybe someone here with some Android Bourne Shell scripting know how can help me
I have this script which will change MAC address on the fly but i cant seem to check if file exist when using if then else statements
here is a simple check if exist script call but it wont echo what i want
===========
#!/bin/bash
if [ -e "/data/misc/wifi/nvram.bak" ];
then echo "!@#";
fi;
echo "1111"
==========
AND HERE IS MY MAC CHANGE SCRIPT WHICH WORKS
i just want to see if the bak file exist or not so i dont overwrite the bak with the fake
ran it like so:
copy the .sh script to sdcard
copy it to /data/local
while in the sdcard directory run it with
sh /data/local/test.sh OR you can sh test.sh with the file in sdcard (either way)
which works fine except the check exist conundrum
===========
#!/bin/bash
echo "Enter Fake MacAddress:"
read macx;
echo "# Motorola Ciena B2B Test nvram by BRCM JP, 2010.07.15
# $Copyright (C) 2008 Broadcom Corporation$
# $id$
on top of all that... if you do something like add a blank line at the end of a script file when piping output to create a file...
NOTE: OMIT THE <EOF> its there to show the board thats where it would end
it will create the file (test.txt) in this case and add a ? at the end of it.. forcing yu to use busybox ls to see the file with a ? and then rm to remove it so long yu add the? ... dont ask me how that exploit works but it does
#!/bin/bash
echo "123123" > /data/local/test.txt
CRLF (BLANK NEWLINE)
<EOF>
Well i do apologize and it seems to be fixed and im not going to try to cover up the mistake. Ill leave the post here for all to see
I do have a copy in my email proving this did occurr now lemme say this
no sooner did this happen from my cell bash did the verizon arbitrary unit call me up saying i am being sued. Talking about how he has deep pockets. Lol
i got the phone for free for signing up for a plan
Then canceled the plan after 2 days
The contract was signed by me but the rep didn't sign creating a legal binding contract
But this sucks that i cant reproduce this any longer
if yu would like to see my email copy of the entire terminal printout let me know
pm me...
sorry to let y'all down
Last edited by JMC31337; February 19th, 2011 at 08:56 PM.
Here is the terminal output
Im factory resetting and sdcard format reloading to stock with no updates to try and re-produce this problem
# ls -l
-rw-rw-rw- root root 1425 2011-02-18 15:28 testx.txt
drwxrwx--x shell shell 2011-02-17 19:05 tmp
# rm testx.txt
rm failed for testx.txt, No such file or directory
# ls testx.txt
testx.txt: No such file or directory
# ls -l
-rw-rw-rw- root root 1425 2011-02-18 15:28 testx.txt
drwxrwx--x shell shell 2011-02-17 19:05 tmp
# echo hhvhghhhhhfgchcjchhch> testx.txt
# ls
testx.txt
testx.txt
tmp
#rm testx.txt
# ls
testx.txt
tmp
# rm testx.txt
rm failed for testx.txt, No such file or directory
# ls
testx.txt
tmp
#
Last edited by JMC31337; February 20th, 2011 at 12:53 PM.
now plug in the USB CHORD and setup USB developement debug mode in the settings
place that testx.sh into /sdcard
UNPLUG THE USB CHORD
su
cp /sdcard/testx.sh /data/local
PLUG THE USB CHORD BACK IN
goto /data/local
sh testx.sh
and you will have a file testx.txt with a hidden ?
Last edited by JMC31337; February 20th, 2011 at 01:43 PM.
#!/bin/ash
#a pinginn was here
#save as mac-spoof.sh [chmod 777 mac-spoof.sh su > sh mac-spoof.sh ](From term)
echo "Backing Up Mac Address To SDcard!"
ifconfig wlan0| grep HWaddr >> /mnt/sdcard/mac.log
echo "!Org Mac Address!" >> /mnt/sdcard/mac.log
echo "Seting Random Address"
ip link set wlan0 address 00:12:f0:dd:cc:dc
#end
this will change your mac addy to "00:12:f0:dd:cc:dc" change as needed
i test it in the standerd sdk works with 2.1 it also backs up your org address
to the sdcard for safe keeping..
im runing a x10 with 2.3.5 on it an it is not allowing me to set the mac with the ip etc cmd so im going to keep working on a script for the xperia users. but for the rest that shoud work....
also android uses busybox to send all commands to the kernel and busybox uses ash and not bash
just a heads up anyway hope this helps sum ppl
EDIT::1
#!/bin/ash
#writing for Xperia X10 MiUi 1.9.9
#X10 Android 2.2/2.3 set /data/misc/wifi/mac_address to
#/data/misc/wi-fi/MAC*address
#a pinginn was here
#save as mac-spoof.sh [chmod 777 mac-spoof.sh su > sh mac-spoof.sh ](From term)
echo "Backing Up Mac Address To SDcard!"
ifconfig wlan0| grep HWaddr >> /mnt/sdcard/mac.log
echo "Org Mac Address" >> /mnt/sdcard/mac.log
echo "Seting Random Address"
rm /data/misc/wifi/mac_address
echo "00:12:f0:dd:cc:dc" >> /data/misc/wifi/mac_address
echo "Your Mac Address Is Spoffed To 00:12:f0:dd:cc:dc"
#END
EDIT::2
that is currintly work on my android 2.3.5 (MiUi 1.9.9) =D spoffing
EDIT::3
also im going to try and get a database of wireless mac addys so that it will pull an replace
the address with diff address everytime the script is execed so it can be added to corn =D
EDIT::4
after 24hur test changing networks worked fine however enabling GPS restored the org mac address. so im gessing the mac is assinged to the GPS and that must be the same to access the satellites.
anyway enjoy spoofing
Last edited by pinginn; October 12th, 2011 at 03:16 AM.
#!/bin/ash
#a pinginn was here
#save as mac-spoof.sh [chmod 777 mac-spoof.sh su > sh mac-spoof.sh ](From term)
echo "Backing Up Mac Address To SDcard!"
ifconfig wlan0| grep HWaddr >> /mnt/sdcard/mac.log
echo "!Org Mac Address!" >> /mnt/sdcard/mac.log
echo "Seting Random Address"
ip link set wlan0 address 00:12:f0:dd:cc:dc
#end
this will change your mac addy to "00:12:f0:dd:cc:dc" change as needed
i test it in the standerd sdk works with 2.1 it also backs up your org address
to the sdcard for safe keeping..
im runing a x10 with 2.3.5 on it an it is not allowing me to set the mac with the ip etc cmd so im going to keep working on a script for the xperia users. but for the rest that shoud work....
also android uses busybox to send all commands to the kernel and busybox uses ash and not bash
just a heads up anyway hope this helps sum ppl
EDIT::1
#!/bin/ash
#writing for Xperia X10 MiUi 1.9.9
#X10 Android 2.2/2.3 set /data/misc/wifi/mac_address to
#/data/misc/wi-fi/MAC*address
#a pinginn was here
#save as mac-spoof.sh [chmod 777 mac-spoof.sh su > sh mac-spoof.sh ](From term)
echo "Backing Up Mac Address To SDcard!"
ifconfig wlan0| grep HWaddr >> /mnt/sdcard/mac.log
echo "Org Mac Address" >> /mnt/sdcard/mac.log
echo "Seting Random Address"
rm /data/misc/wifi/mac_address
echo "00:12:f0:dd:cc:dc" >> /data/misc/wifi/mac_address
echo "Your Mac Address Is Spoffed To 00:12:f0:dd:cc:dc"
#END
EDIT::2
that is currintly work on my android 2.3.5 (MiUi 1.9.9) =D spoffing
EDIT::3
also im going to try and get a database of wireless mac addys so that it will pull an replace
the address with diff address everytime the script is execed so it can be added to corn =D
EDIT::4
after 24hur test changing networks worked fine however enabling GPS restored the org mac address. so im gessing the mac is assinged to the GPS and that must be the same to access the satellites.
anyway enjoy spoofing
I made that sh file and put it on my /sdcard/ folder. Then I used Better Terminal and sh the file and this is what I got:
Code:
Backing up Mac Address to SDCard!
wlan0: No such device
Setting Random Address
rm failed for /data/misc/wifi/mac_address, No such file or directory
Your Mac Address Is Spoffed To 00:12:f0:dd:cc:dc
It might be that your device uses eth0 as an ID instead of wlan0. That was the case for my phone. Run
Code:
busybox ifconfig
to check.
And if that's whats up, just change all instances of "wlan0" to "eth0". You can probably omit "rm /data/misc/wifi/mac_address" as well, since your phone is missing it.
It might be that your device uses eth0 as an ID instead of wlan0. That was the case for my phone. Run
Code:
busybox ifconfig
to check.
And if that's whats up, just change all instances of "wlan0" to "eth0". You can probably omit "rm /data/misc/wifi/mac_address" as well, since your phone is missing it.
Btw pinginn, have any luck implementing a db?
I changed it to eth0 already and also removed the rm /data/misc/wifi/mac_address but its not changing the ip. I use the command busybox ifconfig to see my MAC Address but the script didn't change it.
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
When I typed /data/misc/wifi on the terminal emulator there is a error message showing that permission denied. How to get permission for this?? Please reply to me..