Random WiFi mac address on CM 7.2 2012-04-26 - Milestone XT720 General

I don't know why or how but my mac address changes everytime I turn on the wifi to random mac address from texas instruments instead of motorola mobility
Sent from my XT720 using xda premium

take a look here:
http://forum.xda-developers.com/showthread.php?t=1244982&highlight=mac
probably the offending part is here:
Code:
service wlan_loader /system/bin/wlan_loader \
-f /system/etc/wifi/fw_wlan1271.bin -i /system/etc/wifi/tiwlan.ini \
[b] -e /pds/wifi/nvs_map.bin [/b]
class post-zygote_services
disabled
oneshot
and more preciously in pds/wifi/nvs_map.bin
probably the wlan_loader doesn't look there, or doesn't interpret it right ..
but without additional info it is just speculation ...
basically when the wireless module is unloaded, you don't have wlan0 interface.
when you (actually the phone services) load the module, then wlan0 appears, but with 00:00:00:00:00:00 mac address (if the module is the stock one)
after wlan_loader do his job, the mac address is changed to the one specified in the nvs_map.bin file
p.s. I did not check the above statement now, it is from my memories, when i had trouble with my phone mac ....

Related

Need Iptables With Set Implementation

Hi, I'm doing some porting for the phone.
Everything goes fine but except...
# iptables -A INPUT -p tcp --sport 80 --tcp-flags FIN,SYN,RST,ACK SYN,ACK -m state --state ESTABLISHED -m set --match-set NOCLIP src -j ZHANG
FIX ME! implement getprotobyname() bionic/libc/bionic/stubs.c:372
iptables v1.3.7: Couldn't find match `set'
A patched ipset works and the kernel modules of it seems to be loaded correctly and I can define sets.
# ipset -L GOOGLE
Name: GOOGLE
Type: nethash
References: 1
Header: hashsize: 225 probes: 1 resize: 50
Members:
64.233.160.0/19
8.6.48.0/21
64.68.88.0/21
4.3.2.0/24
66.249.64.0/19
173.194.0.0/16
8.8.8.0/24
74.125.0.0/16
8.8.4.0/24
216.239.32.0/19
209.85.128.0/17
66.102.0.0/20
72.14.192.0/18
64.68.80.0/21
So there are problems with iptables.
I've looked into external/iptables/Android.mk and found that set is not enabled, and, this version of iptables seems don't know --match-set. Abort.
And I also tried the latest one which version number is 1.4.7 on github but I can't get it compiled.
And if you are Chinese and you are interested in FanQiang(f***ing GFW) contact me and let's do it together. As far as I know now only tor works on Android phone except VPN.

How do I spoof the mac address?

