Change MAC address on rooted N1 - Nexus One Q&A, Help & Troubleshooting

Hi, does anyone know how to permanently change the MAC address on a rooted Nexus One? Thanks.

Considering the root of this file system is linux, it should be pretty similar to this: http://linuxhelp.blogspot.com/2005/09/how-to-change-mac-address-of-your.html
If at all possible. Obviously, change eth0 to whatever is appropriate. Also, you'll probably have to su to do any of the commands.

Hi, thanks for the reply. I did try that already but after the following command:
ifconfig eth0 hw ether 00:80:48:BA:d1:30
I get this error:
ifconfig: bad address 'hw'
Any ideas?

It worked for me. Before you ran that command did you switch to root user?

Also, this won't permanently change it. It'll only change it for your current boot. If you want it to be permanently done, you'll have to put the command into a init.d script.

So, I have been looking into and testing this some more and I have found something strange. It seems as though something within android keeps reverting my MAC address back to the real MAC address and I am unable to connect to the network I am trying to connect to (it has MAC address filtering). Any thoughts?
And nachod0g in response to your error, double check and make sure that when you type the command "ifconfig -a | grep HWaddr" that eth0 actually comes up. If WiFi is not enabled, this will not work.

Related

MILESTONE CM7 RC4 USB Tethering with Linux

I've managed to enable USB Tethering between my Milestone with CM7 RC4 and a Linux box. Maybe it is possible also for Mac OS X with same method.
I'm still testing it, with good results, but it is not easy at all for end users. It can become really easy if it gets integrated into a ROM.
CHANGES:
1) set ro.modem_available=1 in build.prop
2) upload tether-nat to /system/xbin
3) Recompile Usb.apk from CM7 RC4 source with patch attached.
I have the already compiled apk, but I don't know if I can attach it here, for legal reasons.
4) Append attached code to /system/etc/rootfs/init.rc
DISCLAIMER: If you don't fully understand what I've written, do not try this. I should have posted this to Development forum, but I don't have enough posts and I'm not a spammer. Use everything AT YOUR OWN RISK.
HOW IT WORKS:
By sending usb_mode_modem to usbd trough its control socket, the Milestone is seen as a standard ACM modem from the PC. The corresponding serial port on Android is /dev/ttyGS0 .
Simply starting pppd on both ends, and correctly setting up ip forwarding, nat and routing tables does the trick.
ON THE LINUX BOX:
Open a terminal and write
sudo pppd nodetach persist defaultroute 172.16.0.2:172.16.0.1 /dev/ttyACM0
(and please set correct DNS servers before trying.)
Notes: every server app on the phone is also accessible from PC, like dropbear. At IP address 172.16.0.1
Motorola Phone Portal is not working, because it doesn't "detect" the usb connection nor wifi connection, so it doesn't even start listening to the TCP port.
Someone knows how to bypass this check?
When using this mode, ADB is not available. Looks like the PC can't detect the phone as a modem, if ADB is enabled. You don't have to manually toggle it.
Dropbear can be used as a replacement.
It asks for root permission in order to use setprop as a signaling mechanism to Android's init to start and stop pppd daemon, in order to not have it always running and wasting resources.
Maybe it is possible to use on device-added and on device-removed triggers with fake device nodes, in order to not require root privileges, but it is more complicated.
If a Moderator could move this thread to Development, this could be a great thing, if I can still post to it.
Massimo M.
tether
hey can u do a easy steps for doing this???
DISCLAIMER: If you don't fully understand what I've written in the first post, do not try this. I should have posted this to Development forum, but I don't have enough posts and I'm not a spammer. Use everything AT YOUR OWN RISK.
Be prepared to reinstall ROM if you have big issues. It means DO BACKUPS!
Only for CyanogenMod 7.0 RC4 (it should work on newer versions, but I haven't tested it.)
Copy Usb-new.apk on root of your sdcard.
Copy setup.txt on root of your sdcard.
Get a shell (ADB, or Terminal emulator).
Become root ( su )
cd /sdcard
sh setup.txt
reboot the phone.
Connect the USB cable, and choose Phone as a modem.
On the pc (Linux, any distro should work)
sudo modprobe cdc-acm
echo nameserver 8.8.8.8 |sudo tee /etc/resolv.conf
sudo pppd nodetach persist defaultroute 172.16.0.2:172.16.0.1 /dev/ttyACM0
and then open the browser!
I haven't tested setup.txt on my phone, only in a android-like directory hierarchy on my pc. I won't be online until Monday.
Try to understand everything!! And be careful.
The most difficult part was compiling Usb.apk, which I've attached now.
maxximino said:
I've managed to enable USB Tethering between my Milestone with CM7 RC4 and a Linux box. Maybe it is possible also for Mac OS X with same method.
I'm still testing it, with good results, but it is not easy at all for end users. It can become really easy if it gets integrated into a ROM.
CHANGES:
1) set ro.modem_available=1 in build.prop
2) upload tether-nat to /system/xbin
3) Recompile Usb.apk from CM7 RC4 source with patch attached.
I have the already compiled apk, but I don't know if I can attach it here, for legal reasons.
4) Append attached code to /system/etc/rootfs/init.rc
DISCLAIMER: If you don't fully understand what I've written, do not try this. I should have posted this to Development forum, but I don't have enough posts and I'm not a spammer. Use everything AT YOUR OWN RISK.
HOW IT WORKS:
By sending usb_mode_modem to usbd trough its control socket, the Milestone is seen as a standard ACM modem from the PC. The corresponding serial port on Android is /dev/ttyGS0 .
Simply starting pppd on both ends, and correctly setting up ip forwarding, nat and routing tables does the trick.
ON THE LINUX BOX:
Open a terminal and write
sudo pppd nodetach persist defaultroute 172.16.0.2:172.16.0.1 /dev/ttyACM0
(and please set correct DNS servers before trying.)
Notes: every server app on the phone is also accessible from PC, like dropbear. At IP address 172.16.0.1
Motorola Phone Portal is not working, because it doesn't "detect" the usb connection nor wifi connection, so it doesn't even start listening to the TCP port.
Someone knows how to bypass this check?
When using this mode, ADB is not available. Looks like the PC can't detect the phone as a modem, if ADB is enabled. You don't have to manually toggle it.
Dropbear can be used as a replacement.
It asks for root permission in order to use setprop as a signaling mechanism to Android's init to start and stop pppd daemon, in order to not have it always running and wasting resources.
Maybe it is possible to use on device-added and on device-removed triggers with fake device nodes, in order to not require root privileges, but it is more complicated.
If a Moderator could move this thread to Development, this could be a great thing, if I can still post to it.
Massimo M.
Click to expand...
Click to collapse
Hi
I am trying to send the AT Command directly from the terminal of the phone:
stop ril-daemon
cat /dev/ttyGS0 &
echo -e 'ATI\r' > /dev/ttyGS0
But the terminal is like not responding. Why?? Did someone try??
Thank you very much for the help.

