Spoof your MAC Address in Neo V.
My MAC was blocked from using the Wifi connection at my workplace. So I searched the Great Google on how to change my MAC Address or at least spoof it. What I found goes below.
I found this trick while searching the forum. But there it was mentioned for Google Nexus. So, I modified it to work with my Neo V but this should work with Neo as well . (I don't have Neo so I couldn't test it)
Requirements:
ROOTED PHONE
BUSYBOX INSTALLED
Baseband .72 installed.
Any Terminal App (I used Terminal Emulator)
Process to spoof
Open your Terminal App and type following commands:
Code:
su
busybox iplink show wlan0
The above command should show you your current MAC Address
Now type following command:
Code:
busybox ifconfig wlan0 hw ether 00:11:22:33:44:55
The above command should set your MAC Address to 00:11:22:33:44:55.
Instead of 00:11:22:33:44:55, you can use your any other MAC Address.
Enjoy your spoofed MAC Address.
NOTE: Remember once you restart your phone, the spoofed address is gone and it returns to your original MAC. So you will have to run the entire process again. Or you can just make a shell script and execute it on restart. If anyone asks me for the script I will add it later to this thread.
Click thanks button if this post helped you.
Can u please help me out in my HTC Desire S ???
For HTC Desire S
victorharsh said:
Can u please help me out in my HTC Desire S ???
Click to expand...
Click to collapse
Can you run the following Command and send me the result in this thread?
or you can PM me.
Type this in Terminal App:
Code:
busybox ifconfig
so that I can see your hardware details...
please check your PM
For HTC Desire S
Ok
So you can type following in terminal:
Code:
su
busybox ifconfig eth0 hw ether 00:11:22:33:44:55
Instead of 00:11:22:33:44:55, you can use your any other MAC Address that you know is valid.
Another important thing (for HTC Desire S only) : Switch ON your wifi connection so that hardware can be detected but don't connect it to any network or else it will become busy and wont allow you to change its MAC.
To confirm if the MAC Address is changed or not run the following code:
Code:
busybox iplink show eth0
this should now display your new MAC Address.
This does not work on my phone. It says "Busybox: applet not found".
ameer1234567890 said:
This does not work on my phone. It says "Busybox: applet not found".
Click to expand...
Click to collapse
You need to have busybox installed on your phone and for that it needs to be rooted. This is the requirement for this to work.
Also remember linux is case-sensitive so you need to type all the commands in lowercase.
khurram.khu said:
You need to have busybox installed on your phone and for that it needs to be rooted. This is the requirement for this to work.
Also remember linux is case-sensitive so you need to type all the commands in lowercase.
Click to expand...
Click to collapse
I have busybox installed. That is the reason the error mentions "applet not found". And yes, I am aware of linux case sensitivity.
Thank you for helping.
ameer1234567890 said:
I have busybox installed. That is the reason the error mentions "applet not found". And yes, I am aware of linux case sensitivity.
Thank you for helping.
Click to expand...
Click to collapse
From what I can see in the message I am guessing that you must be typing Busybox instead of busybox as seen in below quote.
ameer1234567890 said:
This does not work on my phone. It says "Busybox: applet not found".
Click to expand...
Click to collapse
I may be wrong but other than that I can't think of anything else.
khurram.khu said:
From what I can see in the message I am guessing that you must be typing Busybox instead of busybox as seen in below quote.
I may be wrong but other than that I can't think of anything else.
Click to expand...
Click to collapse
I am typing busybox (not caps). The error is because my busybox installation (Stericsson) does not come with those applets/functions.
Which busybox version are you using?
ameer1234567890 said:
I am typing busybox (not caps). The error is because my busybox installation (Stericsson) does not come with those applets/functions.
Which busybox version are you using?
Click to expand...
Click to collapse
I m using busybox v1.18.4
khurram.khu said:
I m using busybox v1.18.4
Click to expand...
Click to collapse
Which busybox installer?
ameer1234567890 said:
Which busybox installer?
Click to expand...
Click to collapse
I did not install it on my phone. It was probably installed by the method I used to root my phone.
And I used Rooting Toolkit for Xperia 2011 ICS [FW:.562]{LOCKED & UNLOCKED BOOTLOADERS} from DooMLoRD to root.
khurram.khu said:
I did not install it on my phone. It was probably installed by the method I used to root my phone.
And I used Rooting Toolkit for Xperia 2011 ICS [FW:.562]{LOCKED & UNLOCKED BOOTLOADERS} from DooMLoRD to root.
Click to expand...
Click to collapse
OK, I figured it out. Doesn't seem to work on my Xperia Pro. Never mind! Thanks for helping!
ameer1234567890 said:
OK, I figured it out. Doesn't seem to work on my Xperia Pro. Never mind! Thanks for helping!
Click to expand...
Click to collapse
OK...
But I really wanted to help you....
ameer1234567890 said:
OK, I figured it out. Doesn't seem to work on my Xperia Pro. Never mind! Thanks for helping!
Click to expand...
Click to collapse
try to use Terminal IDE
if I try any other terminal emulator I got same applet not found, but wen I'm useing Terminal IDE its ok
vla_diss said:
try to use Terminal IDE
if I try any other terminal emulator I got same applet not found, but wen I'm useing Terminal IDE its ok
Click to expand...
Click to collapse
Thanks man for solving someone's problem on my behalf
khurram.khu said:
Thanks man for solving someone's problem on my behalf
Click to expand...
Click to collapse
No problem, I'm glad that I can help
and I tryed busybox 1.18.4 and its working, but I like 1.20.1 so I'm back to terminal IDE and just for fun
Code:
#!/bin/sh
iplink show wlan0
echo "Enter new MAC:"
read num
ifconfig hw ether $num
or if u use 1.18.4
Code:
#!/bin/sh
busybox iplink show wlan0
echo "Enter new MAC:"
read num
busybox ifconfig hw ether $num
Help! Here is my ifconfig. Xperia Pro
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:1158 errors:0 dropped:0 overruns:0 frame:0
TX packets:1158 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:64043 (62.5 KiB) TX bytes:64043 (62.5 KiB)
tiwlan0 Link encap:Ethernet HWaddr 84:00:D2:4C:5F:51
inet addr:192.168.2.127 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::8600:d2ff:fe4c:5f51/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:311 errors:0 dropped:0 overruns:0 frame:0
TX packets:30 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:52561 (51.3 KiB) TX bytes:3642 (3.5 KiB)
ameer1234567890 said:
Help! Here is my ifconfig. Xperia Pro
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:1158 errors:0 dropped:0 overruns:0 frame:0
TX packets:1158 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:64043 (62.5 KiB) TX bytes:64043 (62.5 KiB)
tiwlan0 Link encap:Ethernet HWaddr 84:00:D2:4C:5F:51
inet addr:192.168.2.127 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::8600:d2ff:fe4c:5f51/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:311 errors:0 dropped:0 overruns:0 frame:0
TX packets:30 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:52561 (51.3 KiB) TX bytes:3642 (3.5 KiB)
Click to expand...
Click to collapse
So the modified commands for you would be:
Code:
su
busybox ifconfig tiwlan0 hw ether 00:11:22:33:44:55
if it says anything about the Device or Resource busy, then try turning your Wifi OFF and try the above code again.
:fingers-crossed: I hope this helps you this time. :fingers-crossed:
:good::good:
Now to verify that the MAC is changed type this:
Code:
busybox iplink show tiwlan0
Hopefully it must have changed by now. :good::fingers-crossed:
Tell us what happens after you are done with this.
Related
I tried to get an ad-hoc connection running using directions under the G1 subforum. This was the post:
forum.xda-developers.com/showpost.php?p=2886271&postcount=13
I figured if the G1 could connect to an ad-hoc, the Nook should be able to. I got part of the way through this and ran into some road-blocks. Some of this is directly copied from the post above - I certainly am not savvy enough to put this all together myself. I had installed busybox before I started doing any of these steps.
First, make sure wifi is disabled on the phone gui.
Next, Set up the ad-hoc network. I used android wifi tether on my HTC G1 to start broadcasting. The SSID was "g1". I set it to use the 192.168.3.0 subnet. No encryption, no access control.
copy /system/etc/wifi/tiwlan.ini to /data/local/bin/tiwlan.ini for easy editing
In tiwlan.ini, look for "WiFiAdhoc = 0".
Change it to the following (set ssid to whatever you use):
WiFiAdhoc = 1
dot11DesiredSSID = g1
dot11DesiredBSSType = 0
After updating tiwlan.ini, enable wifi manually:
adb shell
# insmod /system/etc/wifi/tiwlan_drv.ko
# tiwlan_loader -f /system/etc/wifi/firmware.bin -e /proc/calibration -i /data/local/bin/tiwlan.ini
# ifconfig tiwlan0 192.168.3.99 netmask 255.255.255.0
# ifconfig tiwlan0 up
ifconfig showed the tiwlan0 interface was up.
lo
Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
tiwlan0
Link encap:Ethernet HWaddr 08:00:28:7F:57: DB
inet addr:192.168.3.99 Bcast:192.168.3.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
I then discovered I had no iptables binary, so I pulled it off the rooted HTC G1.
adb pull /data/data/android.tether/bin/iptables
adb shell
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
# exit
adb push ./iptables /system/bin/iptables
adb shell
# chmod 755 /system/bin/iptables
# mount -o remount,ro -t yaffs2 /dev/block/mtdblock3 /system
Now, from the OP's post, the iptables rules:
iptables -I FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
gave this error:
iptables v1.3.7: can't initialize iptables table `filter': iptables who? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
when I run modprobe I get: "modprobe: cannot parse modules.dep"
<stopped here>
____________________________________________________
The rest of the commands I didn't bother to run:
iptables -I FORWARD -s 192.168.2.0/24 -j ACCEPT
iptables -P FORWARD DROP
iptables -t nat -I POSTROUTING -s 192.168.2.0/24 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
If all went well, you now have internet access.
____________________________________________________
I also tried the wpa_supplicant hack from:
forum.xda-developers.com/showthread.php?t=754961&page=1
This didn't work, with either the version 0.5.11 or 0.6.10 of wpa_supplicant. Version 0.5.11 allows the wifi to start but I get a "unable to scan networks" error. The 0.6.10 version won't even start wifi.
Restoring the original wpa_supplicant and setting permissions back to 755 brought the wifi back
Anyone with more skills than I have any ideas?
Its not the nook, I connected successfully using my Fascinates Verizon 3G Hotspot software but wifi tether would not pick up. Its not the nook that needs hacking its the wifi tether broadcasting app. Something about it isn't broadcasting in a way that other android devices can pick up. I tried this in the verizon store the other day phone to phone. It just doesn't work. But the 3g hot spot works like a million bucks.
ad-hoc under android
Most android devices don't connect to ad-hoc networks. Some are capable of tethering and broadcasting as an infrastructure AP, but my phone isn't. I need the nook to see and connect to ad-hoc networks because that is all my G1 can broadcast. Its not a nook problem per se, but an android problem. There are hacks described on this forum to circumvent the problem, they just don't work with my phone or the nook.
Assuming this is the same problem I'm having trying to tether via MyWi on my iPhone. (Ad-Hoc vs infrastructure) I'm very jealous of my co-worker who's Evo tethers to his NC perfectly.
macndroid said:
I tried to get an ad-hoc connection running using directions under the G1 subforum. This was the post:
...
I also tried the wpa_supplicant hack from:
forum.xda-developers.com/showthread.php?t=754961&page=1
This didn't work, with either the version 0.5.11 or 0.6.10 of wpa_supplicant. Version 0.5.11 allows the wifi to start but I get a "unable to scan networks" error. The 0.6.10 version won't even start wifi.
Restoring the original wpa_supplicant and setting permissions back to 755 brought the wifi back
Anyone with more skills than I have any ideas?
Click to expand...
Click to collapse
I don't yet have a nook to try this on, but I've used both these techniques on more than 1 device... the second is better IF you can get as far as you did with the 0.5.11... I'd suspect that it might be as simple as an edit to the /system/etc/wifi/wpa_supplicant.conf that might be needed to have it set up the same as other devices using 0.5.x... I got this version working a few days ago on the Viewsonic Gtab (2.2 but running 0.5.11) so you might try comparing your conf with the one there... I'd suspect the only diff should/might be the cntl_interface definition...
I've attached the file with .txt added that worked for me on the Gtab...
macndroid said:
Most android devices don't connect to ad-hoc networks. Some are capable of tethering and broadcasting as an infrastructure AP, but my phone isn't. I need the nook to see and connect to ad-hoc networks because that is all my G1 can broadcast. Its not a nook problem per se, but an android problem. There are hacks described on this forum to circumvent the problem, they just don't work with my phone or the nook.
Click to expand...
Click to collapse
This is correct. From what I've read Android as of now doesn't support Ad-Hoc connections at all. All the HTC handsets I've used will work with Infrastructure mode because of the Broadcom chipset used. The OMAP based chips and Samsungs chips don't allow using them in Infrastructure mode from what I've read.
My Droid Inc works fantastic as a base station. My Droid didn't, and neither did my Vibrant.
I don't know why Android doesn't support Ad-Hoc connections yet, in my opinion that's just stupid.
Thanks
jtbnet said:
I don't yet have a nook to try this on, but I've used both these techniques on more than 1 device... the second is better IF you can get as far as you did with the 0.5.11... I'd suspect that it might be as simple as an edit to the /system/etc/wifi/wpa_supplicant.conf that might be needed to have it set up the same as other devices using 0.5.x... I got this version working a few days ago on the Viewsonic Gtab (2.2 but running 0.5.11) so you might try comparing your conf with the one there... I'd suspect the only diff should/might be the cntl_interface definition...
I've attached the file with .txt added that worked for me on the Gtab...
Click to expand...
Click to collapse
Wow - thanks for the input! I'll try again with your conf file when I get home and let you know how it goes.
It really is a shame Google didn't just make this work right the first time.
Edit: I also tried wpa_cli (pulled from my phone running CM 6) and added the ad-hoc network and tried to force it to connect but the interface remained disconnected even though the network was in the list wpa_cli generated. Details can be found here : www.olsr.org/?q=olsr_on_android. Maybe I need to try with the modified wpa_supplicant binary.....
Anyone know if there is an phone with the broadcom chipset that I can get used for a reasonable price AND I can use with T-mobile? At this point it might be the easiest solution.
SOLVED!
For those who haven't found the other thread, Cicada posted a wpa_supplicant (and directions for installation) that work on all Ad-Hoc networks tested so far.
Hi all,
I've put CM7 on my HTC Legend and also upgraded the Radio as per instructions on some other thread here (http://forum.xda-developers.com/showthread.php?t=841932). All is fine, but I have some weird issues with not getting IP address from an AP
(NOTE: The wifi connecting problem was there before the radio upgrade, too - I upgraded radio to solve the GPS problems on CM7)
What happens (not always) is that Legend does not get an IP address from my local AP, while my notebook does, and internet access works (tested on several wifi clients).
The issue is fixed by restarting the AP - which is what I do not want to do anymore - like I said other wifi clients work fine and killing the AP for my Legend disturbs others that use the AP at that moment.
One thing I wanted to try was to change the MAC on the Legend to fool the AP.
I tried:
- busybox ip command that comes with CM7,
- busybox ifconfig command that comes with CM7,
- compiled 1.18.x busybox and tried ip and ifconfig
- tried with macchanger
all to have something like this printed:
# /data/local/download/busybox ifconfig tiwlan0 hw ether 00:23:76:dc:51:6e
ifconfig: SIOCSIFHWADDR: Operation not supported
tiwlan0 Link encap:Ethernet HWaddr 00:23:76C:51:6F
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
AFAIK, both ip and ifconfig should be able to do it.
Is there any other way to change the MAC? It does not need to be permanent (for now)..
OTOH, how can I get more information on wifi operation to see why it does not work?
Hello guys
so i got openvpn and installed it and everything but somehow when i click the .ovpn file it doesn't work, it doesn't put a tick mark next to it, it says that it was granted superuser permission but nothing else happens.
so what could be the problem if anyone had this before and was able to fix it
any help would be greatly appreciated thank you in advance.
Can you post your .ovpn file? Be careful not to post anything that could compromise your privacy!
Please also post a screenshot of the 'OpenVPN Settings' App when clicking Menu -> Advanced.
Which Vpn are you using ?, when i tried using open vpn on mine it didnt work, The vpn provider told me to set it up through the vpn settings in the phone itself and that worked fine for me, could be worth a try
Thaw.Bytes said:
Which Vpn are you using ?, when i tried using open vpn on mine it didnt work, The vpn provider told me to set it up through the vpn settings in the phone itself and that worked fine for me, could be worth a try
Click to expand...
Click to collapse
He is using OpenVPN, not "part of the phone".
Ahhh sorry my mistake i misread his post
Sorry for the delay in replying, but here are 2 images of the settings but i don't think the .ovpn files has any issues i think its only the phone or openvpn itself.
Well, if you think your .ovpn file is fine and certificate(s) and key(s) are at correct locations then you should take a look at the log.
To do this use 'adb' with the 'logcat' command. As soon as 'logcat' is running try to tick your OpenVPN configuration and check the log for any errors.
This is what I get when the status bar asks me to enter the certificate password (did some manual formatting for better reading ):
Code:
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPNTEST.ovpn]-mgmt(12164): attach(): using management port at 27460
E/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPNTEST.ovpn]-mgmt(12164): attaching to OpenVPN daemon: failed to connect to /127.0.0.1 (port 27460): connect failed: ECONN REFUSED (Connection refused)
W/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPNTEST.ovpn](12164): start(): choosing random port for management interface: 39157
[B]D/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPNTEST.ovpn]-daemon(12164): invoking external process: /system/xbin/su[/B]
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPNTEST.ovpn]-daemon(12164): invoking command line: /system/xbin/openvpn --cd '/sdcard/openvpn' --config 'VPNTEST.ovpn' --writepid '/data/data/de.schaeuffelhut.android.openvpn/files/com.d/_sdcard_openvpn_VPNTEST.ovpn-pid' --script-security 1 --management 127.0.0.1 39157 --management-query -passwords --verb 3
D/OpenVPNDaemonEnabler(12164): Received OpenVPN daemon state changed from Unknown to Startup
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPNTEST.ovpn]-daemon-stdout(12164): Mon Apr 30 16:22:11 2012 OpenVPN 2.1.1 i686-pc-linux-gnu [SSL] [LZO2] [EPOLL] built on Jan 6 2012
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPNTEST.ovpn]-daemon-stdout(12164): Mon Apr 30 16:22:11 2012 MANAGEMENT: TCP Socket listening on 127.0.0.1:39157
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPNTEST.ovpn]-daemon-stdout(12164): Mon Apr 30 16:22:11 2012 WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info.
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPNTEST.ovpn]-daemon-stdout(12164): Mon Apr 30 16:22:11 2012 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
[B]D/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPNTEST.ovpn]-daemon-stdout(12164): Mon Apr 30 16:22:11 2012 Need password(s) from management interface, waiting...[/B]
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPNTEST.ovpn]-mgmt(12164): started
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPNTEST.ovpn]-mgmt(12164): attach(): using management port at 39157
V/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPNTEST.ovpn]-mgmt(12164): Successfully attached to OpenVPN monitor port
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPNTEST.ovpn]-daemon-stdout(12164): Mon Apr 30 16:22:11 2012 MANAGEMENT: Client connected from 127.0.0.1:39157
V/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPNTEST.ovpn]-mgmt(12164): Socket IO established
D/OpenVPNDaemonEnabler(12164): Received OpenVPN daemon state changed from Unknown to Enabled
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPNTEST.ovpn]-mgmt(12164): >INFO:OpenVPN Management Interface Version 1 -- type 'help' for more info
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPNTEST.ovpn]-daemon-stdout(12164): Mon Apr 30 16:22:11 2012 MANAGEMENT: CMD 'state'
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPNTEST.ovpn]-daemon-stdout(12164): Mon Apr 30 16:22:11 2012 MANAGEMENT: CMD 'state on'
D/OpenVPNDaemonEnabler(12164): Received OpenVPN network state changed from Unknown to Connecting
V/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPNTEST.ovpn]-mgmt(12164): onState("1335795731,CONNECTING,,,")
D/OpenVPN-Settings-getprop(12164): invoking external process: /system/bin/sh
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPNTEST.ovpn]-daemon-stdout(12164): Mon Apr 30 16:22:12 2012 MANAGEMENT: CMD 'bytecount 0'
D/OpenVPN-Settings-getprop(12164): invoking command line: getprop net.dnschange
D/OpenVPN-Settings-getprop-stdout(12164): 66
I/OpenVPN-Settings-getprop-stdout(12164): terminated
I/OpenVPN-Settings-getprop-stderr(12164): terminated
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPNTEST.ovpn]-mgmt(12164): =============> 0 == 66 resetting dns, leaving dns alone
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPNTEST.ovpn]-mgmt(12164): SUCCESS: real-time state notification set to ON
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPNTEST.ovpn]-mgmt(12164): SUCCESS: bytecount interval changed
D/OpenVPNDaemonEnabler(12164): Received OpenVPN network state changed from Connecting to Connecting
Note: OpenVPN is waiting here for the password. I did not enter it yet.
From what you said you do not even reach this 'checkpoint' so for now there is no need to debug any further.
This is what i get:
Code:
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPN-Server.ovpn]-mgmt(30883
): attach(): using management port at 24475
E/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPN-Server.ovpn]-mgmt(30883
): attaching to OpenVPN daemon: /127.0.0.1:24475 - Connection refused
W/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPN-Server.ovpn](30883): st
art(): choosing random port for management interface: 41258
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPN-Server.ovpn]-daemon(308
83): invoking external process: /system/bin/su
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPN-Server.ovpn]-daemon(308
83): invoking command line: /system/xbin/openvpn --cd '/sdcard/openvpn' --config
'VPN-Server.ovpn' --writepid '/data/data/de.schaeuffelhut.android.
openvpn/files/com.d/_sdcard_openvpn_VPN-Server.ovpn-pid' --script-
security 1 --management 127.0.0.1 41258 --management-query-passwords --verb 3
E/su (31797): sudb - Opening database
E/su (31797): sudb - Database opened
E/su (31797): sudb - Database closed
D/su (31797): 10198 de.schaeuffelhut.android.openvpn executing 0 /system/bi
n/sh using shell /system/bin/sh : sh
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPN-Server.ovpn]-daemon-std
out(30883): Options error: Unrecognized option or missing parameter(s) in VPN-Server.ovpn:12: dhcp-renew (2.1.1)
D/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPN-Server.ovpn]-daemon-std
out(30883): Use --help for more information.
I/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPN-Server.ovpn]-daemon-std
out(30883): terminated
I/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPN-Server.ovpn]-daemon-std
err(30883): terminated
D/OpenVPn Settings(30883): Closing log file /sdcard/openvpn/VPN-Ser
ver.log
I/WindowManager( 1650): CREATE SURFACE Surface(name=Toast, identity=1061, mNat
iveSurface=0) IN SESSION [email protected]: pid=30916 format=
-3 flags=0x0 / Window{40555140 Toast paused=false}
D/PowerManagerService( 1650): acquireWakeLock flags=0xa tag=KEEP_SCREEN_ON_FLAG
uid=1000 pid=1650 myUID=1000 myPID=1650 myTID=1845
D/OpenVPNDaemonEnabler(30883): Received OpenVPN daemon state changed from Unknow
n to Startup
D/OpenVPNDaemonEnabler(30883): Received OpenVPN daemon state changed from Unknow
n to Disabled
thank you
Seems to be a problem with root. From your log:
Code:
E/su (31797): sudb - Opening database
E/su (31797): sudb - Database opened
E/su (31797): sudb - Database closed
If I'm not mistake OpenVPN must be executed as superuser. From my log:
Code:
[B][COLOR="SeaGreen"]D/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPNTEST.ovpn]-daemon(12164): invoking external process: /system/xbin/su
[/COLOR][/B]D/OpenVPN-DaemonMonitor[/sdcard/openvpn/VPNTEST.ovpn]-daemon(12164): invoking command line: /system/xbin/openvpn --cd '/sdcard/openvpn' --config 'VPNTEST.ovpn' --writepid '/data/data/de.schaeuffelhut.android.openvpn/files/com.d/_sdcard_openvpn_VPNTEST.ovpn-pid' --script-security 1 --management 127.0.0.1 39157 --management-query -passwords --verb 3
Look at the green bold line: it is running su, only afterwards OpenVPN is invoked.
From your log (same location as in mine) I can see that there is a problem with root access.
To test this you can use 'adb' and the 'shell' command. Enter 'su' yourself to get root access. Then enter the command line from your log. I bet if 'su' succeeds, i.e. you get root access, then OpenVPN will start .
I'm sorry if this seems stupid but what exactly i should enter from my log
i got to the part where it says
su
#
but i just need to know what exactly should i enter afterwards
thank you so much
No, not stupid, I was just going way too fast. If one does not understand an explanation this is usually due to the explanation not being accurate, in short: my mistake
It took me some time but I think I found a better way to examine your problem.
First we need an alternative possibility to enter the password of the key file when starting OpenVPN manually from the adb console. OpenVPN is supposed to ask for the password on stdin if started with option '--askpass' without any file to lookup passwords. Though this dos not work on my phone, hence I have created a file name 'test.passwd' containing only one line with my OpenVPN key password. This file must be located in the same directory as the 'ovpn' file.
When your done with this you are ready to start OpenVPN 'manually' by doing this:
1) run 'adb shell'
2) type 'su'
3) type 'whoami' and make sure you are root (userid 0)
4) type
Code:
/system/xbin/openvpn --cd '/sdcard/openvpn' --config VPN-Server.ovpn --askpass test.passwd
Assuming you named the file holding your password 'test.passwd'
OpenVPN should now connect to your server and you should see something similar to this:
Code:
Tue May 1 10:55:03 2012 OpenVPN 2.1.1 i686-pc-linux-gnu [SSL] [LZO2] [EPOLL] built on Jan 6 2012
Tue May 1 10:55:03 2012 WARNING: file 'test.passwd' is group or others accessible
Tue May 1 10:55:03 2012 WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info.
Tue May 1 10:55:03 2012 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Tue May 1 10:55:03 2012 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Tue May 1 10:55:03 2012 WARNING: file './[email protected]_one_cares.p12' is group or others accessible
Tue May 1 10:55:03 2012 LZO compression initialized
Tue May 1 10:55:03 2012 UDPv4 link local: [undef]
Tue May 1 10:55:03 2012 UDPv4 link remote: xxx.yyy.zzzz.wwww:1194
Tue May 1 10:55:04 2012 [openvpn.myvpn.server] Peer Connection Initiated with xxx.yyy.zzzz.wwww:1194
Tue May 1 10:55:06 2012 TUN/TAP device tun0 opened
Tue May 1 10:55:06 2012 /system/bin/ifconfig tun0 192.168.101.6 pointopoint 192.168.101.5 mtu 1500
Tue May 1 10:55:06 2012 Initialization Sequence Completed
At this point you should invoke another 'adb shell' and type 'busybox ifconfig'. If you see a tun0 device then the OpenVPN connection is established.
On my system this looks like this:
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:171 errors:0 dropped:0 overruns:0 frame:0
TX packets:171 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:11713 (11.4 KiB) TX bytes:11713 (11.4 KiB)
[B]tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:192.168.101.6 P-t-P:192.168.101.5 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)[/B]
wlan0 Link encap:Ethernet HWaddr 12:34:56:78:9A:BC
inet addr:xyz.vw.11.32 Bcast:xyz.vw.11.255 Mask:255.255.255.0
inet6 addr: f370::6sd6:f891:fz8e:9qqb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8185 errors:0 dropped:271 overruns:0 frame:0
TX packets:9578 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2058632 (1.9 MiB) TX bytes:1000224 (976.7 KiB)
If not check the output of the other shell, it will tell you about where to search for the problem (hopefully ).
Unfortunately this didn't work, i get this when i enter that command
Code:
Options error: Unrecognized option or missing parameter(s) in VPN-S
erver.ovpn:12: dhcp-renew (2.1.1)
Use --help for more information.
and when i do the 'whoami' command i get this
Code:
whoami: unknown uid 0
but I think the password is not the issue because when I click on the server to open it in openvpn( put a tick next to it) it doesn't put a tick it doesn't even reach the password point i think its an issue much earlier than the password point.
I just get the superuser message 'OpenVPN Settings has been granted superuser permissions' and nothing else happens at all.
I can tick/start the main button on the top 'OpenVPN' but I can't start the server.
just to note that i used doom lord rooting tool kit version 4 to root the phone if the issue is root related or something.
Thank you again.
xdaian948 said:
Unfortunately this didn't work, i get this when i enter that command
Code:
Options error: Unrecognized option or missing parameter(s) in VPN-S
erver.ovpn:12: dhcp-renew (2.1.1)
Use --help for more information.
Click to expand...
Click to collapse
As I said in my very first post: please provide the contents of your .ovpn file. Even if you believe it is correct it seems to contain options that do not work, as stated by the error message!
and when i do the 'whoami' command i get this
Code:
whoami: unknown uid 0
Click to expand...
Click to collapse
This is fine, you are root.
but I think the password is not the issue because when I click on the server to open it in openvpn( put a tick next to it) it doesn't put a tick it doesn't even reach the password point i think its an issue much earlier than the password point.
Click to expand...
Click to collapse
I did not say (and to tell the truth I don't believe) it is a problem with the password since, as I described in my last post, you do not even reach the point where OpenVPN could ask you for the password.
I just get the superuser message 'OpenVPN Settings has been granted superuser permissions' and nothing else happens at all.
I can tick/start the main button on the top 'OpenVPN' but I can't start the server.
Click to expand...
Click to collapse
The method I proposed for debugging boils things down to the bare minimum and therefore reduces the chance of any other misconfiguration then the one of OpenVPN. You better don't use the 'graphical interface' until OpenVPN runs fine from the command line.
just to note that i used doom lord rooting tool kit version 4 to root the phone if the issue is root related or something.
Click to expand...
Click to collapse
Don't know what this is but sounds cool , anyway it seems rooting is ok.
Thank you again.
Click to expand...
Click to collapse
You are welcome, but please consider that your .ovpn configuration file could have an error. The error reported in your log is due to a misconfiguration in your .ovpn file I believe. This is why OpenVPN exits.
Alright i'll send you the .ovpn files in a PM now
Thank you.
this is the rooting method i was talking about btw
Code:
http://forum.xda-developers.com/showthread.php?t=1321582
Ok, got your files by PM.
Besides the remote destination you would connect to and perhaps the names of the certificate and key file there is no security relevant information you could not post here I think.
Anyway: the files look like you are connecting to a VPN server that is not your server, i.e. you have no control of the OpenVPN server, correct? In this case I can't really help you, you should ask the VPN provider.
If the VPN server was your own server I would have suggested to radically comment options until you manage to establish a basic connection. Your log clearly shows that there seems to be problem with the option 'dhcp-renew' but as you are not running the VPN server I do not know if you can comment this or any other option, sorry .
My .ovpn file looks like this:
Code:
; OpenVPN client configuration for
; access to xyz enterprise
;
client
dev tun
proto udp
remote xxx.yyy.zzz.www 1194
nobind
comp-lzo
pkcs12 ./p12_ca_cert_private_cert_and_key_bundle.p12
verb 1
This configuration works perfect including routing and DNS resolution by the internal DNS servers of xyz enterprise.
You can try to eliminate (comment) options in your .ovpn file yourself hoping you get a result having no offending option left, but this might be tedious without knowledge of the server end . If you try this please note that your configuration uses 3 individual files, one for the CA cert, one for your cert and one for the key while my configuration uses only one file (certs and key bundled). You must keep your 'three file' configuration.
Well, i'll just ask the support of the VPN provider and see what they can do there might be a problem on their end, and i want to thank you so much for everything you have done
Hi,
The goal of my project is to implement mobile ad-hoc network routing protocol(AODV).
My problem is that I need to reconfigure the wireless driver/adapter to be able to work in ad-hoc mode. This means receiving packets from other nodes and resending packets if 2 nodes which want to communicate are far away from each other.
I don't have experience with drivers changing and I'm noob in Linux.
For better imagination, I've got source code for the Nexus One and HTC Hero and this code should be able to change wireless drivers configuration on these devices.
Here's the code for Nexus One:
Code:
case 0: //NEXSUS
system("insmod /system/lib/modules/bcm4329.ko");
snprintf(cmd, sizeof cmd, "ifconfig eth0 %s netmask 255.255.255.0", ip);
printf("\ncmd: %s\n", cmd);
system(cmd);
system("ifconfig eth0 up");
system("iwconfig eth0 mode ad-hoc");
system("iwconfig eth0 essid nexusbac");
system("iwconfig eth0 channel 6");
system("iwconfig eth0 commit");
break;
And here for the HTC Hero
Code:
system("insmod /system/lib/modules/wlan.ko");
system("wlan_loader -f /system/etc/wifi/Fw1251r1c.bin -e /proc/calibration -i /data/local/bin/tiwlan.ini");
snprintf(cmd, sizeof cmd, "ifconfig tiwlan0 %s netmask 255.255.255.0", ip);
system(cmd);
system("ifconfig tiwlan0 up");
break;
I was wondering if you could give me some advice what commands to use.
My Sony Xperia P is Rooted and I'm using Honami Moonwalker V8 ROM.
It seems that command ifconfig is not working. If I try to execute e.g
Code:
ifconfig eth0 up
android shell throws this error:
ifconfig eth0 up
error: SIOCGIFFLAGS (No such device)
Thank you for your answers. I really appreciate the time you give to this thread.
Try wlan0
ChikeD said:
Try wlan0
Click to expand...
Click to collapse
thanks ChikeD, it seems that wlan0 works fine for ifconfig but it seems that iwconfig binary is missing. Are there any alternatives for this shell command in Android?
I tried to use iwconfig binary from Android tethering project but using it throws an error like this:
Code:
[email protected]:/ # iwconfig wlan0 essid xperiaP
SET failed on device wlan0; Invalid argument
Ageiris said:
thanks ChikeD, it seems that wlan0 works fine for ifconfig but it seems that iwconfig binary is missing. Are there any alternatives for this shell command in Android?
I tried to use iwconfig binary from Android tethering project but using it throws an error like this:
Code:
[email protected]:/ # iwconfig wlan0 essid xperiaP
SET failed on device wlan0; Invalid argument
Click to expand...
Click to collapse
There is iw binary see what you can make out of that.
ChikeD said:
There is iw binary see what you can make out of that.
Click to expand...
Click to collapse
Thanks, this looks very interesting. I'll give some feedback later if I manage to make it work
Ageiris said:
Thanks, this looks very interesting. I'll give some feedback later if I manage to make it work
Click to expand...
Click to collapse
You changing the driver source?
ChikeD said:
You changing the driver source?
Click to expand...
Click to collapse
I just need to make it work in the ad-hoc mode. If think it's an IBSS mode. I just need to figure out, how to setup this type of connection
Ageiris said:
I just need to make it work in the ad-hoc mode. If think it's an IBSS mode. I just need to figure out, how to setup this type of connection
Click to expand...
Click to collapse
Assuming(thinking) is not an option.
From a brief look at the sources it seems the ad-hoc is not implemented.
ChikeD said:
Assuming(thinking) is not an option.
From a brief look at the sources it seems the ad-hoc is not implemented.
Click to expand...
Click to collapse
Sorry for delay.
So you don't consider an IBSS mode as a true ad-hoc mode? Am I right? I thought that IBSS is like a synonym of the term "ad-hoc"
According to this website: http://en.kioskea.net/contents/804-wifi-modes-of-operation-802-11-or-wi-fi
It should be the same.
To my problem. I've made this commands to work:
Code:
/*Bring the interface up (an additional step like rfkill unblock wifi might be needed: ip link set wlan0 up*/
system("iw dev wlan0 set type ibss"); //Set the operation mode to ibss ):
system("iw dev wlan0 ibss join MyAdHocNetwork 2412") //frequency for channel 6: 2437, 2412 for channel 1...
system("ip addr add 192.168.1.2/24 broadcast 192.168.1.255 dev wlan0");
system("ip route add default via 192.168.1.1");
What do you think?
Thanks
Seems so, does it work?
ChikeD said:
Seems so, does it work?
Click to expand...
Click to collapse
I don't know yet. I seems that everything is set up. Now I need to buy at least another xperia p or similar smartphone to test communication.
I am now trying to run ad-hoc mode on HTC Desire and Tablet Prestigio Multipad 3270b. But it's pain, because they don't have iwconfig and iw binaries.
Ageiris said:
I don't know yet. I seems that everything is set up. Now I need to buy at least another xperia p or similar smartphone to test communication.
I am now trying to run ad-hoc mode on HTC Desire and Tablet Prestigio Multipad 3270b. But it's pain, because they don't have iwconfig and iw binaries.
Click to expand...
Click to collapse
So what is the purpose of this?
Doesn't have to be a smartphone, you can do it with a wireless pc/laptop
http://windows.microsoft.com/en-us/windows/set-computer-to-computer-adhoc-network#1TC=windows-7
http://www.tp-link.com/en/article/?id=219
ChikeD said:
So what is the purpose of this?
Doesn't have to be a smartphone, you can do it with a wireless pc/laptop
http://windows.microsoft.com/en-us/windows/set-computer-to-computer-adhoc-network#1TC=windows-7
http://www.tp-link.com/en/article/?id=219
Click to expand...
Click to collapse
Thanks for the links. The goal of my project is to run ad-hoc mode on android. I will definitely test this later using windows but I am running out of time, so I'm focusing mainly to at least changing wireless mode from managed to ad-hoc. That's the most difficult thing because right now I am not able to change wireless mode on HTC and Prestigio using linux system commands. Maybe there is a way to change wireless mode programmatically (Java or C) but I haven't found that information yet.
Dear all
i'm trying to enable rndis communication between a tablet running Android 4.4.2 KOT49H rooted.
in the setting menu i'm not able to find any tethering option, so i've uploaded the script usb_tether_start.sh found here:
https://forum.xda-developers.com/showthread.php?t=2127850
After the start of the service, on andorid side i see that the rndis0 device is created and is up:
13: rndis0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether a2:63:00:89:3d:46 brd ff:ff:ff:ff:ff:ff
inet 192.168.2.1/24 scope global rndis0
inet6 fe80::a063:ff:fe89:3d46/64 scope link
valid_lft forever preferred_lft forever
Click to expand...
Click to collapse
On the laptop side (running ubunto 14.0.4 LTS) the device is created too
dmes:
[ 8643.359537] usb 3-1: new high-speed USB device number 10 using xhci_hcd
[ 8643.495555] usb 3-1: New USB device found, idVendor=10d6, idProduct=4d02
[ 8643.495564] usb 3-1: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[ 8643.495568] usb 3-1: Product: P706
[ 8643.495571] usb 3-1: Manufacturer: P706
[ 8643.495575] usb 3-1: SerialNumber: A03B610405C78BB9
[ 8643.512630] rndis_host 3-1:1.0 usb0: register 'rndis_host' at usb-0000:45:00.0-1, RNDIS device, 32:ff:48:ea:0c:df
Click to expand...
Click to collapse
and ifconfig usb0 reports the device:
# ifconfig usb0
usb0 Link encap:Ethernet IndirizzoHW 32:ff:48:ea:0c:df
indirizzo inet:192.168.2.3 Bcast:192.168.2.255 Maschera:255.255.255.0
indirizzo inet6: fe80::30ff:48ff:feea:cdf/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:252 errors:0 dropped:0 overruns:0 carrier:0
collisioni:0 txqueuelen:1000
Byte RX:552 (552.0 B) Byte TX:40689 (40.6 KB)
Click to expand...
Click to collapse
I also see some TX/RX bytes but the ping or any other kind of communication between the laptop and the tablet isnt' working, i've tried both static ip configuration and request via dhcp client on laptop side (the dhcp request on the laptop hangs...)
Any idea or help?
Thanks to all in advance