Is there a way to change the MAC address functionally, so that other devices think it has that address?
I have tried these methods (tiwlan0 corresponds to the wifi mac, no, it's not eth0)
In ADB: # ip link set tiwlan0 address 00:12:f0:dd:cc:dc
error: ip: SIOCSIFHWADDR: Operation not supported on transport endpoint
In terminal emulator on the phone: ip link set tiwlan0 address 00:12:f0:dd:cc:dc
error: ip: socket: operation not permitted
I have heard that some do change it but it reverts when communicating with a device.
It is working via fastboot.. There was a method somewhere in the Hero section.
Does this work on the G1?
Yes, it works flawlessly.
forum dot xda-developers dot com/showthread dot php?t=686789&highlight=mac+address+fastboot
Or search for mac fastboot in hero development forum.
On demand!
But how to do it on demand?
I usually can't launch fastboot in the airport
Removed...

asus transformer ubuntu wifi

Hi!
So finally I could make dual boot my transformer, (actually it's not as easy as I thought for first) and there is a problem:I can't use wifi, I ran the firmware-injector. I can modprobe it, the only problem is this: when I try to
iwlist wlan0 scan
Code:
wlan0 interface doesn't support scanning : Invalid argument
that's when I'm doing it as root if I'm non-root it just gives me:
Code:
no scan results
I tried, ifconfig wlan0 up as well. Of course I can't connect to my network.
ifconfig:
Code:
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:28 errors:0 dropped:0 overruns:0 frame:0
TX packets:28 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2260 (2.2 KB) TX bytes:2260 (2.2 KB)
wlan0 Link encap:Ethernet HWaddr 44:a7:cf:9a:d2:8f
inet6 addr: fe80::46a7:cfff:fe9a:d28f/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:181 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:696 (696.0 B) TX bytes:33285 (33.2 KB)
wlan0:avahi Link encap:Ethernet HWaddr 44:a7:cf:9a:d2:8f
inet addr:169.254.11.39 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
lsmod
Code:
Module Size Used by
bcm4329 194611 0
I'm using linux (debian) everywhere so it would be great to have a full (debian like) distro on my tf.
Other
Battery:
Actually the ubuntu sees the battery, and the battery temperature as well, check out the /sys/class/power_supply/battery/
so you just need to cat the voltage_now file and you know where you are.
Thanks:RiseR
I have the same problem. Here's what works for me:
-You can use 'iwlist wlan0 ap' instead of scan, although the results don't look quite right
-Even though scan doesn't work, you can still connect to open wifi points. Use 'ifconfig wlan0 down; iwconfig wlan0 mode managed; iwconfig wlan0 essid MyWifiNetwork; ifconfig wlan0 up; dhclient -v wlan0'
-Others claim to have had luck connecting to secure networks using wpa_supplicant, but without the ability to use scan it's really hit and miss. I'm just going to keep disabling my WPA when I need to transfer something until lilstevie fixes it.
With regard to the battery, voltage is not proportional to how fully charged the battery is. I suppose it could serve as an indicator of sorts in theory, but in practice the drop would be so close to going flat it wouldn't be of much use.
rdnetto said:
I have the same problem. Here's what works for me:
-You can use 'iwlist wlan0 ap' instead of scan, although the results don't look quite right
-Even though scan doesn't work, you can still connect to open wifi points. Use 'ifconfig wlan0 down; iwconfig wlan0 mode managed; iwconfig wlan0 essid MyWifiNetwork; ifconfig wlan0 up; dhclient -v wlan0'
-Others claim to have had luck connecting to secure networks using wpa_supplicant, but without the ability to use scan it's really hit and miss. I'm just going to keep disabling my WPA when I need to transfer something until lilstevie fixes it.
With regard to the battery, voltage is not proportional to how fully charged the battery is. I suppose it could serve as an indicator of sorts in theory, but in practice the drop would be so close to going flat it wouldn't be of much use.
Click to expand...
Click to collapse
Thanks for reply.
So, I'll disable the WPA but the problem is, I'm just home until October, and then I'll just be able to connect WPA secured network, so I have to install everything now. But OK so really thanks! and if you hear anything about WPA connection, and you have time please tell me.
Thanks:RiseR
Hello,
Ubuntu on the transformer is amazing and I am considering using this as a permanent os. I tried it with lxde or fluxbox and it works even better.
The major inconvenience for now is WIFI: I have exactly the same problem. Except for me 'iwlist eth0 scan' seems to work when I run it as a regular user, but it gives the same output when ran as root (interface doesn't support scanning : Invalid argument). wpasupplicant returns the same error (except if I use apscan=2, but it doesn't connect at all with no error this way)
The wifi driver is apparently opens soruce and I found the driver source files for android. Maybe it could work by recompiling the kernel with the driver source files ported from Android? (have no idea.. just a guess)
Anyway, a big thanks to all who made native ubuntu possible on the transformer!
follow the ubuntu eMMC thread. I finally got everything working but flash...but that could just be repository issues.
dcosmin said:
Hello,
Ubuntu on the transformer is amazing and I am considering using this as a permanent os. I tried it with lxde or fluxbox and it works even better.
The major inconvenience for now is WIFI: I have exactly the same problem. Except for me 'iwlist eth0 scan' seems to work when I run it as a regular user, but it gives the same output when ran as root (interface doesn't support scanning : Invalid argument). wpasupplicant returns the same error (except if I use apscan=2, but it doesn't connect at all with no error this way)
The wifi driver is apparently opens soruce and I found the driver source files for android. Maybe it could work by recompiling the kernel with the driver source files ported from Android? (have no idea.. just a guess)
Anyway, a big thanks to all who made native ubuntu possible on the transformer!
Click to expand...
Click to collapse
I suggest to us, what rdnetto said:remove the WPA. Now it works for me, and it is really, really cool It's amazing to run my opengl applications on the transformer. The biggest problems (why I'm still using dual boot)
1:I don't have keyboard dock yet, so i have to do everything with touchscreen --> there's no right click, and no xorg.conf where I can set that thing up.
2:Speakers don't work
3:this WPA problem
4:icewm don't work for now. Well I don't know. But when I choose from gdm menu it just gives me back to login screen.I'll try some other solution, but I think I can do that.
So, yeah Thanks for this hard work at xda! hope theese problems will be repaired and I can use my transformer as a netbook.
other:Try to use debian repos, if you don't have the package you're looking for. There's everything.

Reverse USB Tether Successful - Root, Command Line, Linux

Hey All,
Hope this hasn't been covered. I did search a bit and found some clues, but not something that totally worked for me. I figured I'd put up a post telling y'all how I made it work. I suppose this post is just more clues for somebody else, but at least it seems like a different set of clues than what I was able to find.
I've wanted to use the phone's USB connection to use work's Internet connection to download updates to my phone and conserve my measly 2GB/month data.
Running Cyanogenmod 9.1.0. Don't know how this would translate to others.
The tricks to reverse USB tether are
A) Get the phone to connect to a Linux host over the USB as in a normal tether
B) Set up IP forwarding and NAT on the Linux host (which has a perfectly fine Ethernet connection to the Internet)
C) Change the phone's default route to point at the Linux host
D) Change the phone to use the same DNS servers visible to the Linux host
A-C were pretty easy. D was actually the hardest. Here's my notes I'm storing on the phone:
***********************************************************************
* On the linux host
# ip addr show
2: p2p1: ...
inet 10.2.59.107/18 brd 10.2.63.255 scope global p2p1
7: usb0: ...
inet 192.168.42.151/24 brd 192.168.42.255 scope global usb0
* This part is classic "setting up a NAT" which is easily googled.
# echo 1 > /proc/sys/net/ipv4/ip_forward
# iptables -t nat -A POSTROUTING -o p2p1 -j MASQUERADE
# iptables -A FORWARD -i p2p1 -o usb0 -m state --state RELATED,ESTABLISHED -j ACCEPT
# iptables -A FORWARD -i usb0 -o p2p1 -j ACCEPT
* This tells us some IP addresses to use as nameservers.
cat /etc/resolv.conf
# nameserver 10.2.10.24
# nameserver 10.2.10.26
***********************************************************************
* On the android device disable all other methods of accessing the internet.
* That is, turn off Wi-Fi and System Settings, Wireless & networks, Mobile
* networks, Uncheck "Data enabled". This might not be necessary. I did it to
* make sure the rest of what I was doing worked.
* Try 'ip route' without other args and delete any existing default route if
* you have one.
# ip route add default via 192.168.42.151 dev rndis0
# getprop | grep dns
[net.change]: [net.dns2]
[net.dns1]: [172.26.38.1]
[net.dns2]: [172.26.38.2]
[net.dnschange]: [1]
[net.rmnet_sdio0.dns1]: []
# setprop net.dns1 10.2.10.24
# setprop net.dns2 10.2.10.26
* * Avoid the Primrose Path. This sort of acted like it would work, but then
* * didn't at all.
*
* # cat /emmc/resolv_work.conf
* nameserver 10.2.10.24
* nameserver 10.2.10.26
*
* # pkill dnsmasq
* # dnsmasq -d -r /emmc/resolv_work.conf

