[SOLVED] How to connect to an Ad-Hoc (IBSS) network? - Nexus S Q&A, Help & Troubleshooting

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

Related

VPN Connections (Cisco VPNC GUI) for BusyBox 1.17.1+

EDIT: The Problem with the "ps" command described below only happens with "newer" Versions of BusyBox. The modified Version works with BusyBox 1.17.1 (confirmed) and most likely with 1.17.0 since they changed "ps" in 1.17.0 (quote from changelog: "ps: fix non-DESKTOP option handling code"). If you have installed an older Version of BusyBox or an older Version is included in your ROM you can get "VPNC Connections" from the market or the developer page. The market Version works with Busybox 1.16 (confirmed) and maybe with older Versions. If you run the original Program or my modified apk with a other Version of Busybox than 1.17.1 or 1.16 it would be nice if you tell me which version works so i can update this posting.
(To check your "BusyBox" Version use adb (command: adb shell busybox) or a Terminal emulator (command: busybox) )
Original posting:
Hey,
First of all i hope its right to post this here and not in "Themes and App" forum. Since i modified the VPN Connections App to work with LeeDroid ROM i think this should be the right subforum since it is a ROM specific APP.
"Prolog"
After messing around with the "VPN Connection app" (get-a-robot-vpnc) i got it working with LeeDroid 2.1/2.1a Rom by editing some code. Since i have almost no idea of coding i'll tell what i modfied (i took some code from the Issue List of google code of get-a-robot-vpnc).
But First:
Min Requirement:
-HTC Desire (rooted)
-LeeDroid 2.1/2.1a ROM
-Knowing what you are doing!
---or----
FroYo Rom with:
-HTC Desire (rooted)
-Busybox (Same Version as in LeeDroid)
-tun.ko (same Version as in LeeDroid)
-Knowing what you are doing!
Why did you edit the code?
1. The App didn't recognize a working connection. After connecting the app tells you that the connection failed, although the vpnc process is running. This is because the "ps" Version of busybox (the one coming with LeeDroid - dont know which version this is atm) isnt compatible with the 0.99 release of VPN connections. (Compare to Issue 122 ) The app checks a working connection with this command:
Code:
ps | grep 'vpnc$'
If i try this though adb shell i dont get any output even if vnc is running. But by using this:
Code:
ps | grep '[v]pnc --script'
I get an output like this (PID might be different):
Code:
6727 0 0:00 /data/data/org.codeandroid.vpnc_frontend/files/vpnc --script /data/data/org.codeandroid.vpnc_frontend/files/vpnc-script --no-detach
After editing this part of the code the app recognizes the working connection correctly.
2. Even if vpnc is running properly i still didn't get the IP of the VPN Network (checked with "http://www.whatismyip.com"). This has something to do with IP Tables. After i used this command in "adb shell" (as mentioned inIssue 114, Issue 124 and the LeeDroid Rom thread):
Code:
su
ip ru del table wifi
i got the ip of my Network.
So i changed the vpnc-script coming with the svn revision 140 to this: http://code.google.com/p/get-a-robo...script&token=69c1649b4f4dfa8358813b317d7eda24
I dont knwo if this is still a problem with the ip tables fix for OpenVPN coming with LeeDroid 2.1a (or with the MOD for 2.1) since i didn't try it with that. The modified code works with or without the mod for wifi and gprs so there was no need for me to try it without the changes.
Exact Steps of how i edited the code
As I said i can't code (at least i understand the "ps | grep" command ) and i didnt work with Eclipse or the SDK before (i only used the adb tool). All i did was to include availaible code from the Issue list and created an apk. You can do this yourself following the steps.
1. Have a working Eclipse (mine is 3.5) with SDK Tools for Android and "Google APIs Plattform 2.2 API Level 8). Check here how to install.
2. Download the svn from here
3. Open (svn root dir)/packages/apps/get-a-robot-vpn-fronted/ with eclipse. Do this by making a "New Android Project" and select "create project from existing source". Project name should be changed to "get-a-robot-vpn-frontend" to apply the patch.
4. If you have the following Error in the Problems you might remove it (worked fine for me):
Code:
DialogInterface.OnClickListener(){} must override a superclass method VPNC.java /VPNC2/src/org/codeandroid/vpnc_frontend line 541 Java Problem
As I said: I have no idea of coding and since its code from the original app i just ignored this error. Some who knows what this does might wanna change it or report it to the Issue List .
5. Apply this patch (1.) or this patch (2.). Do this by rightclicking on the Project -> Team -> Apply Patch.
The first patch changes the "ps grep" AND gives you a Notification icon (if notification is enabled in the Options) for a RUNNING connection (not only for disconnects like in the original app).
The second patch only changes the "ps grep". Since its only one line of code you can edit it also by yourself.
6. Modify the "vpnc-script" (/assets/vpnc-script) accordingly to/replace with this version:
This lets the vpnc script do the "ip ru del table wifi/gprs" for you.
7. Export as apk and install it.
8. ???????
9 Profit
Other ROMS than LeeDroid.
I didn't try this (yet) with any other ROM. According to Issue 124 the "ip ru del table wifi/gprs" is an Issue with all FroYo Roms, but i have no idea about the "ps" version of busybox. You can try the following before using my vpnc.apk or building your own:
1. Get the official apk (http://code.google.com/p/get-a-robot-vpnc/downloads/list) (V 0.99) and install it.
2. Create a New VPN Connection.
3. Connect. (dosn't matter if the app tells you the connection failed)
4. Use the following command in "adb shell":
Code:
ps | grep '[v]pnc --script'
If you get an output this version should work for you. If not then the original version may already work and you arent reading this.
5. Use the following command in adb shell (for either wifi of gprs):
Code:
ip ru del table wifi
---or----
Code:
ip ru del table gprs
6. Check your IP to see you are connected through the VPN.
If you get an output in 4. and your IP is correct after doin step 5 this apk should work for you. If you dont get any output on step 4 you might wanna find out what version of "ps" your busybox is using and change the "grep" command accordingly (someone who has more idea of linux then me might be able to help you).
Epilog
I tested the App on Leedroid 2.1 and fresh installed (wipe) 2.1a and it worked as intended. If you try it on an other ROM some feedback would be nice.
Have Fun
melethron
Attachment: The App
YOU SHOULD KNOW WHAT YOU DO BY INSTALLING THIS! I GIVE NO WARRANTY! BEST WOULD BE TO BUILD THE APK YOURSELF ACCORDING TO THIS POST!
http://dl.dropbox.com/u/11091326/Android/vpnc.apk
http://rapidshare.com/files/420985331/vpnc.apk.html
Thanks alot! You saved my day because I can't use the WPA 802.1x enterprise with LeeDroid 2.1a cause HTC forgot to implement the certificate-selection-field in WiFi-settings. So I have to use the VPN server of my university.
That's awsome my friend. I was searching for something like this 3 weeks now cause i need it for my university. I works great on my Custom Rom.
The only glitch is that when in VPNconnections it has a date under my server set up, 1970 and when i connect it say failed to connect.
BUT IT IS CONNECTED even if it says failed. i tried connecting with ConnectBot, BTEP SSH Client and AndFTP and all works perfectly....
Nice job my friend!!!
ROM and "Not connected" Bug
Hey,
@soCram: What ROM do you use? If it's not LeeDroid i can update my posting to add the ROM its working with.
@lambrospower:
lambrospower said:
The only glitch is that when in VPNconnections it has a date under my server set up, 1970 and when i connect it say failed to connect.
Click to expand...
Click to collapse
Do you mean the original VPNconnections (from market or from here ) or the one that i modified and posted here? Because i had exact that problem you described with the original version. Thats the reason i applied the patch and packed the .apk new. It is (as i already said) because VPNconnections uses "ps" to check if "vpnc" is running. (Besides the other problem with the "ip ru del table wifi" stuff)
If you want that Problem to be fixed you can try the following commands in a Terminal (either use "Terminal Emulator" or "Connect Bot") after starting the conncetion:
1.:
Code:
ps | grep 'vpnc$'
2.:
Code:
ps | grep '[v]pnc --script'
You should get an output on one of these 2 commands. The output should look like this (1. Number might be different):
Code:
1234 0 0:00 /data/data/org.codeandroid.vpnc_frontend/files/vpnc --script /data/data/org.codeandroid.vpnc_frontend/files/vpnc-script --no-detach /
1. If the 1. command works for you, then get the original version from here or from the market:
{
"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"
}
2. If the 2. command works then the patched version in this thread should work.
3. If you get an output like this:
Code:
sh: ps: command not found
...then you don't have "busybox" and need to install it (don't know how since LeeDroid has it included)
4. Well and if the 1. command works and the original programm is telling you are connected but it doesn't work then it might be because of the ip tables. Then try this (also after you are connected):
for wifi
Code:
ip ru del table wifi
for gprs:
Code:
ip ru del table gprs
If it works then i might pack you a new .apk with the "ip ru ..." fix but without the "ps" patch.
If you have questions go on and ask. It shouldn't be that hard to get it to work proberly, since the bug is only the method "VPNconnection" is using to check if "vpnc" is running.
I can't "code" and im no "pro" but at least i know some "basic shell commands" and can edit that simple part of the code and pack *.apk new, so we might to get i run properly for you.
Btw: Credit for the Programm goes to wmealing and babak.mozaffari. Credit for the "ps patch" goes to nikolas.pooch. All I did was to apply the patch to the code and build the .apk new since the devs don't work on the programm for quite some time and didn't fix the reported issues.
kind regards
melethron
i downloaded the attached vpnc.apk
i get a message with 1...
6829 root 1300 S /data/data.org.codeandroid.vpnc_frontend/files/vpnc
edit: i downloaded the file from code.google and it worked wonders
but what is the
VPN connection
and what VPN Network
my university vpn works when i have both enabled or deisabled the VPN connection.
and with VPN Network connected
Vpnc script
Hey lambrospower
lambrospower said:
i downloaded the attached vpnc.apk
i get a message with 1...
6829 root 1300 S /data/data.org.codeandroid.vpnc_frontend/files/vpnc
Click to expand...
Click to collapse
Ok, then you have a different version of "ps" from your busybox version. Then you don't need to use my modified vpnc.apk. Do the following to fix it:
1. Uninstall my apk.
2. Get the one from the market or the google code page (links/QR in the posting above)
3. Connect (it should tell you now that you are connected, since the original version uses the first "ps grep" command to check the connection)
If everything works fine you are done.
If not and "VPNConnections" tells you that you are connected but the IP doesn't change and you can't use the stuff you need to do with vpn then it's a problem with the ip table (i think this is a general problem with froyo ROMS that is also happening with openvpn but i don't know for sure). To fix this do the following:
4. In terminal
Code:
su
then for wifi:
Code:
ip ru del table wifi
or for gprs
Code:
ip ru del table wifi
if your connection works fine after that command you should replace the vpnc script file:
5. Get the vpnc-script file from here.
6. Push this file with adb to:
Code:
/data/data/org.codeandroid.vpnc_frontend/files/vpnc-script
This includes the "ip ru del table wifi/gprs" command in the script so it updates your ip table when you connect and disconnect.
I will update my first posting these days and build a new .apk with only the changes to the vpnc-script file and without the patch that fixes the "ps" issue with some "busybox" versions. I don't have much time atm. So just follow the steps above and it should work.
kind regards
melethron
Edit:
lambrospower said:
edit: i downloaded the file from code.google and it worked wonders
Click to expand...
Click to collapse
Ok. But thats a bit strange since i thought that every froyo ROM has the "ip table" issue. Does your ROM include the "ip table fix" for OpenVPN? Does it disconnect proberly?
lambrospower said:
but what is the
VPN connection
and what VPN Network
my university vpn works when i have both enabled or deisabled the VPN connection.
and with VPN Network connected
Click to expand...
Click to collapse
I just disabled it and i also still can connect. As i said it's not my program and i can't code so i don't really know what it does and if this a bug. I think the devs aren't really active and fix know bugs....
well it's not a bug. I think that VPN Connection is something different than just connecting to the network.
You can disconnect by the vpn network just fine if you just click and hold your network name and choose disconnect. Its the vpn connection setting that i dunno what it is
@lambrospower
I had some issues with "sh" and Samba Server in Lee's Rom (not Lee's fault - i replaced the sh of busybox with the sh in /system/bin). That's why i looked again in the Issue with the "ps" command. The reason the original Version (market/google code) of VPNC Connections works for you is that you use an outdated Version of BusyBox in your Rom (27 January 2010 -- BusyBox 1.16.0 (unstable)) while Lees ROM uses a newer Version (25 July 2010 -- BusyBox 1.17.1 (stable)) (see: busybox.net) .
2 melethron:
Thakns, VPN IPSEC works on Desire like charm with your version of vnpc.apk.

