[Q] Changing MAC Address - Galaxy S III Q&A, Help & Troubleshooting

I have a need to change the WiFi MAC address on the phone. I looked a few places and it seems it's something very device specific. So how can I change it on my S3? Please and thank you.

Change it or spoof it?
Sent from my GT-I9300 using Tapatalk 2

In terminal emulator type these commands:
Disable network
ifconfig "interface" down
Change the MAC address of the interface
ifconfig "interface" hw ether 01:02:03:04:05:06
Enable network
ifconfig "interface" up
Checking the MAC address
ifconfig "interface"
where "interface" is usually wlan0, it should work

Related

LAN Wireless - DNS setting???

Ok, I would like to use a static IP for my X10 on my own wireless network.
I added the IP, Netmask, Gateway addresses, and it worked fine. But then I added what I thought was the correct DNS info and now it doesn't work. I thought I could easily clear the DNS address, but I can't seem to.
Can something inform me how to clean the DNS info or add a DNS address that works? Thanks
Solved
Ok, I solved my issue using the 'Wifi Static' app from Marketplace
I had the same problem, but I can't fix an IP. So I generated a shell script (below), saved it on my SDCard and used tasker to run it (with execute locale plugin, needs root) everytime I got a Wifi connection. Works everytime.
file dns.sh:
setprop net.dns1 8.8.8.8
setprop net.dns2 8.8.8.4
locale command: !sh /sdcard/dns.sh
RodneyBR said:
Ok, I would like to use a static IP for my X10 on my own wireless network.
I added the IP, Netmask, Gateway addresses, and it worked fine. But then I added what I thought was the correct DNS info and now it doesn't work. I thought I could easily clear the DNS address, but I can't seem to.
Can something inform me how to clean the DNS info or add a DNS address that works? Thanks
Click to expand...
Click to collapse
a good app to manage diff IPs:
http://www.appbrain.com/app/ip-manager/com.monkelabs.ipmanager
DNS servers (OpenDNS):
208.67.220.220
208.67.222.222

[SOLVED] How to I find my LAN IP?

hi,
i've found an utility that gives me the wan ip but i need my personnal (internal to my network) ip, any clue ?
subsidiary : any method to configure wifi ? (ex: ip fixing or adhoc mode, etc.)
thanks !!
There's an app in the webos catalog called what is my IP
if you can open up a terminal command line from preware, just type ifconfig -a
you can also look on your router to see what was assigned or go under wifi settings and set a static ip. i prefer a static ip anyways just so i know what it's on for connection purposes.
thanks both!
what's the app for terminal ?
fbp2k said:
thanks both!
what's the app for terminal ?
Click to expand...
Click to collapse
there's an xterm app in preware. it's kind of annoying to use, but it will work fine for what you need.
If its the only device on the network look in the WiFi router admin panel
Sent from my HTC Sensation Z710e using XDA App
fbp2k said:
hi,
i've found an utility that gives me the wan ip but i need my personnal (internal to my network) ip, any clue ?
subsidiary : any method to configure wifi ? (ex: ip fixing or adhoc mode, etc.)
thanks !!
Click to expand...
Click to collapse
on the touchpad, have you tried settings->wifi-> press on name of network you are connected to?
don't think you need to install anything.

Bluetooth tethering with Tablet S and Wildfire

I have write a script that simpliefies a bluetooth pan connection on the devices in topic.
I have spend a lot of time doing this. Not for writing the script but to find out whats going wrong when connect those devices.
You need ics on phone or wireless tether on honeycomb or others. If you use wireless tether you have to set it to use bluetooth.
So on now copy this script somewhere on your device save it under initpan.sh.
In console chmod 755 initpan.sh
Execute it and yes thats it so easy but so so heavy.
Here is the script:
#!/system/bin/sh
# Setup Handy Network
/system/bin/pand --connect F8B:7F:099:66
/system/bin/ifconfig bnep0 down
dhcpcd bnep0
setprop net.dns1 8.8.8.8
Sent from my Sony Tablet S using XDA Premium HD app
Your sensemilla
I'm not certain on this (haven't used PAN on Android much), but I'm pretty sure that script would need to be changed by whoever wants to use it, since it seems to be hardcoded to the Bluetooth interfaces MAC address which is device-unique.
Also, what are you actually trying to do? In the script, you bring the virtual interface down, then configure it for DHCP, then manually set the Google DNS, then don't bring it back up again? What's actually meant to be going on?

enable wireless and 4g at the same time