[Q] Manually configure routing options for VPN tunnel

Hi All,
I have a stupid Juniper VPN device at work which does not support 64 bit linux clients using netconnect. I have found ways around this previously, but now we are setting up 2 factor auth which throws a lot of javascript into the mix, making the scripts I used pretty much obsolete. The Junos pulse client works well for android, so I am thinking I want to use an android device as a router. Connecting to the VPN and using wifi tethering does not work, same with USB tethering does not work, and those are not exactly what I want anyway.
So basically I want to be able to connect my android device to my wifi here at home, connect to the VPN on it, run a script to do my setup on the Android device, lastly add a route on my client pc to tunnel through the android device. here is what I tried so far on the device:
Code:
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE
iptables -P FORWARD ACCEPT
iptables -t nat -I POSTROUTING -s 192.168.0.0/16 -d 10.0.0.0/8 -j MASQUERADE
ip rule add from all to 10.0.0.0/8 fwmark 0x3c lookup 60
and on the client PC:
Code:
route add -net 10.0.0.0 netmask 255.0.0.0 gw 192.168.1.29
where 192.168.1.29 is the IP of my android device, and 10.0.0.0/8(I know its lazy) is the IP range I want to go through tun0 on the device. This is however not working.
The only thing I need to do on a standard linux box to do this would be:
Code:
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -I POSTROUTING -s 192.168.0.0/16 -d 10.0.0.0/8 -j MASQUERADE
And setup the same route command on the client but point it at the linux box instead. This currently works, but when we decide to flip the switch and use the 2 factor auth only I will not be able to make it work on a standard linux box, but 2 factor does work on android via the Junos app.
I fear I am missing something simple in Android land, please help...

Categories

Resources