[Q] Change mac address in Android - Android Software/Hacking General [Developers Only]

I am using htc Desire.
I have tried this command line
Code:
ip link set eth0 address XX:XX:XX:XX:XX:XX
to change the mac which only works temporarily. After I disconnect and reconnect to the network, the mac resets to factory one
Also I tried this to copy nvram.txt from /data/misc/wifi/nvram.txt and add macaddr=XX:XX:XX:XX:XX:XX in the end , but I don't have such file there is only wpa_supplicant.conf in the wifi directory.
How can I change the mac address on HTC Desire running Android? I have rooted phone with superuser permission.

Related

[SOLVED] Change wifi MAC Address

I have succesfully changed wifi mac address of my optimus.
We have to just insert a line "macaddr=XX:XX:XX:XX:XX:XX" in the nvram.txt
Here is how I did it:
You require:
1.)Rooted phone.
2.)anroid sdk
1.)First pull the nvram.txt file from /etc/wl to sdcard:
in cmd(windows) goto android-sdk-windows\tools and type
adb shell
2.)Copy nvram.txt from /etc/wl to sdcard
cp /etc/wl/nvram.txt /sdcard/nvram.txt
3.) Using text editor in phone add following line at the end:
macaddr=XX:XX:XX:XX:XX:XX (replace XX:XX:.... with desired mac addr.)
4.)Save file and copy it to /etc/wl from adb shell
cp /sdcard/nvram.txt /etc/wl/nvram.txt
5.)Reboot and it is done.
To restore orignal mac address just delete the macaddr line.
Note:
1.) Tested only in stock LG rome with GNM OC kernel. In other roms or kernel the location of nvram.txt may differ according to the parameter using which driver module (wireless.ko or bcm4325.ko) just find that file and use the above process. It will work.
2.) The file cannot be edited in windows as windows has different new line character than linux. It has to be edited in some linux compactible file editor like Programmers Notepad.
y wud u wanna change ur mac?
B'Coz I can access free Internet by doing this.....
Nice one
And to change hostname? Any ideas?
I changed it, and in phone it appears to be changed. But my router doesn't say the same... Has original hostname...
Yup thats worked with me thanks for sharing
Sent from my LG-P500 using XDA App
Yea bcoz android does'nt use hostname to connect with router. I'm trying to figure out the configuration file for that.....
how to find mac address
how to find the mac address in lg optimus one???
Thats why my optimus one can not take the ip from some puplic networks??
make this thread sticky
not working on Acer Liquid E ! !!
how can I change my mac !!??!!
1st step i already duno how to do T_T
know the pull things from nvram.txt file from /etc/wl to sdcard which require me to root my phone 1st then only can pull out
but after that in cmd(windows) goto android-sdk-windows\tools and type
adb shell
my computer can't detect that was a file in computer,and what is the android-sdk ?
Screw android-sdk ..LOLz..Do this install root explorer on your phone ..navigate to that file on your phone using root explorer , click on mount r/w button ,then long press and select open in text editor, then go to the end of the file and add this
macaddr=xx:xx:xx:xx:xx:xx
replace xx with a combination of hex letter i.e. 1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
example DB:12:3F:4F:11:AA
Save and exit
Reboot
You are all done check phone status in settings
sarfaraz1989 said:
Screw android-sdk ..LOLz..Do this install root explorer on your phone ..navigate to that file on your phone using root explorer , click on mount r/w button ,then long press and select open in text editor, then go to the end of the file and add this
macaddr=xx:xx:xx:xx:xx:xx
replace xx with a combination of hex letter i.e. 1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
example DB:12:3F:4F:11:AA
Save and exit
Reboot
You are all done check phone status in settings
Click to expand...
Click to collapse
after root my phone using z4root/gingerbreak,then download the root explorer from here is it ??
https://market.android.com/details?id=com.speedsoftware.rootexplorer&feature=search_result
if correct navigate to which file ??
sry android newbie here T_T
How about IMEI in some other file.
Wohhh atom bomb.
Sent from my LG-P500 using XDA Premium App
arrgh need solve my wifi problem ASAP
already more than 2week can't connect wifi in my college wifi T_T
Awesome, I've been looking for this everywhere. I can verify this method also works on stock rooted LG Optimus V.
whant's next
i've been change macaddr 'but nothing happen .device not connet wifi.it sitll ask password
you said you can access free internet.
i was just curious that how?
i mean free internet from the service provider or from where???
i too want to use it.
does that mean that if there is any wifi network then i will be able to use it without any pass???
Its simple to change your wifi mac address xD
Root you phone
install busybox (market.android. com/details?id=stericson.busybox) remove the space in link
download Terminal Emulator (market.android. com/details?id=jackpal.androidterm)
in terminal emulator
type -
su
then
busybox ifconfig wlan0 down
busybox ifconfig wlan0 hw ether wlan0 xx:xx:xx:xx:xx:xx
busybox ifconfig wlan0 up
YOU'RE DONE
DONT FORGET THE THANKS BUTTON
vermilion871 said:
Root you phone
install busybox (market.android. com/details?id=stericson.busybox) remove the space in link
download Terminal Emulator (market.android. com/details?id=jackpal.androidterm)
in terminal emulator
type -
su
then
busybox ifconfig wlan0 down
busybox ifconfig wlan0 hw ether wlan0 xx:xx:xx:xx:xx:xx
busybox ifconfig wlan0 up
YOU'RE DONE
DONT FORGET THE THANKS BUTTON
Click to expand...
Click to collapse
is there a way to revert this?
I mean get back to the original hardware mac?