Is there any way to do this? It seems that when I enable wifi, the rmnet_usb0 interface becomes inaccessible (no ipv4 address). When I disable wifi, even the wlan and cfg80211 modules get unloaded. I can't seem to find the way to load them (with wifi set as disabled) to try to ifconfig the interface up. Maybe I am just going about it in the completely wrong way!
All I really want is to have both interfaces up and running at the same time, with the default gateway pointing out the rmnet_usb0 interface so that I can access the internet via 4g, but still being able to route to my local wireless lan.
I think your best bet is going to be setting up a vpn
My laptop has wifi and bluetooth on the same assembly, and only 1 is accessible at once. Maybe its like that.
Sent from my LG-E970 using xda app-developers app
I know they can physically be enabled at the same time, because the phone can be a hotspot. That doesn't really help me though if I want to connect wired devices to it. I want it to remain a wifi client.
There's an app called SuperDownload or something that uses wifi and mobile data simultaneously for downloading. It seems to bring the mobile data up in some special mode where the app can use it but it's not otherwise generally routable. That's what the author says, at least, but I'm not sure that makes sense. Normally when data is in use it basically looks like any other network interface.
A more general way of asking my question might be "what happens behind the scenes when you enable wifi?" if there's a script being run I can see what's going on (loading the module and so on) and maybe adapt it to my needs.
http://forum.xda-developers.com/showthread.php?t=1667025
This app uses them both simultaneously, maybe you can get some info there..
SUCCESS I think: enable wireless and 4g at the same time
bigworm50 said:
http://forum.xda-developers.com/showthread.php?t=1667025
This app uses them both simultaneously, maybe you can get some info there..
Click to expand...
Click to collapse
Yep that's the one I mentioned. Doesn't seem to be much help.
I think I've gotten somewhere. I can't test this fully because I don't have access to any other machines on the current wireless lan, but I can get a dhcp address from it and ping its gateway, while meanwhile traceroutes to the internet are going through the mobile network.
1. Turn off wifi in the normal way (from the phone's user interface) if it's not already off.
All the following steps done in a root shell:
2. load the drivers
busybox insmod /system/lib/modules/cfg80211.ko
busybox insmod /system/lib/modules/wlan.ko
3. start wpa_supplicant to connect to the first available wireless network. The wpa_supplicant.conf file I list below is the one maintained automatically by the phone as you join new networks. If you want more control (e.g. connect to only a specific network), copy the wpa_supplicant.conf file somewhere, modify it as needed, and specify it on the command line.
wpa_supplicant -B -Dnl80211 -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf
4. dhcpcd
busybox pkill dhcpcd
rm /data/misc/dhcp/*
dhcpcd wlan0
5. verify route
busybox route
For me this is showing the original default first on the list (goes through rmnet_usb0) followed by the new one configured for the wireless lan wlan0. Traceroute shows the traffic going out the first one.
Now, at this point if you try to enable wifi normally from the phone it will not work. To make it work:
ifconfig wlan0 down
ifconfig wlan0 unplumb
rmmod wlan
rmmod cfg80211
And you can turn on wireless again.
I was able to test at home, and it is definitely working.
As for what this buys us, there are two things. First, I have crappy satellite internet at home, so I want to be able to transfer files back and forth, and sometimes even use the LG OSP, without my phone having to use that instead of 4G (which is marginal but still better).
More usefully, it allows non-tethered proxying. I can run a socks or http proxy on my phone and point my non-wireless devices at it, letting me browse the web without routing all my internet traffic through the phone.
I'm still a little bit away from non-wireless tethering (i.e. being able to set my pc's default gateway to my phone and have it route all internet traffic through the mobile data connection), but that would be nice as well. I will need to set up some iptables NAT stuff the way wifi tether does, and I haven't gotten the right combination yet since I don't get much opportunity to test it.
works on nexus4 too
Thank you so much for this info, I was able to change things a bit and make it work on my stock / rooted Nexus 4:
Code:
# enable dual-networking:
pkill dhcpcd
svc wifi disable
svc data enable
netcfg wlan0 up
cd /data/misc/wifi/.
wpa_supplicant -B -Dnl80211 -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf
dhcpcd wlan0
ip route add x.x.x.x via x.x.x.y # add any desired local route
# disable dual-networking:
ip route del x.x.x.x/x via x.x.x.y
pkill dhcpcd
pkill wpa_supplicant
rm -rf /data/misc/wifi/wlan0
netcfg wlan0 down
svc wifi disable
svc data disable
I use SH Script runner to create and run the 2 above scripts easily.
I am a newbie... Do I have to just run the script in Sh script runner? And I don't know what IP route to use.
Sent from my GT-I9300 using XDA Premium 4 mobile app
---------- Post added at 12:25 PM ---------- Previous post was at 11:26 AM ----------
I am not able to load the drivers.. It's showing not found.. Even though I have installed busy box using busy box installer pro
Sent from my GT-I9300 using XDA Premium 4 mobile app
---------- Post added at 12:30 PM ---------- Previous post was at 12:25 PM ----------
I checked the directory using root Explorer and I can't find cfg80211.ko and wlan.ko
Sent from my GT-I9300 using XDA Premium 4 mobile app
Whether you have any kernel modules to install with insmod, depends on your phone model, ROM, kernel.
For my nexus 4 with franco.kernel I don't have the modules either, but got it to work fine. So maybe its a similar situation with your phone .
SH script runner is not required, you can run the script in any terminal app after doing su.
EDIT: Some other interesting threads related to this topic are here:
http://forum.xda-developers.com/showthread.php?t=1640472
http://forum.xda-developers.com/showpost.php?p=13758490&postcount=1
http://forum.xda-developers.com/showthread.php?t=1667025

Bring up network from command line? [Lollipop]

I've got a little shell script that uses ffmpeg to record an http audio stream on my rooted Amazon Fire 5th generation tablet with Nexus ROM. If I manually run my script, it's all good. But when I use SManager to schedule the script to run at a time that the device is asleep, ffmpeg can't access the network ... even though SManager gets a wakelock. Hmm.
I put "netcfg" in my script; when it next does its scheduled run (while device is sleeping) netcfg shows that wlan0 is up but has an IP of 0.0.0.0. Problem! Can I successfully bring up the network from the command line in this situation? This is what I've come up with:
ifconfig wlan0 up
ifconfig wlan0 192.168.1.140 netmask 255.255.255.0
route add default gw 192.168.1.1 dev wlan0
setprop net.wlan0.dns1 8.8.8.8
setprop net.wlan0.dns2 4.4.4.4
After that, wlan0 does have an IP address, but ffmpeg still can't access the network. Giving ffmpeg an IP address rather than a URL results in "no route to host", so I don't think that it's DNS problem. I'm probably just not giving the right commands to bring up the network. Is there a way to succeed at what I'm trying to do?

Categories

Resources