[TIP]Changing wifi mac id

Thanks to Redpik;
Redpik said:
Using rootexplorer or adb write in this file /data/misc/wifi/config this line "cur_etheraddr=xx:xx:xx:xx:xx:xx" with your mac address. This is pretty permanent
Sent from my LG-P970 using XDA
Click to expand...
Click to collapse
George Jetson said:
I success change wifi mac id with this path:
1.install busybox
2.terminal emulator or adb shell with cmd
3.wifi turn on
4.entered this line
busybox ip link set wlan0 address xx:xx:xx:xx:xx:xx
5.done
Click to expand...
Click to collapse
you should add the Tag [TIP] on the thread title. nice tip thanks.
This method is not permanent. Once wifi gets disabled or phone rebooted mac reverts to original. In my case 0.
Redpik said:
This method is not permanent. Once wifi gets disabled or phone rebooted mac reverts to original. In my case 0.
Click to expand...
Click to collapse
Yes my mac reverts original too.Sorry everyone.
hmmm... in system/etc/wifi, find "nvram.txt"
You will see, "macaddr=".
Try to change there.. or add another "macaddr=" at the very bottom.
Reboot and see if it stays and changed.
The problem with CM7 is that nvram files has the correct mac address, but in wifi settings is still 0:. So there's another file that overwrites this (i guess)
The permanent solution is to change it through Hyperterminal. Only that there's no hidden menu to change AP CP usb mode. :|
Edit : I found a way, someone posted it on rootwiki forum. If nvram.txt has the original mac address just write in /data/misc/wifi/config cur_etheraddr=xx:xx:xx:xx:xx:xx with the mac address. It's working.
George Jetson said:
I success change wifi mac id with this path:
1.install busybox
2.terminal emulator or adb shell with cmd
3.wifi turn on
4.entered this line
busybox ip link set wlan0 address xx:xx:xx:xx:xx:xx
5.done
Click to expand...
Click to collapse
Is that permanent, or will back when reboot?
Sent from my LG-P970 using Tapatalk
Using rootexplorer or adb write in this file /data/misc/wifi/config this line "cur_etheraddr=xx:xx:xx:xx:xx:xx" with your mac address. This is pretty permanent
Sent from my LG-P970 using XDA
Hi Redpik,
you could at least mention, who found this about /data/misc/wifi/config, right?
Greetings
BTW, I usually do something like:
Code:
adb shell 'echo cur_etheraddr=XX:XX:XX:XX:XX:XX >> /data/misc/wifi/config'
Works only, if you are directly root when connecting via adb.
dreamind said:
Hi Redpik,
you could at least mention, who found this about /data/misc/wifi/config, right?
Greetings
BTW, I usually do something like:
Code:
adb shell 'echo cur_etheraddr=XX:XX:XX:XX:XX:XX >> /data/misc/wifi/config'
Works only, if you are directly root when connecting via adb.
Click to expand...
Click to collapse
Yes, it was you. Sorry if i upset you. I was really searching everywhere so in a hurry to provide intel for the others, i said someone. My bad. Thanks.