[Q] How change MAC ADDRESS on Samsung Galaxy Ace

Hi guys. I have a rooted samsung galaxy ace and i want to change my mac address so i've tried the following command (but i got an error):
Code:
su
busybox ifconfig wlan0 down
busybox ifconfig wlan0 hw ether 00:11:22:33:44:55
ifconfig: SIOCSIFHWADDR: Operation not supported
Is there someone that knows how i can solve this problem? thnx in advance
I have a Moto XT300/Spice.
Enabling the wireless and not have it connect automatically to the configured network, had to forget the network, I was able to run:
Code:
su
busybox ifconfig eth0 hw ether 00:11:22:33:44:55
and it worked, confirmed with
Code:
busybox ifconfig eth0
though I wasn't able to connect to a WPA network anymore, complained that the key was wrong.
Disabling wireless and enabling once more got reset the mac but enabled me to connect again.
And yes, my wireless interface is eth0.
I was tinkering around on my android and found the section where wifi info is specified, including mac address. Did a quick google search and found the article:
http://androidforums.com/t-mobile-g1/3506-changing-spoofing-mac-address.html
Basically you must change the file /data/misc/wifi/nvram.txt, at the end of the file is the mac addr...
Apparently it is bad to reboot with different mac... who knows. I haven't tested it.
snakerdlk said:
I was tinkering around on my android and found the section where wifi info is specified, including mac address. Did a quick google search and found the article:
hxxp://androidforums.com/t-mobile-g1/3506-changing-spoofing-mac-address.html
Basically you must change the file /data/misc/wifi/nvram.txt, at the end of the file is the mac addr...
Apparently it is bad to reboot with different mac... who knows. I haven't tested it.
Click to expand...
Click to collapse
Ok, i will try that method although it seems strange that the ipconfig command doesn't work :-/
It is probably the fault of the driver that ifconfig wlan0 hw ether does not work.

[SOLVED] How to connect to an Ad-Hoc (IBSS) network?