[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?

[TOOL] SSH Tethering (no root required)

A few days ago I read about the great Koushik Dutta's ClockworkMod Tether and now, with the last release of SSHDroid (1.9.4+ is required), I want to provide you another alternative to CWM that doesn't require root too: SSH Tethering !
As you probably know, we can use (generally speaking) SSH tunneling to provide a SOCKS proxy for ours application (more info here at the "dynamic port forwarding" paragraph) so, if we could use SSHDroid in this way, we would have a ready to use proxy for "tethering" like the CWM's one!
Advantages:
Doesn't require a separate tethering plan
Not blockable or detectable by carriers
Doesn't require root
Doesn't require to install additional software on your PC
Requirements:
Device drivers installed (99% of you "should" already have that , this is out of the scope of this thread)
SSHDroid or SSHDroidPro (the pro version is not required)
There is no need to write any additional software since we already have all the tools (on all platforms) required to accomplish the job: please note that you don't need to enable USB/WiFi tethering on your device for making this work!
I already packed a ready to use version with all the tools required (Windows only by now), here it is:
SSH Tethering
SSH Tethering + Preconfigured Firefox
Steps:
Extract one of the above packages
Connect your device to the PC with USB
Start SSHDroid on your device (the preconfigured packages assume that you haven't changed the default port): please note that you probably need to disable the option "Require WiFi" in this circumstance.
Open the package directory on your PC and double click on "run_root.bat" or "run.bat" (depending if SSHDroid is running with root privilegies or not)
Wait that the console window disappers and enter the password in putty ('admin' is the default one) once required.
Ready! The proxy is active (the shipped version of putty can be iconized in the tray): you only need to configure an app of your choice for using it (if you are using the "SSH Tethering + Preconfigured Firefox" package, Firefox should automatically start and you can already use it!)
An advanced guide (in particular for Linux and Mac users) will come shortly!
I just wanted to say thank you for putting this together. I've tried this on windows vista and it worked great. Very easy. I'm wondering how I can use this to connect winamp for shoutcast streaming.
Hi can you reupload the one with pre-configured firefox? The multiuploader links no longer work. Thanks.
NguyenHuu said:
Hi can you reupload the one with pre-configured firefox? The multiuploader links no longer work. Thanks.
Click to expand...
Click to collapse
Sorry for the delay, links updated
P.S.: I hadn't the time to write a good guide yet sorry...
Strange, the multiupload links still are bad. It does't load. Can you upload to another file host or directly into xda attachment?
NguyenHuu said:
Strange, the multiupload links still are bad. It does't load. Can you upload to another file host or directly into xda attachment?
Click to expand...
Click to collapse
Links are working here, dunno why aren't for you
I attached the "lite" version in the main topic since the firefox one is too big..
Thanks! Maybe it is blocked in my country (USA). I downloaded the lite version and will try it.
EDIT: When you have time can you provide instructions to configure firefox so we can use our existing firefox install instead of the portable version? thanks!!
NguyenHuu said:
Thanks! Maybe it is blocked in my country (USA). I downloaded the lite version and will try it.
EDIT: When you have time can you provide instructions to configure firefox so we can use our existing firefox install instead of the portable version? thanks!!
Click to expand...
Click to collapse
It's very easy: just set the network configuration with "manual proxy" and socks host = 127.0.0.1, port = 5080.
Here it is what you should get:
{
"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"
}
Hope it helps
Thank you, will test it soon.
Also, set your network.proxy.socks_remote_dns to true in firefox. Do this by using about:config.
Thanks. Do any of you know of an easy way to toggle back and forth between these settings in cases where we are at home for example and have real connection and then when we are on the road we can tether?
berserker_devel said:
An advanced guide (in particular for Linux and Mac users) will come shortly!
Click to expand...
Click to collapse
Hey man I really appreciate you doing this but I have some questions.
could you use ssh -L 5080:[email protected]:22 [email protected] to set up a http proxy?
I'm trying to tether my unrooted acer tablet to my rooted evo and I'm running into two issues:
1. no loopback device support in my tablet. It's blocked due to no root access I think...I think.
2. no ssh -D support using terminal in lubuntu 12.04. Although I think I can solve this by adding the openssh package.
Again, thanks so much for this.
---------- Post added at 03:18 AM ---------- Previous post was at 03:17 AM ----------
NguyenHuu said:
Thanks. Do any of you know of an easy way to toggle back and forth between these settings in cases where we are at home for example and have real connection and then when we are on the road we can tether?
Click to expand...
Click to collapse
I know in google chrome you can get proxy switchy! or any proxy switch. Then just click it in the upper right corner. I'm sure firefox has the same add on.
pwhitersxs said:
Hey man I really appreciate you doing this but I have some questions.
could you use ssh -L 5080:[email protected]:22 [email protected] to set up a http proxy?
I'm trying to tether my unrooted acer tablet to my rooted evo and I'm running into two issues:
1. no loopback device support in my tablet. It's blocked due to no root access I think...I think.
2. no ssh -D support using terminal in lubuntu 12.04. Although I think I can solve this by adding the openssh package.
Again, thanks so much for this.
---------- Post added at 03:18 AM ---------- Previous post was at 03:17 AM ----------
I know in google chrome you can get proxy switchy! or any proxy switch. Then just click it in the upper right corner. I'm sure firefox has the same add on.
Click to expand...
Click to collapse
Awesome, will try!
NguyenHuu said:
Awesome, will try!
Click to expand...
Click to collapse
Anytime! Make sure you reply with the results to help others!
I'd like to keep this thread going and get more advanced ssh techniques and information.
pwhitersxs said:
Also, set your network.proxy.socks_remote_dns to true in firefox. Do this by using about:config.
Click to expand...
Click to collapse
Good point pwhitersxs! I forgot to mention that the preconfigured Firefox package has that option set to true
I'm having a hard time getting my evo to ' ssh [email protected]' in lubuntu 12.04. Keep getting permission denied. I tried sudo -i or -s to no avail.
I setup adb and did:
./adb forward tcp: 22 tcp:22
ssh [email protected]
Keep getting permission denied or access denied. Maybe I'll try to setup a key and see if that helps? I'm lost on why it won't connect. Using the package for windows, it works perfectly, just does not want to work in lubuntu.
ok, got it to work. For those who are interested in using this with any variant of ubuntu this is what I did. I'm on lubuntu.
open a terminal:
sudo -i
enter your password
now do a passwd and re-enter your password. the reason I discovered, this is what causes the access denied to localhost. Once I did this step, I no longer got access denied. You may be able to skip this if you have no problem.
now ssh [email protected] to test. enter password and it'll take you to your own computer. this is just to test. If you have a problem, make sure you have openssh and openssh server installed.
---ADB---
follow cyanogenmods guide to install adb. Once downloaded,
cd to directory
./adb*kill-server
sudo ./adb*start-server
./adb*devices
your device should show. If not, check that usb debugging is on. I had an issue with the sdk not downloading properly. Fixed with updating/installing openjdk. else, google it
Now since my ssh droid is on port 24 this is what I did.
./adb forward tcp:24 tcp:24 and forwarded ports
ssh -D 5080 [email protected] -p 24
add proxy anywhere to chrome, add your port which for me is 5080, enjoy.
---CONDENSED LIST OF COMMANDS---
sudo -i
cd /home/user/android-sdk-linux/platform-tools
./adb kill-server
sudo ./adb start-server
./adb devices
./adb forward tcp:24 tcp:24
ssh -D 5080 [email protected] -p 24
Hey,
This seems great and I'd love to use it, but when I try to run "run.bat" it says:
adb server is out of date. killing...
*deamon started successfully*
Then a putty fatal error saying:
server unexpectedly closed network connection
Can I have any help? Running a Win7 machine. Sorry for the newb question...
article
Nice work Berserker. While trying to preconfigure Firefox and mirror it for you I cranked out an article on your SSH Tethering (in addition to another on your daemon apps), check it out: mobilitydigest.com/tether-under-the-rader
Was trying to setup and run from linux, however am getting "error: cannot bind to socket" when entering the adb forward command using default port of 22, I assume due to sshd running.
Switching SSHDroidPro over to 24 per pwhitersxs's example, I am able to bind the ports, and able to run the ssh command, which essentially opens an ssh session to the phone. But am unable to browse the internet at this point (chromium proxy setup - socks 127.0.0.1:5080 as per example in thread above).
[21:48 ] > adb forward tcp:24 tcp:24
[21:48 ] > ssh -D 5080 [email protected] -p 24
SSHDroidPro
/storage/extSdCard #
Note I have key for user root so am not manually entering any password...​
EDIT - DOH nevermind... had wrong socks version selected lol. It's always the small things :banghead:
Once I selected SOCKS 5 everything worked like a champ! Well Done! :good:

[APP][2.2+][ROOT][WiFi] Reaver-GUI for Android

{
"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"
}
Reaver for Android v1.30
Reaver-WPS GUI for rooted devices with bcm4329/4330 wifi chipset or working external wifi card.
INFO:
Reaver for Android, short RfA, is a simple-to-use Reaver-GUI for Android devices with monitor-mode support.
It has some very cool features:
Detects automatically WPS-enabled routers.
All Reaver-Settings are accessible from a simple-to-use GUI.
Activates and deactivates Monitor-Mode automatically when needed.
Provides a simple way to connect when Reaver finds the WPA-Key.
External script support
Project status: PRE-FINAL
What does this mean?
There are some features which are not implemented yet.
Developement will continue very soon.​
Installation
Download/install bcmon.apk from HERE and RfA.apk from the bottom of this post. RfA may also download bcmon automatically.
Run bcmon, if it crashes try a second time.
If all runs fine, start RfA. If not, your device may be not bcmon compatible. Please see second post.
After selecting an WPS-enabled router, click on "Test Monitor-Mode".
Now you can use RfA, don't uninstall bcmon.
Steps 1 - 4 are only for the installation, they don't have to be repeated once done.
FAQ:
What is this awesome app actually usefull for?
Well, RfA is able to unveil the actual WPA(2)-Key of many routers within 2 - 10 hours.
WHAT?! I though WPA(2) is safe?
It used to be, but then many router models got WiFi Protected Setup, short WPS, implemeted, which is pretty vulnerable. (Details)
Basically it's a Brute-Force attack with Reaver against a 8 digit pin with 10^4 + 10^3 possibilities.
What is Reaver?
Reaver-WPS is a pentesting tool developed by Tactical Network Solutions.
It attacks WPS-enabled routers and after the WPS-Pin is cracked, it retrieves the actual WPA-key.
Reaver provides only a terminal interface, which is ok for notebooks etc., however it's a pain on Android devices.
Because of this I developed RfA.
Doesn't Reaver requires monitor-mode and so can't work on Android?
Yes, Reaver needs monitor-mode, but thanks to bcmon (or external wifi cards) some Android devices are now monitor-mode capable.​
bcmon compatibility
Developed and tested on: Nexus 7 2012 (Stock 4.3)
RfA *should* work on all devices with bcmon support (Broadcom bcm4329/bcm4330 chipsets)
Simply try by installing bcmon. Don't worry, if something goes wrong a simple reboot should fix everything.
For external wifi cards please see second post.
Tested & works on:
Nexus 7 2012 (Stock 4.3, Cyanogen 9)
Huawei Honour (Cyanogen Mod based ROM)
bcmon does NOT work on:
Samsung Galaxy S3/4/5
HTC One
LG G2
Nexus 4/5
Nexus 7 (2013)​
Credits & used tools:
Monitor-Mode over bcmon.apk:
Omri Ildis, Ruby Feinstein & Yuval Ofir
See: bcmon.blogspot.com
Reaver-WPS:
Tactical Network Solutions
See: code.google.com/p/reaver-wps/​
Disclaimer
Attention: Hacking of networks is illegal without having the permission of the owner! The developer is not responsible for any damage etc. this app could cause.
This software is only intended to show a big security hole, not to be able to surf in the neighbours Wifi​
XDA:DevDB Information
Reaver-GUI for Android, App for all devices (see above for details)
Contributors
SOEDI, bcmon team & Tactical Network Solutions
Version Information
Status: Stable
Current Stable Version: 1.30
Stable Release Date: 2014-07-01
Beta Release Date: 2013-11-04
Created 2013-09-24
Last Updated 2014-09-27
Second Post
If anyone has working Andorid drivers for external Wifi cards, please let me know,
If the layout looks strange on your phone, please send me a screenshot, so I can fix it
I have only a tablet and HD phone (emulator works to slow), so can't test the layout properly.
Usage of custom-scripts
To make RfA less dependent from bcmon, which seems to be dicontinued, I introduced custom monitor-mode-activation scripts.
Please note that those scripts only have sense for you, if you are already able to use monitor-mode on your device. Ether via special firmware for the internel wifi card or a kernel, which properly supports external wifi cards. Those scripts serve only as a "connector" between your wifi interface and RfA.
In order to enable this function you need to open RfA settings, tap on "Monitor-Mode settings" and disable the "Use bcmon" checkbox.
There are 3 different scripts you can specify:
Activation script
This script will be executed in it's own directory.
It should enable monitor-mode and exit.
Example:
Code:
#!/bin/bash
svc wifi disable
LD_LIBRARY_PATH=/data/data/com.bcmon.bcmon/files/libs
LD_PRELOAD=/data/data/com.bcmon.bcmon/files/libs/libfake_driver.so sh
cd /data/data/com.bcmon.bcmon/files/tools
./enable_bcmon
echo "rfasuccess"
exit
Click to expand...
Click to collapse
Warm-up script
RfA will read in this script as textfile and execute the commands internally. This is needed to execute reaver in the same terminal session as the script.
It should do all prepartions before Reaver is started. At least it has to cd into the directory where the reaver binary is.
Example:
Code:
#!/bin/bash
LD_LIBRARY_PATH=/data/data/com.bcmon.bcmon/files/libs
LD_PRELOAD=/data/data/com.bcmon.bcmon/files/libs/libfake_driver.so sh
cd /data/data/com.bcmon.bcmon/files/tools
Click to expand...
Click to collapse
Stop script
This script will be executed in it's own directory.
It should disable monitor-mode and exit.
Code:
#!/bin/bash
svc wifi enable
echo "rfasuccess"
Click to expand...
Click to collapse
Additional Information
You have also to specify your wifi-interface.
The given examples are those scripts, which RfA uses by default when you enable the "Use bcmon" checkbox.
The activation and stop script have to echo "rfasuccess" in order to tell RfA that they were executed properly. With this method you can also implement a sort of error-checking, by returning "rfasuccess" only when everything went fine.
Click to expand...
Click to collapse
Interesting.... nice job.
But better not let this get into the wrong hands, with these Admin Password hacking apps going on, anyone can take over someones router.
Sent from my super rare, old Scroll Excel running Android 2.3 using the offical app.
DOES DAT APP RUN ON DEVICES STILL ROCKIN 2.3?
Great job folks.
But for some reason user mode bcmode do not work well on HTC HD2 and my custom firmware, so I am using system module bcmon which create eth0 monitor interface instead of wlan0 (wifi0).
Can you please add interface selection or auto-detect interface in monitor mode ?
Tnx !
interface support
Hi,
RfA supports wlan0 and eth0 interface.
The problem seems to be the startup script and location of the Reaver binary, which seems to be different on your HD2.
Please describe exactly how you start monitor-mode, so I can update RfA
regards,
SOEDI
SOEDI said:
Please describe exactly how you start monitor-mode, so I can update RfA
Click to expand...
Click to collapse
Ok.
I have downloaded module src code from https://code.google.com/p/bcmon/source/browse/#svn/trunk/bcm4329/driver/src/bcm4329
Compile for my kernel and use with script that switch drivers with:
Code:
insmod bcm4329.ko firmware_path=fw_bcm4329.bcmon.bin
Firmware version is from https://code.google.com/p/bcmon/source/browse/#svn/trunk/bcm4329/fw
After that I can use sniffer like airodump (airodump -i eth0) and aireplay without need to switch monitor mode with airmon.
---------- Post added at 08:01 AM ---------- Previous post was at 07:11 AM ----------
Ahh, I have just researched the problem.
Problem is at enable_bcmon
Code:
./enable_bcmon
error: SIOCGIFFLAGS (No such device)
error: SIOCGIFFLAGS (No such device)
Couldn't find device index: No such device
I have also tried to start reaver with ./reaver -i eth0 -b 90:F6:52:C0:22:9C -c 1 -a -vv -w -S, but old problem with this drivers occurred, failed to associate to AP (it is not range problem, it is old known inject problem with kernel module driver)
Just have to find a way to make new bcmon working.
[/COLOR]Ahh, I have just researched the problem.
Problem is at enable_bcmon
Code:
./enable_bcmon
error: SIOCGIFFLAGS (No such device)
error: SIOCGIFFLAGS (No such device)
Couldn't find device index: No such device
I have also tried to start reaver with ./reaver -i eth0 -b 90:F6:52:C0:22:9C -c 1 -a -vv -w -S, but old problem with this drivers occurred, failed to associate to AP (it is not range problem, it is old known inject problem with kernel module driver)
Just have to find a way to make new bcmon working.
Click to expand...
Click to collapse
Ok, I see where the problem is....
The method to activate Monitor-Mode over bcmon.apk is:
Code:
define some paths
./enable_bcmon
But if you have self compiled modules:
Code:
sh setup.sh
?define tools path?.
Also on the bcmon website they said they fixed injection. Have you installed the newest firmware files and modules?
If you want to use bcmon.apk instead, maybe try to reinstall BusyBox. Some users reported this fixed their problems.
After you got your Monitor-Mode working, post it and I will update RfA.
reagrds,
SOEDI
First of all thank You SOEDI
Finally someone did it.. reaver is on android...
However i find the job of making it functional only half done...
as i understood from reaver forums it works best with wireless cards based on RTL8187 chipsets
in addition on the site of those modded bcmon drivers there is a statement that it doesn't support radiotap (be it mode or whatever) wich reaver seems to require..
so my idea is why not expanding Your application by adding linux kernel driver to support usb OTG (on the go) plugged in the android device's usb port...
search for phrase "android pcap" in google and You'll find it on kismet wireless
sorry for lack of link.. aperently i'd have to write 9 additional posts to post one
there is a source code down on that site too.. and it's monitor mode with no root priviledges..
plus additionally You also could add a functionality to Your gui to choose between built-in card and the one plugged in via USB-OTG to select wich one the gui is going to use..
So.. how about it? it could be mindblowing if You'd suceed
I'd bet You'd probably make a lot of peapole happy out there
sorry 4 my eventual spelling mistakes engilsh is not my native though..
regards
GusT.
Radiotap Headers
Hi,
The new bcmon.apk method supports radiotap headers, tested and worked At least with bcm4330 on Nexus7.
Monitor-Mode over USB-OTG would be cool, but I'm working on 3 other projects, so this will take some time...
At least it's working pretty good for a beta release
For me, the precess stops at "Switching wlan0 to channel 6".
I have a Galaxy S2 (i think it has a bcm4330 chipset) and android 4.2.2
I got stuck on "Waiting for bacon from etc etc.." is it normal?
ElmirBuljubasic said:
I got stuck on "Waiting for bacon from etc etc.." is it normal?
Click to expand...
Click to collapse
typically that means nobody is using the AP at that time
Reaver
Stuck on waiting for beacon:
Usually this is a range problem.
Try to start another attack, maybe on a different router.
Stuck on switching wlan0 to channel....:
The only solution I have is to simply restart the attack.
Usually this fixes the problem...
Hey great job on getting this working! Been waiting for this for a while, the aircrack solutions out there just take too long for a phone to crack through wpa/wpa2.
I'm having some issues though btw im on samsung galazy s2x which has the bcm4330. First off the bcmon starts up and enables monitor mode just fine but when I come to scan networks in reaver it nevers successfully finds any. I've tried to increase scan time and i've enables scan fix but nothing seems to work. I know my device is in monitor mode since i can scan for networks on another app, I can also reveice data packets but it's just not working on here any ideas? thanks awesome work!
The solution is pretty simple:
RfA scans in Managed-Mode, then enables Monitor-Mode and passes the data to Reaver.
So RfA can handle the Monitor-Mode on it’s own, no need to start bcmon first
Simply start RfA with wifi on
regards,
SOEDI
Thanks for the clarification now once I've scanned for networks connections come up like it should but i'm getting a new problem when testing monitoring mode it fails. I believe that this could be because of bcmon since the app doesn't seem to properly install the modded drivers. I could be wrong. I think i'm running into compatibility issues with my rom. I'm using MIUI I'm gonna try cyanogenmod to see if it helps anything.
hi
great work but im having a problem i have a htc wildfire s
evry time i start cracking a network i get (illigal instruction ./reaver wlan....)
and then nothing i think this is from my rom mostly but im not sure
my phone is fully rooted thx in advance
Alright well guess mini was causing problems with it so I guess that's not compatible working great on 4.3
Sent from my SGH-T989 using XDA Premium 4 mobile app
I'm on 09/26 cm 10.2 nightly and using galaxy s2, router is Linksys wrt110. First I wasn't able to get past "switching wlan0 to channel 1"
And if I enabled monitor mode in bcmon before scanning in rfa no router is found. how I got it to work was to scan first and once I found my router i tested for monitor mode. Before starting attack i used home button and then open bcmon and enabled monitor mode ( I had already said yes to install tool on first run), press and held home button and went back to rfa and started attack.
This was the result.
I do have a question though.. This was tested on my own router and my password is set to 0123456789 on the router. So what exactly do I have to enter from the result to connect?
I tried this on Kali as well and I got similar result, can remember if it was exact same.
I tried the WPA psk and the pin as passwords and was not able to connect to router. And my router is set to wpa2. Is that why? I kno this is off topic but I'm curious
Sent from my GT-I9100 using Tapatalk 4 Beta
Wow, seems like RfA has some problems with the S2.
Cool workaround!
Regarding your problem:
The shown WPA PSK is the hash of your real WPA Key.
Sometimes Reaver fails to get the plaintext Key and shows instead the hash.
However, if you use the hash as WPA Key it should work. Had tried this a few times and worked fine
regards,
SOEDI
EDIT:
Of course, you have to use the hash withoud the ' ' as key. Wanted only to mention this
RfA should have shown a Dialog with the Key and a connect button. Did it?

How to fix wireless stuck on turn on .

Hi all,
Recently my nexus 5 wireless stopped working. It blocks on turning on.
I know it's a common problem on the forums, and people are returning the phones to the warranty and they are replaced, but i cannot do that. (link)
Also i don't know if really it's a hardware problem, since sometimes it works, i think it's something related with the software.
I investigate further the problem.
So what i tried:
- different factory images
- changed also .macaddr from here. http://forum.xda-developers.com/showpost.php?p=52441901&postcount=47. Still my mac address is not visible in About phone - Status. And of course i have the permissions set OK, owner, and other things. (i have the nexus7 tablet so similar to that).
- my wpa_supplicant.conf from /data/misc/wifi looks like this http://prntscr.com/7jhz6v[/url[B]] ... in /etc/wifi [url]http://prntscr.com/7ji6rz. Here i have also a wpa_supplicant.conf and a p2p_supplicant.conf. So what i can see from the logcat, wireless config is set from here. So what's the purpose of that one from /persist ? To store network lists?
On my nexus 7 2013 i have also in this folder driver binary, WCNSS_qcom_wlan_nv_deb.bin. Tried to find one for Nexus 5, but just found one for mako. I added also this but with no success.
So, any other ideas, suggestions ? Thanks for listening and reading.
Try looking up TOT files and flash them as described in this tutorial http://www.usoftsmartphone.com/t192632.html. I saw a trace of these TOT files here on XDA. Be very careful of the storage (16 or 32 GB) and of the version (US/International).
When did your issues start exactly?
I am having the same issue, also my bluetooth. Mine appeared 2 OTAs ago.
I'm unable to turn on WiFi either. It's just stuck on "WiFi turning on." I rooted my Nexus 5 and tried following the directions in post 107 in this thread:
http://forum.xda-developers.com/google-nexus-5/help/wifi-stuck-t2721643/post60011636#post60011636
When I use a root explorer, the folder is empty. If I use a terminal, it says permission denied to do anything with the file. Any ideas on how to delete the .macaddr file? Root Checker Basic says that I am indeed rooted.
Instead of an external site, this one is the same here right?
http://forum.xda-developers.com/goo...orial-how-to-flash-factory-images-lg-t2713833
I also found the megadrive links no longer worked. Mirrors provided on the XDA one.
tmihai20 said:
Try looking up TOT files and flash them as described in this tutorial http://www.usoftsmartphone.com/t192632.html. I saw a trace of these TOT files here on XDA. Be very careful of the storage (16 or 32 GB) and of the version (US/International).
Click to expand...
Click to collapse
Flashing .tot files is useless
Prodeje79 - Yes, that link it's ok. You can try that, but will be useless. Bluetooth seems to be ok for me. Check at phone status if you have a Bluetooth address. If not then responsible for that is .baddr file from /persist/bluetooth folder. You can find examples of the file, if not, i can provide mine. IMPORTANT. Also be careful at permissions and owner for bluetooth folder and .badddr file.
I successfully flashed a .tot image but it's useless. /persist folder it's skipped anyway. Also please make sure that in order to be possible to enter download mode you need to be on a 4.4 rom. I don't know why for lollipop they removed this. /persist folder it's the problem, cannot delete and recreate, rename.
I apreciate the response. Thanks for point that out. I indeed did the bluetooth .baddr piece as well and noted the differences. I am getting read/write errors as well. I was able to COPY them out to read them. The secret was to put phone in airplane mode. Oddly enough, Even after replacing the folders/files (as I could not EDIT but delete worked), paying special attention to their corresponding permissions and owners etc etc, my wifi worked for a few moments and showed my ORIGINAL mac address. This means it must be written somewhere else?????
if you don't mind, please see my personal thread http://forum.xda-developers.com/google-nexus-5/help/wifi-bluetooth-sim-card-issues-ota-t3140987
Are you saying I should get back to stock 4.4 (KRT16M) from
from https://developers.google.com/android/nexus/images#hammerhead
?
I have an 820 from USA, 16GB.
THen try TOT?
I am not clear to use BIN_LGD820AT-00-V10a-NXS-XX-OCT-01-2013-KFS78N-USER-16G or BIN_LGD820AT-00-V10a-NXS-XX-OCT-09-2013-KQS81M-USER-16G
Also, am I supposed to add a +0 or +1 or something to file name? at this point I see a few different versions of TOT flashing and I'd love to confirm instructions exactly!!!
yoncy said:
Prodeje79 - Yes, that link it's ok. You can try that, but will be useless. Bluetooth seems to be ok for me. Check at phone status if you have a Bluetooth address. If not then responsible for that is .baddr file from /persist/bluetooth folder. You can find examples of the file, if not, i can provide mine. IMPORTANT. Also be careful at permissions and owner for bluetooth folder and .badddr file.
I successfully flashed a .tot image but it's useless. /persist folder it's skipped anyway. Also please make sure that in order to be possible to enter download mode you need to be on a 4.4 rom. I don't know why for lollipop they removed this. /persist folder it's the problem, cannot delete and recreate, rename.
Click to expand...
Click to collapse
Another question, the MAC address that showed for a few minutes, did not match what was in my stock macaddr file nor the one I created. Where else could this be listed????
Yes, i think i reverted to 4.4 stock image (KRT16M). Just with that i succeeded to enter download mode with Volume Up + plug in USB cable. After that drivers will be installed, you need to change the port to COM41.
Prodeje79 said:
Are you saying I should get back to stock 4.4 (KRT16M) from
from https://developers.google.com/androi...ges#hammerhead
?
Click to expand...
Click to collapse
So you have 820 version i had 821. I haven't renamed anything, i think i just downloaded the latest version, so in this case 09-OCT. Remembered that saw in the thread something with renaming but i didn't get too much attention to that, wasn't my case. Will take a look again.
Again as i told you flashing a .tot image will not help, persist folder will be skipped.
Prodeje79 said:
I have an 820 from USA, 16GB.
THen try TOT?
I am not clear to use BIN_LGD820AT-00-V10a-NXS-XX-OCT-01-2013-KFS78N-USER-16G or BIN_LGD820AT-00-V10a-NXS-XX-OCT-09-2013-KQS81M-USER-16G
Also, am I supposed to add a +0 or +1 or something to file name? at this point I see a few different versions of TOT flashing and I'd love to confirm instructions exactly!!!
Click to expand...
Click to collapse
Mine as well, until in a moment when i played with permissions. After that, no wifi at all.
I found a MAC address in the /etc/wifi/bcmhd.cal file. Open it with a text editor and you will see it there. I changed also that with no results.
Prodeje79 said:
Another question, the MAC address that showed for a few minutes, did not match what was in my stock macaddr file nor the one I created. Where else could this be listed????
Click to expand...
Click to collapse
So as a resume:
- /persist/wifi ..... where the mac address is stores
- /data/misc/wifi - wpa_supplicant, entropy, p2p_supplicant - these files can be deleted, copied from another device. In wpa_supplicant we have serial number (i changed to my actual one with no difference)
- /etc/wifi with bcmdhd.cal file and some general wpa_supplicant_overlay etc.
Compared to my flo if i run in the phone terminal or adb shell --- ip link show ----- i don't have wlan0 and p2p0. These should be there, in this list they are all the interfaces used by Android linux system. If i add that binary file WCNSS_qcom_wlan_nv.bin (from a mako i have found it) to /data/misc/wifi after a reboot i will have those. But again with no difference.
Plus i don't understand why phone tries to set the wlan0 interface down and not up
------'3 interface setcfg wlan0 0.0.0.0 0 down"----ok 0.0.0.0 no mac address found but why down and not up.
That's it for now, thank you too, let's hope in the end will succeed to fix this problem (if really it's a software problem).
Compared to my flo:
flo: /persist/wifi - owner root/root (775)
hammerhead: event if you try to change to root/root in init.hammerhead.rc owner is changed to system/wifi in the script (you can comment that). Compared the two scripts and everything should be ok.
Can someone tell me where are located network interfaces on Android ? (nothing like on linux ex: /etc/network/interfaces). Trying to add those wlan0 and p2p0 manually,
{
"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"
}
but i think they are dinamically set or something?
https://www.dropbox.com/s/30s8nqo74cweuqt/2015-06-28 10.30.30.png?dl=0
@bitdomo
Could you give us a hand?
yoncy said:
Compared to my flo:
flo: /persist/wifi - owner root/root (775)
hammerhead: event if you try to change to root/root in init.hammerhead.rc owner is changed to system/wifi in the script (you can comment that). Compared the two scripts and everything should be ok.
Can someone tell me where are located network interfaces on Android ? (nothing like on linux ex: /etc/network/interfaces). Trying to add those wlan0 and p2p0 manually,
but i think they are dinamically set or something?
https://www.dropbox.com/s/30s8nqo74cweuqt/2015-06-28 10.30.30.png?dl=0
Click to expand...
Click to collapse
Did you see these posts?
http://forum.xda-developers.com/showpost.php?p=56035498&postcount=42
http://code.google.com/p/android/issues/detail?id=78702#c78
This is from Xperia, and I am not sure what this would do: http://forum.xda-developers.com/xperia-sp/general/guide-fix-connectivity-android-5-0-t2951677
yoncy said:
Compared to my flo:
flo: /persist/wifi - owner root/root (775)
hammerhead: event if you try to change to root/root in init.hammerhead.rc owner is changed to system/wifi in the script (you can comment that). Compared the two scripts and everything should be ok.
Can someone tell me where are located network interfaces on Android ? (nothing like on linux ex: /etc/network/interfaces). Trying to add those wlan0 and p2p0 manually,
but i think they are dinamically set or something?
https://www.dropbox.com/s/30s8nqo74cweuqt/2015-06-28 10.30.30.png?dl=0
Click to expand...
Click to collapse
I flashed a ton of stock roms yesterday. I also switched to recovery-clockwork-touch-6.0.4.5-hammerhead
In regards to PA, I did pa_hammerhead-4.45-20140729
I then tried twrp-2.8.7.0-hammerheadcaf and proceeded to flash cm-12.1-20150629-NIGHTLY-hammerheadcaf
My wifi and bluetooth now turn on, scan, and connect in CM! Unfortunately, the wifi frequently disconnects and my cell data no longer works! VOice and text work OK though.
For fun I went back to stock 4.4. wifi and BT no longer turn on. My cell data still doesnt work. Voice and text work OK. Says ATT but has exclamation point........
I then flashed back to 5.1.1 stock. Cell data works fine in 5.1.1. Not sure why my cell data doesn't work in 4.4???????????
@Prodeje79 Hi again, thanks for the links. But tried both, with pmf removed and ap_scan on 0. Even tried other wpa_supplicant variants (nexus 7 , nexus4, even linux ones). setenforce 0 disable selinux (set to permissive).
Right now i was concentrated on this error. As i can see
--------------
avc: denied { read } for name="wpa_supplicant.conf" dev="mmcblk0p28" ino=318356 scontext=u:r:wpa:s0 tcontext=ubject_r:app_data_file:s0 tclass=file permissive=1
----------- it's related with selinux . For a moment Wifi started working, HW addr for wlan0 was detected ( i had wlan0 and p2p in "ip link show" terminal command ). Will investigate more related with that.
I/wpa_supplicant( 3427): type=1400 audit(0.0:13): avc: denied { read } for name="wpa_supplicant.conf" dev="mmcblk0p28" ino=318356 scontext=u:r:wpa:s0 tcontext=ubject_r:app_data_file:s0 tclass=file permissive=1
I/wpa_supplicant( 3427): type=1400 audit(0.0:14): avc: denied { open } for name="wpa_supplicant.conf" dev="mmcblk0p28" ino=318356 scontext=u:r:wpa:s0 tcontext=ubject_r:app_data_file:s0 tclass=file permissive=1
I/wpa_supplicant( 3427): type=1400 audit(0.0:15): avc: denied { getattr } for path="/data/misc/wifi/wpa_supplicant.conf" dev="mmcblk0p28" ino=318356 scontext=u:r:wpa:s0 tcontext=ubject_r:app_data_file:s0 tclass=file permissive=1
D/SoftapController( 190): Softap fwReload - Ok
W/CommandListener( 190): Failed to retrieve HW addr for wlan0 (No such device)
D/CommandListener( 190): Setting iface cfg
E/WifiStateMachine( 770): Unable to change interface settings: java.lang.IllegalStateException: command '29 interface setcfg wlan0 0.0.0.0 0 down' failed with '400 29 Failed to set address (No such device)'
E/WifiMonitor( 770): killSupplicant p2ptrue init.svc.wpa_supplicant=unknown init.svc.p2p_supplicant=unknown
E/WifiMonitor( 770): startMonitor called with unknown iface=wlan0
Click to expand...
Click to collapse
Solution for this problem.
http://forum.xda-developers.com/showpost.php?p=62176769&postcount=164
Click to expand...
Click to collapse
Also having the same issue, here's a few parts of my log.
Code:
W/CommandListener( 194): Failed to retrieve HW addr for wlan0 (No such device)
D/CommandListener( 194): Setting iface cfg
E/WifiStateMachine( 888): Unable to change interface settings: java.lang.IllegalStateException: command '4 interface setcfg wlan0 0.0.0.0 0 down' failed with '400 4 Failed to set address (No such device)'
E/WifiMonitor( 888): killSupplicant p2ptrue init.svc.wpa_supplicant=unknown init.svc.p2p_supplicant=unknown
D/WifiMonitor( 888): startMonitoring(wlan0) with mConnected = false
E/WifiHW ( 888): Unable to open connection to supplicant on "@android:wpa_wlan0": No such file or directory
Code:
I/wpa_supplicant( 1429): rfkill: Cannot open RFKILL control device
E/wpa_supplicant( 1429): Could not read interface wlan0 flags: No such device
E/wpa_supplicant( 1429): Could not read interface wlan0 flags: No such device
E/wpa_supplicant( 1429): wlan0: Failed to initialize driver interface
Any other ideas? I've tried different kernels, wiping /system and installing new ROM, deleting and creating .macaddr, setting permissions of /persist/wifi, deleting /data/misc/wifi/wpa_supplicant.conf.
I managed to get it working for a little while by booting into safe mode and starting wifi there, then rebooting, but it only worked once.
Lollipop eventually overheats your phone and fries WiFi.
Put phone in fridge and then try. It works while cool
Prodeje79 said:
Lollipop eventually overheats your phone and fries WiFi.
Put phone in fridge and then try. It works while cool
Click to expand...
Click to collapse
I don't think Lollipop has anything to do with the issue, as I have been running my Nexus 5 on CM12.1 for a little over 5 months and nothing has ever happened. I purchased my girlfriend her first Nexus, it came with PACman KK on it, but wifi didn't work. I will try the fridge, thank you for the advice.
Kytosion said:
I don't think Lollipop has anything to do with the issue, as I have been running my Nexus 5 on CM12.1 for a little over 5 months and nothing has ever happened. I purchased my girlfriend her first Nexus, it came with PACman KK on it, but wifi didn't work. I will try the fridge, thank you for the advice.
Click to expand...
Click to collapse
OK I guess it could just be coincidence with the age of my phone and release of lolliop. Just literally right after my first reboot on the new OTA my sim card slot, wifi, and bluetooth started having intermittant issues....
PUtting in fridge and boom my wifi and BT work for a few mins...... same results as others.
also the battery draining has helped some, but just temporary....
yoncy said:
Solution for this problem.
Click to expand...
Click to collapse
What's the latest on your end? @yoncy
That other thread has some success flashing 6.0.
I already sent my phone to lg and authorized repair.....
Just call me bad luck Brian

Categories

Resources