change my Mac adress

I cant seem to find anything about the sgs 1 and changing its mac adress (permanently/temporarily) ?
Can someone help pleaseeee!!!
Thanks in advance
I dont think we can change the mac address.
can't you spoof it?
I havent heard of this in android yet.
Sent from my GT-I9000 using Tapatalk 2
Mac address is a permanent address hard coded into the phone's hardware, or any wireless device's hardware for that matter.. Each wireless device in the world has its own unique mac address, just as each computer's bios has its own unique code..
You cannot change your device's mac address..
Hi
REQUIREMENTS
1) ROOTED PHONE
2) BUSYBOX INSTALLED
3) Terminal App
OPEN UP TERMINAL AND WRITE
:su
:busybox iplink show eth0
(THIS WILL SHOW YOUR CURRENT MAC ADDRESS)
NOW TYPE IN
:busybox ifconfig eth0 hw ether 00:11:22:33:44:55
(INSTEAD OF 00:11:22:33:44:55, YOU CAN WRITE YOUR WANTED ADDRESS)
Code:
http://forum.xda-developers.com/showthread.php?t=1385577
hardrockk said:
Hi
REQUIREMENTS
1) ROOTED PHONE
2) BUSYBOX INSTALLED
3) Terminal App
OPEN UP TERMINAL AND WRITE
:su
:busybox iplink show eth0
(THIS WILL SHOW YOUR CURRENT MAC ADDRESS)
NOW TYPE IN
:busybox ifconfig eth0 hw ether 00:11:22:33:44:55
(INSTEAD OF 00:11:22:33:44:55, YOU CAN WRITE YOUR WANTED ADDRESS)
Code:
http://forum.xda-developers.com/showthread.php?t=1385577
Click to expand...
Click to collapse
I started to grant SuperUser rights to my terminal app . After this, i started with the command "busybox iplink show eth0" and received the following error message:
iplink: can't find device "eth0"
Additionally tried the other command (with eth0) and there is the following error message:
ifconfig: SIOCSIFHWADD: No such device
Im using a Samsung I9000 with root access and all root-related apps already have root access all in all.
Even when Im typing ":su" or ":busybox ~", the device means:
sh: :busybox: not found
I don't get it, the terminal can work without these colons but the "eth0" could not be found, too
Any hints/tipps? Would be great, thank you
Wlan0 not eth0 no Ethernet on galaxy s
Sent from my GT-I9000 using xda premium
At first, thanks for the fast reply and I think your right..
..but at least, I already tried "Wlan0"
It seems, that the command (including wlan0) could be executed and I'm also able to display the wlan0 settings by typing: busybox iplink show
All related content is displayed including the "wlan0". The recently added mac-adress is successfully taken at this point (xx:xx:xx~ instead of the original one) and could be displayed there but even when im checking for the MAC adress in my android wlan settings, there is still the old one and my smartphone still connects with the old MAC to my gateway
I'm not sure then sorry will have to see if anyone else knows how
Sent from my GT-I9000 using xda premium
error eth0
eth0 not found in terminal what i should to do ? how to fix this error and ip link not found i know xda devloper in work fine but they have not solution for this...........
flexoduss said:
I cant seem to find anything about the sgs 1 and changing its mac adress (permanently/temporarily) ?
Can someone help pleaseeee!!!
Thanks in advance
Click to expand...
Click to collapse
1. A rooted device
2. Busybox installed </system/xbin>
3. Terminal Emulator
open terminal
type 'su' press Enter
grant super user access
then type 'busybox iplink show wlan0' press Enter
this shows ur current mac address of ur android phone
then type 'busybox ifconfig wlan0 hw ether XX:XX:XX:XX:XX:XX' press Enter
type the desired mac in XX:XX:XX:XX:XX:XX
voila Done!!!