I've been using for years a laptop with usb broadband device, and sharing it through an ad hoc network to mobile devices.
My last two Android Devices (HTC Magic and Samsung Galaxy Spica) never had problems connecting to that network - altough they always had custom roms and custom kernels, YoshiMod and SpicagenMod, both CyanogenMod based - (don't remember trying with stock roms).
Two days ago I bought a Nexus S, flashed the Air Kernel, and now I became confused that the ad hoc network didnt appear on the scanned networks (on the nexus) but it appears on the Wifi Analyser App (and still, on other two android phones)
So I installed Wifi Manager and I get the information "standard android does not support connecting to ibss (ad-hoc) networks".
So my question is: what the f***? Any workaround for this issue? Because, if it was possible to those two android phones I used, I suppose it's possible too for Nexus.
I read here a suggestion to use Connectify, but still the problem.
I have a stock 4.0.4 (with Air Kernel "wifi fix version").
Thanks in advance.
SOLUTION: This method. Shortly:
1. root is required - make sure you have your file system app (like Root Explorer) set to make files R/W so you can edit/rename/set permissions
2. turn off wifi
3. go into system/bin and rename wpa_supplicant to wpa_supplicant_backup
3. download the wpa_supplicant file found here
4. unzip it
5. move it to system/bin and paste it
7. set permissions to xxx, x, xxx (columns) - see more details in original thread
8. go back and start up wifi (no reboot needed)
9. click to connect
Credits to Lock-N-Load.
Use it at your own risk.
i've tried with your method but it won't work on s3 ics 4.0.4 stock rom
fantastic
Maxxd01 said:
I've been using for years a laptop with usb broadband device, and sharing it through an ad hoc network to mobile devices.
My last two Android Devices (HTC Magic and Samsung Galaxy Spica) never had problems connecting to that network - altough they always had custom roms and custom kernels, YoshiMod and SpicagenMod, both CyanogenMod based - (don't remember trying with stock roms).
Two days ago I bought a Nexus S, flashed the Air Kernel, and now I became confused that the ad hoc network didnt appear on the scanned networks (on the nexus) but it appears on the Wifi Analyser App (and still, on other two android phones)
So I installed Wifi Manager and I get the information "standard android does not support connecting to ibss (ad-hoc) networks".
So my question is: what the f***? Any workaround for this issue? Because, if it was possible to those two android phones I used, I suppose it's possible too for Nexus.
I read here a suggestion to use Connectify, but still the problem.
I have a stock 4.0.4 (with Air Kernel "wifi fix version").
Thanks in advance.
SOLUTION: This method. Shortly:
1. root is required - make sure you have your file system app (like Root Explorer) set to make files R/W so you can edit/rename/set permissions
2. turn off wifi
3. go into system/bin and rename wpa_supplicant to wpa_supplicant_backup
3. download the wpa_supplicant file found here
4. unzip it
5. move it to system/bin and paste it
7. set permissions to xxx, x, xxx (columns) - see more details in original thread
8. go back and start up wifi (no reboot needed)
9. click to connect
Credits to Lock-N-Load.
Use it at your own risk.
Click to expand...
Click to collapse
thank you very much...i have looked around and got a wpa file and it worked but i had to change between the original and this wpa if i wanted to connect to various wifi...
and your method worked but i changed the wpa_supplicant as wpa_supplicant was not working, and the permission i left it to be xxx xx xxx....
it is working perfectly... thank you for that wpa file....
No need to modify wpa_supplicant
I changed data/misc/wifi/wpa_supplicant.conf instead of /system/bin/wpa_supplicant.
Step1:First i scanned my adhoc network using Wifi Manager. It shows adhoc networks. I ignored it's warning and tried to connect. It'll fail.No problem! We now have the adhoc network listed in wpa_supplicant.conf.
Note: you can skip this step if you know how to edit wpa_supplicant.conf manually or if your device already lists adhoc networks on scanning.
Step2: You'll need to root your device if you're doing this through your device itself. If you use adb you may not need to root your device.(I had root access by default through adb. So rooting the device wasn't necessary for me). If you're using pc(windows or linux), i recommend Android Commander. If you're doing this from device itself, use some Root Explorer and Terminal Emulator.
Pull and/or edit data/misc/wifi/wpa_supplicant.conf. Add the following line
ap_scan=2
Find line like
network={
ssid="your adhoc name"
bssid=*some value*
.
.
}
Delete bssid line.
Add/Change the following
scan_ssid=1
priority=50
mode=1
It'd be better if you delete all other network={} blocks.
Push back/save the modified file.
chown ownership back to system.wifi. Type the following in adb/Terminal Emulator
#chown system.wifi data/misc/wifi/wpa_supplicant.conf
Ok, done! Now you can turn on wifi and if the specified adhoc network is nearby, your device'll automatically connect to it. Don't scan for new networks. If you do, adhoc support will be lost and you'll have to start over again!
Advantage: Safer than modifying system/etc/wifi/wpa_supplicant binary. Saves you the trouble of compiling modified wpa_supplicant or finding a compiled one for your platform.
Drawback: This is just a temporary solution.You'll have to repeat this process for every new adhoc network as it doesn't enable adhoc forever. It is good for connecting to your home network or other known networks, but if you want to connect to any adhoc network you scan,then this is not your method. Because, wpa_supplicant.conf will be overwritten every time you scan a new network.
Help
I followed the steps but its not working on my device xperia neo 4.0.4
any help
note :that I'm using my Nokia n8 for tethering through ezspot application
Root Access Needed
nariman1980 said:
I followed the steps but its not working on my device xperia neo 4.0.4
any help
note :that I'm using my Nokia n8 for tethering through ezspot application
Click to expand...
Click to collapse
is your Xperia rooted? Connect it to pc and open adb. If you get # as the prompt, you have root access from adb. If not type su on adb. Then you may get # prompt.
If you're having root access you could do the above steps and get it working.
HEXcube said:
is your Xperia rooted? Connect it to pc and open adb. If you get # as the prompt, you have root access from adb. If not type su on adb. Then you may get # prompt.
If you're having root access you could do the above steps and get it working.
Click to expand...
Click to collapse
yes i have a rooted device .i followed the steps and copied wpa-supplicant and the result was that my wireless not working at all .
Modify wpa_supplicant.conf
Note that the method mentioned by Maxxd01 is different from the one i suggest. In Maxxd01's method you'll need to change /system/bin/wpa_supplicant. You'll have to find one for your specific device and platform or compile from source. Your Xperia will need a wpa_supplicant binary compiled for it. If you can find it follow the first method.
For my method, edit /data/misc/wifi/wpa_supplicant.conf as i said in the previous post. It seems you didn't do the chown properly.
HEXcube said:
I changed data/misc/wifi/wpa_supplicant.conf instead of /system/bin/wpa_supplicant.
Step1:First i scanned my adhoc network using Wifi Manager. It shows adhoc networks. I ignored it's warning and tried to connect. It'll fail.No problem! We now have the adhoc network listed in wpa_supplicant.conf.
Note: you can skip this step if you know how to edit wpa_supplicant.conf manually or if your device already lists adhoc networks on scanning.
Step2: You'll need to root your device if you're doing this through your device itself. If you use adb you may not need to root your device.(I had root access by default through adb. So rooting the device wasn't necessary for me). If you're using pc(windows or linux), i recommend Android Commander. If you're doing this from device itself, use some Root Explorer and Terminal Emulator.
Pull and/or edit data/misc/wifi/wpa_supplicant.conf. Add the following line
ap_scan=2
Find line like
network={
ssid="your adhoc name"
bssid=*some value*
.
.
}
Delete bssid line.
Add/Change the following
scan_ssid=1
priority=1
mode=1
Push back/save the modified file.
chown ownership back to system.wifi. Type the following in adb/Terminal Emulator
#chown system.wifi data/misc/wifi/wpa_supplicant.conf
Ok, done! Now you can turn on wifi and if the specified adhoc network is nearby, your device'll automatically connect to it. Don't scan for new networks. If you do, adhoc support will be lost and you'll have to start over again!
Advantage: Safer than modifying system/etc/wifi/wpa_supplicant binary. Saves you the trouble of compiling modified wpa_supplicant or finding a compiled one for your platform.
Drawback: This is just a temporary solution.You'll have to repeat this process for every new adhoc network as it doesn't enable adhoc forever. It is good for connecting to your home network or other known networks, but if you want to connect to any adhoc network you scan,then this is not your method. Because, wpa_supplicant.conf will be overwritten every time you scan a new network.
Click to expand...
Click to collapse
Thank you and I'm sorry cause i didn't read your previous reply .
As i understand that no need to copy wpa-supplicant anymore . And should edit the other wpa file .but i didn't understand what do you mean by adb emulater ? I'm new in Android and have no experience with it before so please don't feel boring from me if i ask any question .
I'm glad cause you're helping me thanks
I did as you mentioned
and for the first time i see the Wifi name of my Nokia n8 in Wifi scan
note :when i was scanning for Wifi spot before ,my Wifi didn't show the name at all .
But now after the scanning shows the name of the Wifi spot ,it couldn't connect and this is an image from my device
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
then i go back to wpa-supplicant.conf and realized that all data which i add has gone and new data has been written
note :"nariman"is the new Wifi spot and the other one is neighbor's Wifi spot .
what should i do next ?
Use this wpa_supplicant.conf
Content of modified wpa_supplicant.conf(changes in bold)
ctrl_interface=wlan0
update_config=1
device_type=0-00000000-0
ap_scan=2
network={
ssid="nariman"
scan_ssid=1
key_mgmt=NONE
group=WEP104 WEP40
auth_alg=OPEN SHARED
wep_key0="09674"
mode=1
priority=1
}
After pushing the modded wpa_supplicant.conf don,t forget to change ownership and group back to original ones by doing
chown system.wifi /data/misc/wifi/wpa_supplicant.conf
or else wifi'll show error.
remember, don't scan for networks after turning on wifi. Keep the adhoc network ready and turn on wifi. It'll automatically connect. I hope you didn't change the name and password of adhoc network.I've included modded wpa_supplicant.conf along with an explanation wpa_supplicant.conf(in case you were wondering what this stuff is all about).
---------- Post added at 12:27 AM ---------- Previous post was at 12:01 AM ----------
If you find it difficult try first with open adhoc. In which case your wpa_supplicant.conf would look like
ctrl_interface=wlan0
update_config=1
device_type=0-00000000-0
ap_scan=2
network={
ssid="your_adhoc_name"
scan_ssid=1
key_mgmt=NONE
mode=1
priority=1
}
Hi and Thank you again
i follow the steps
then i turned my Wifi on and didn't scan ,the name of my adhoc was there but no connection done. Only "not in range"is written under it and i don't know what does it mean
i press on adhoc nariman and this image shows the result
i think there's something stuck but i don't know what it is and what to do
waiting your opinion to solve this problem
I have Wifi manager ,does it help ?
nariman1980 said:
I have Wifi manager ,does it help ?
Click to expand...
Click to collapse
Wifi Manager is of great use. It show/lists adhoc networks,but does'nt connect to it.It causes the name of adhic networks to appear in wpa_supplicant.conf-that's great help coz u don't have to manually edit wpa_supplicant.conf to add the network name. But you still have to add the lines which i mentioned in the previous post(the bold ones).
I add the bold lines but after turning the Wifi off they disappear !shall i edit anything in permissions of wpa_supplicant_info ?ex :xxx.x.xxx
wpa_supplicant_info?
wpa_supplicant_info? Where did you find that file? Don't your fone have wpa_supplicant.conf?You should edit wpa_supplicant.conf in /data/misc/wifi. If there's any change in the files your fone have please tell me.
Don't edit the file while wifi is on. Turn wifi off and edit.
And after pushing the modified file you should change the ownership back to original, not the permissions.
Do the following using adb or Terminal Emulator as su
#chown system.wifi /data/misc/wifi/wpa_supplicant.conf
after doing this check the properties of file and make sure ownership is system wifi and not root root.
Interesting post about adhoc wifi
Hey guys,interesting news!
A Senior xda member spirosbond had figured out Connect to Adhoc by modding wpa_supplicant.conf long before i even became an xda member. He's given a detailed explanation of this method.
Visit his website
http://grdroid.info (not english)
OR
his xda thread
http://forum.xda-developers.com/showthread.php?t=1511544
Tested on Xperia Mini
An XDA member Dilushan( http://forum.xda-developers.com/member.php?u=4606137 ) has tested this method on his rooted Xperia Mini. So, this must work in nariman's Xperia Mini Pro too.
Thanks!!!
HEXcube said:
I changed data/misc/wifi/wpa_supplicant.conf instead of /system/bin/wpa_supplicant.
Step1:First i scanned my adhoc network using Wifi Manager. It shows adhoc networks. I ignored it's warning and tried to connect. It'll fail.No problem! We now have the adhoc network listed in wpa_supplicant.conf.
Note: you can skip this step if you know how to edit wpa_supplicant.conf manually or if your device already lists adhoc networks on scanning.
Step2: You'll need to root your device if you're doing this through your device itself. If you use adb you may not need to root your device.(I had root access by default through adb. So rooting the device wasn't necessary for me). If you're using pc(windows or linux), i recommend Android Commander. If you're doing this from device itself, use some Root Explorer and Terminal Emulator.
Pull and/or edit data/misc/wifi/wpa_supplicant.conf. Add the following line
ap_scan=2
Find line like
network={
ssid="your adhoc name"
bssid=*some value*
.
.
}
Delete bssid line.
Add/Change the following
scan_ssid=1
priority=50
mode=1
It'd be better if you delete all other network={} blocks.
Push back/save the modified file.
chown ownership back to system.wifi. Type the following in adb/Terminal Emulator
#chown system.wifi data/misc/wifi/wpa_supplicant.conf
Ok, done! Now you can turn on wifi and if the specified adhoc network is nearby, your device'll automatically connect to it. Don't scan for new networks. If you do, adhoc support will be lost and you'll have to start over again!
Advantage: Safer than modifying system/etc/wifi/wpa_supplicant binary. Saves you the trouble of compiling modified wpa_supplicant or finding a compiled one for your platform.
Drawback: This is just a temporary solution.You'll have to repeat this process for every new adhoc network as it doesn't enable adhoc forever. It is good for connecting to your home network or other known networks, but if you want to connect to any adhoc network you scan,then this is not your method. Because, wpa_supplicant.conf will be overwritten every time you scan a new network.
Click to expand...
Click to collapse
Only want to say you THANKS THANKS THANKS!!! I have a china mobile Start W008+ and conect to my wifi adhoc perectly!!!! Thanks again!!!
connectify ..the wpa_supplicant route...opps
well I did exactly what i read......and it returned alot of ehh
"settings not working android-ishhh" ...messages...everysingle time..so i just back tracked.....and fixed it..
still cant see the connectify hotspot...thanks anyway
Sent from galaxy ace GT5830

[Q]Spoofing MAC on Galaxy Ace [Details&attempts listed]

Hey all,
I'm trying to spoof my MAC address on the Galaxy Ace, though nothing seems to be working. [Details and attempts listed below]
Phone Details:
Samsung Galaxy Ace GT-S5830
OS: Stock Gingerbread 2.3.5
Rooted
Installed Software:
Superuser
ES File Explorer (with show hidden (. prefix) files turned on & up to root enabled, root R/W)
Busybox (Free)
Android Terminal Emulator
(all with Superuser permissions)
What I've tried:
First I cleared the phone's IP DCHP lease in the router.
In Terminal on the phone whist not connected to a network, but wifi turned on I:
su
ifconfig wlan0 down
ifconfig wlan0 hw ether 112233445566
ifconfig wlan0 up
iplink show wlan0
Click to expand...
Click to collapse
also tried
su
ifconfig wlan0 down
iplink set wlan0 address 11:22:33:44:55:66
-->At which point I get (even with busybox prefixed)
iplink: SIOCSIFHWADDR: Operation not supported
Click to expand...
Click to collapse
The first code I quoted gave me no errors and appeared to execute successfully, but iplink show wlan0, the router (once the phone had connected), and several other tools (to see if ANY could see the change) also displayed the phone's default MAC.
(I also tired: ifconfig wlan0 hw link 112233445566, offsetting the existing MAC by only 1, and prefixing commands with busybox - busybox ifconfig wlan0 hw ether 112233445566 -resulted in ifconfig: SIOCSIFHWADDR: Operation not supported)
Looking for /data/misc/wifi/nvram.txt. Can see /data/misc/wifi/nvram.info containing my MAC. Have edited this and tried joining network again, but no MAC change is showing. Have read it's a rather bad idea to restart the phone before changing the MAC in files back, [Why?] so am yet to do a restart to test the file change...
Various apk tools (preceded by clearing DHCP lease for phone's IP & proceeded by checking router & iplink show wlan0) including:
Wireless MAC Changer - Osama Abukmail
Mac Address Ghost - diewland
MAC Spoofer for HD2 - Ian Kim (as the description stated although for a HD2, there was a change it may work for other types [later found out mine doesn't use/have /system/etc/calibration])
(all with super permissions)
Does anyone know of, or have any other ideas that may work?
Is this possible with only Custom ROM's?
Much thanks in advance,
Blue
MAC address spoofing is a type of discussion that XDA does not allow. For that reason, thread closed.

Spoofing mac address

Hi,
is there any method to spoof the wifi mac address on the Moto G?
I've tried a few apps but none worked.
Many thanks!
From the terminal:
ip link set wlan0 address < spoofed mac >
This would of course be the vanilla approach but it is not working (should have mentioned that in my original post) - at least not on my original kernel.
If you do "ip link set wlan0 address <whatever>" followed by "iplink show wlan0" the driver will happily report back the address you entered - but when you capture packets and look what is actually in there you'll find it still uses the old mac...
I have a tablet where this method works but only when you but it into flight-mode first. Unfortunately when I put the moto in flight-mode the wlan0 device dissapears and the above commands simply report an error.
Any other ideas?
I've made a little progress:
Under /persist there are two files: "WCNSS_qcom_wlan_factory_nv.bin.old" and ".bt_nv.bin".
WCNSS_qcom_wlan_factory_nv.bin from offset 7 contains the current mac-address, followed by 3 more copies each incremented by one.
.bt_nv.bin starts with 5 bytes I don't understand, followed by the first 4 bytes of the mac-address in reverse order.
Changing only WCNSS_qcom_wlan_factory_nv.bin does not work as (I believe) the content of this file is validated against .bt_nv.bin. If you don't change .bt_nv.bin accordingly your wifi does not work anymore.
What works however (I have successfully changed the first byte of my mac and I believe it should work for any of the first 4 bytes) is the following:
Change all four copies of the mac in WCNSS_qcom_wlan_factory_nv.bin AND change the bytes in .bt_nv.bin accordingly. Then reboot and the mac has changed.
So with this method the first 4 bytes of the mac are changeable.

Categories

Resources