[Q] Need to spoof MAC address and various methods fail

Hi,
Because of an issue at work (and it not wanting to reboot Cisco APs) My phone cannot connect to the Wi-Fi. I have tried several methods (apps & terminal commands) to change my phones' MAC address.
Nothing seems to work. Does anybody have a surefire way that will work?
Thanks
Kevin
Try this
http://forum.xda-developers.com/showthread.php?t=2286440
Also saying nothing seems to work without saying what you have done is not helpful.
I'll look at the link thanks. I did not feel it worthwhile to say which apps and terminal commands I used as I followed the core out there. And even though it sometimes said it switched, in reality it had not. Apps tried MAC Ghost, and others. CMD tried via busybox ifconfig and couple other can't remember.
Did not try changing NVRAM.txt and the phone doesn't seem to have a wl file.
There's a way to do it using fastboot oem commands...it's been a while though, so I forget the specifics and where I saw it
You will probably have to be on an eng hboot though

How to change Wi-Fi MAC in Bluestacks to a Specific One?

I am using Bluestacks 0.9.7.4101 which is already rooted. I want to change its Wi-Fi MAC Address as that of my mobile. So is there any way to change Bluestacks Wi-Fi MAC to a specific one? For example, 11:22:33:44:55:66.
I installed BusyBox and Terminal Emulator, but i am unable to change the Wi-Fi MAC. Somehow i managed to change the ethernet MAC, however it is still being listed as the fake MAC in wifi mac changer application. The wifi mac is listed as the real MAC in the app, which i want to change. Any help is appreciated....
catfish21 said:
I am using Bluestacks 0.9.7.4101 which is already rooted. I want to change its Wi-Fi MAC Address as that of my mobile. So is there any way to change Bluestacks Wi-Fi MAC to a specific one? For example, 11:22:33:44:55:66.
I installed BusyBox and Terminal Emulator, but i am unable to change the Wi-Fi MAC. Somehow i managed to change the ethernet MAC, however it is still being listed as the fake MAC in wifi mac changer application. The wifi mac is listed as the real MAC in the app, which i want to change. Any help is appreciated....
Click to expand...
Click to collapse
Not sure which methods you've tried so far, but I found this method, I haven't tested it, so try at your own risk:
1. As you already have busybox and terminal installed, open a root shell in terminal (run "su" and grant access) note that all the following commands MUST be run as root
2. Run "busybox iplink show eth0" which will show your current Mac address, write it down in case you want/need to revert back
3. Run "busybox ifconfig eth0 hw ether XX:XX:XX:XX:XX:XX" where XX:XX:XX:XX:XX:XX is replaced with your desired mac address
4. Run "busybox iplink show eth0" again to check if it did update
tried that...it doesn't work....moreover eth0 shows only the ethernet mac and not the wifi mac....i even verified this with device id app....wifi and ethernet MACs are different where ethernet mac is listed as fake mac and wifi mac is listed as the real mac in the wifi mac changer app.....
Anyone found solution to change wi-fi mac on rooted bluestacks?
I've already tried everything. It's impossible.
with root and expose - or with bstweak and a lot of installs you can make fake wifi to work; and type there your mac and other wifi name and fake bcid etc;
and looks like is possible to simulate all real device ids or most of them
play whole day and changes most of things; deviceid; fingerprint details;
now stack tofind free app for gsf id and hardware serial;

Categories

Resources