VPN Connections (Cisco VPNC GUI) for BusyBox 1.17.1+ - Desire Android Development

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.

Related

[23/11] OpenVPN working on CyanogenMod 0.3 & LeeDroid Roms, Buzz 1.0.1 kernel

EDIT 24/11/2010 4:00pm Aus EST: OpenVPN Works like a charm now on both CyanogenMod & Leedroid! See Mero01's post for a great tutorial on LeeDroid http://forum.xda-developers.com/showthread.php?t=848939. These are the steps for CyanogenMod:
1) I installed the CyanogenMod Rom 0.3. Thanks RaiderX303!
2) I installed Buzz kernel 1.0.1(fixed version) 1.5ghz kenel. It's a beauty Buzz.
3) I did NOT run OpenVPN Installer. I left the OpenVPN binary as the one CyanogenMod puts in /system/xbin
4) I modified OpenVPN Settings to locate tun.ko in /system/lib/modules, run insmod, leaving it pointing to ifconfig in /system/xbin. See the screenshots below for a picture of these settings.
MY openvpn.conf file is:
client
dev tun
proto tcp
remote [IP ADDRESS OF MY SERVER] 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert foo.crt
key foo.key
comp-lzo
verb 3
Nb: The IP address of my server is hidden and the cert and key are renamed "foo" here for security reasons
ifconfig shows a properly configured tun adapter now with an allocated openvpn address.
I can ping the server too!
Here's screenshots of my OpenVPN Settings:
{
"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"
}
DEPRECATED (Use the tun.ko in /system/lib/modules in Buzz's 1.0.1 kernel):
............. I compiled tun.ko from Buzz's kernel source
https://github.com/BuzzBumbleBee/HTC_ACE_KERNEL
using Ubuntu 10.04 and the method described here
http://android.modaco.com/content/h.../howto-compiling-tun-tap-driver-for-htc-hero/
replacing the hero kernel used in the how-to with Buzz's kernel. Here is a link to the tun.ko file I created:
https://docs.google.com/leaf?id=0B7...xMDItODJmYTk3NTFhY2M 2&hl=en&authkey=CM38-6IN
Sent from my Desire HD using Tapatalk
Walker Street said:
I've made this a new thread because I know a lot of you are interested in getting OpenVPN to work on your DesireHD (without necessarily going all the way of replacing Sense with the CyanogenMod). I compiled tun.ko from Buzz's kernel source
https://github.com/BuzzBumbleBee/HTC_ACE_KERNEL
using Ubuntu 10.04 and the method described here
http://android.modaco.com/content/h.../howto-compiling-tun-tap-driver-for-htc-hero/
replacing the hero kernel used in the how-to with Buzz's kernel. Here is a link to the tun.ko file I created:
https://docs.google.com/leaf?id=0B7...xMDItODJmYTk3NTFhY2M 2&hl=en&authkey=CM38-6IN
However, I haven't got the expertise to get it to work with the "OpenVPN Installer" and "OPenVPN Settings" apps by Friedrich Shauffelhut. I got up to trying these settings (see screenshots) but "FATAL:Linux ifconfig failed. Could not execute external program".
Apache14, guys, do you know how to get my (Buzz's) tun.ko working in openvpn in this kernel. I am running Buzzes OC+ 1.51ghz kernel version 1.0.0 on the LeeDroid 1.1a Sense ROM. This combo is rock solid by the way.
Sent from my Desire HD using Tapatalk
Click to expand...
Click to collapse
i do love you !!! hold on i have a tutorial i followed had it pretty much working before new rom of course and then required the tun.ko file and couldnt get further..
will post it as soon as i find it
http://forum.xda-developers.com/showthread.php?p=7683773
Lemme know how it goes
No prob. I'll await your search with great interest. EDIT: Beat me to it .... I'll have a look at it.
oh and i tried it using tun instead of tap still worked i could see on the server side it authenticating and watnot
Walker Street said:
No prob. I'll await your search with great interest. EDIT: Beat me to it .... I'll have a look at it.
Click to expand...
Click to collapse
haha no worries
Sorry, I can't get this to work. We don't have a /bin folder on our DHDs. I think /system/bin might be the equivalent folder.
However when I try to create symlinks with "ln -s /system/bin /system/xbin/bb"
(similar to recommended in the tutorial your linking to:
http://forum.xda-developers.com/showthread.php?p=7683773)
I get this error message: "link failed File exists".
That's where my expertise runs out again ....
I'll try again once I've downloaded and flashed LeeDroid 1.2
LeeDroid 1.2's out. You're quick mero
Walker Street said:
Sorry, I can't get this to work. We don't have a /bin folder on our DHDs. I think /system/bin might be the equivalent folder.
However when I try to create symlinks with "ln -s /system/bin /system/xbin/bb"
(similar to recommended in the tutorial your linking to:
http://forum.xda-developers.com/showthread.php?p=7683773)
I get this error message: "link failed File exists".
That's where my expertise runs out again ....
Click to expand...
Click to collapse
thats really weird cause i tried it on my stock rom/kernel and it worked :S not sure if i did change it too /system/bin cuase here it says
3. Install "OpenVPN Installer" from market.
- Run it
- OpenVPN directory "/system/bin"
- ifconfig/route directory "/system/xbin/bb"
Walker Street said:
LeeDroid 1.2's out. You're quick mero
Click to expand...
Click to collapse
haha yerp think i was the first already flashed and restoring backups
But you should install "OpenVPN Installer" from market and set the right directory to Busybox. you can set a shortcut from your busybox installation (in my case "/bin") to /system/xbin/bb (that should be available in the "OpenVPN Installer" Setup process).
You should also check if you have already a folder "bb" in "xbin" and delete it if it contains a file called "placeholder". Then all should be fine if your config is correct
Not sure if this helps ? ifs afew posts down... i think i remember having to re-install busybox or somthing ah
mero01 said:
thats really weird cause i tried it on my stock rom/kernel and it worked :S not sure if i did change it too /system/bin cuase here it says
3. Install "OpenVPN Installer" from market.
- Run it
- OpenVPN directory "/system/bin"
- ifconfig/route directory "/system/xbin/bb"
Click to expand...
Click to collapse
you know there is only a 'placeholder' file in '/system/xbin/bb'. There is an ifconfig in both /system/bin and /system/xbin. I wonder if we manually set ifconfig/route directory to "/system/xbin" whether that would work. I don't know how to do that though? Was your OpenVPN installer/settings by Friedrich Shauffelhut? I can't see where you can change the ifconfig route on my installer/settings apps (2 separate apps by the same guy).
EDIT ... OK, you kind of beat me to it. I still haven't flashed LeeDroid ... how'd you go trying the stuff you said in the post?
Walker Street said:
you know there is only a 'placeholder' file in '/system/xbin/bb'. There is an ifconfig in both /system/bin and /system/xbin. I wonder if we manually set ifconfig/route directory to "/system/xbin" whether that would work. I don't know how to do that though? Was your OpenVPN installer/settings by Friedrich Shauffelhut? I can't see where you can change the ifconfig route on my installer/settings apps (2 separate apps by the same guy).
Click to expand...
Click to collapse
jump on the irc channel...
I cant for the life of me remember how it got it too work i could get it to authenticate and everything just required the tun.ko and now i cant get it to work at all someone help us pls ?
does this help at all ?
http://forum.xda-developers.com/showthread.php?t=823906
I think maybe we need the script "iproute-wrapper.sh" unless the one here compatible wit the dhd
mero01 said:
does this help at all ?
http://forum.xda-developers.com/showthread.php?t=823906
I think maybe we need the script "iproute-wrapper.sh" unless the one here compatible wit the dhd
Click to expand...
Click to collapse
I don't know yet if that will help. I just found out the AdFree problem wasn't solved with LeeDroid 1.2 (you get the problem back after a full format and wipe and installing 1.2). So I'm gonna give up on that and install 1.2 on my pre-existing working copy of 1.1a. I don't think the format/wipe thing has a high chance of success for openvpn (unless you've tried it mero).
I'm gonna give openvpn a break until tomorrow. I'll have a look at that second tutorial then. It's 6.30pm here and I haven't eaten all day In the meantime, you or others are welcome to keep trying. Remember that you need to flash the Buzz kernel back after flashing LeeDroid. The tun.ko is specific to the Buzz kernel.
Walker Street said:
I don't know yet if that will help. I just found out the AdFree problem wasn't solved with LeeDroid 1.2 (you get the problem back after a full format and wipe and installing 1.2). So I'm gonna give up on that and install 1.2 on my pre-existing working copy of 1.1a. I don't think the format/wipe thing has a high chance of success for openvpn (unless you've tried it mero).
I'm gonna give openvpn a break until tomorrow. I'll have a look at that second tutorial then. It's 6.30pm here and I haven't eaten all day In the meantime, you or others are welcome to keep trying. Remember that you need to flash the Buzz kernel back after flashing LeeDroid. The tun.ko is specific to the Buzz kernel.
Click to expand...
Click to collapse
Yeh im tried after a full wipe no go but yeah im stuck have no clue where to go from here so just going to wait for someone to help ????
Hi,
I have extending my *.ovpn Config with the following line:
log "/sdcard/openvpn/openvpn.log"
After following all instructions from Crusoe86 these log is generated:
...
Note: Cannot open TUN/TAP dev /dev/tun:No such file or directory (errno=2)
Note: Attempting fallback to kernel 2.2 tun/Tap interface
Cannot allocate TUN/TAP dev dynamically
Exiting
Can anyone please help?
Thx
Edit: Rooted with VISIONAry, with option system r/w after root, but copying tun.ko to system/lib/modules with su - rights says "cannot create...read-only filesystem"
lumifi said:
Hi,
I have extending my *.ovpn Config with the following line:
log "/sdcard/openvpn/openvpn.log"
After following all instructions from Crusoe86 these log is generated:
...
Note: Cannot open TUN/TAP dev /dev/tun:No such file or directory (errno=2)
Note: Attempting fallback to kernel 2.2 tun/Tap interface
Cannot allocate TUN/TAP dev dynamically
Exiting
Can anyone please help?
Thx
Click to expand...
Click to collapse
Can you post what instructions you used to setup OpenVPN?
lumifi said:
Edit: Rooted with VISIONAry, with option system r/w after root, but copying tun.ko to system/lib/modules with su - rights says "cannot create...read-only filesystem"
Click to expand...
Click to collapse
try copying the tun.ko file to your sdcard, then using Root Explorer mount as R/W and copy the file to /system/lib/modules
Ill add an official tun.ko to Buzz within 2h
Sent from my Desire HD using XDA App

[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-Mod/Source] WifiTether for JB TouchWiz Roms

Before we start I have to throw out props to Eschelon, NxtGenCowboy, Virus, Ziggy471 and of course to the wifi-tether guys as well as cyanogen for the needed source/binaries (pre-11/18 versions) which allowed me to find the right path to get this 100% working. Also had awesome testers proxhack / jlmr731 and especially joshbeach. They all were essential to getting this all working. I still don't have a GS3 so poor Eschelon/NxtGenCowboy probably wiped/installed about 100 builds before this worked (and after when I lost source... grumble). Thanks to everyone that helped.
Legal/GPL Stuff
Carriers hate tethering, you all know that. Use at your own risk/with common sense & dont blame me for anything that goes wrong
WifiTether is under the GPLv3 license, so below is the source for the mods
Code:
Original Source - https://code.google.com/p/android-wifi-tether/
Modded Source - http://svn.ziggy471.com/treve-tether
Configuration:
*Latest Build recommended, these are just a few devices I have tested on*
Setup-Method:: (auto should have right defaults, might need to force)
Galaxy S3 - Netd-ndc with driver reload 2
Evo 3d SoftAP with driver reload 2
Sensation SoftAP with no driver reloads
Evo 4g SoftAP with no driver reloads
Click to expand...
Click to collapse
Other Settings
-Device-Profile: Leave this on auto (default)
-Netdndc Max Client Cmd: Required for GS3ish devices. If not enabled you will likely get an AP but cannot connect.
-MSS clamping: on (default)
-Routing fix: on (default)
Click to expand...
Click to collapse
Heres some geek details on basic binaries how the backend of wifi-tether works. The main modes I played with and required files are as detailed below:
Code:
[B]Netd-ndc mode[/B] (Wifi Tether JB Default)
-/system/bin/ndc (wrapper for netd)
-/system/bin/netd (actual netd service)
--Commands Executed
/system/bin/ndc softap stopap
/system/bin/ndc softap stop wlan0
/system/bin/ndc softap fwreload wlan0 AP
/system/bin/ndc softap start wlan0
/system/bin/ndc softap set wlan0 wlan0 SSID encryption key channel (maxclients) 0 8
/system/bin/ndc softap startap
/system/bin/ndc interface setcfg wlan0 192.168.2.254 255.255.255.0 up
[B]Netd mode[/B]
-/system/bin/netd (netd service)
--Commands are basically the same as above, but direct to netd service
[B]HostAP mode[/B] (used by stock tether app/fallback mode)
-/system/bin/hostap (hostap service, init.qcom.rc looks for config /data/hostapd/hostapd.conf)
New Options
Framework Tether(Fallback)
Use this if you have issues with wifitether mode. It forces on a wifihotspot using just framework. This has been reported to not throw up the paywall nag screen on some devices/carriers but YMMV. It may be able to be used nonroot as well if you ignore the initial warning.
Send NetdNDC Max Client CMD
This modifies the standard ndc command string to add in the Max Client parameter. More details are in post here
Wifi-Driver reload
This is the standard driver reload for wifi tether. It runs inside one script "./tether start|stop".
Wifi-Driver reload 2
This is a modified command that reloads firmware in a separate su request before the tether-edify code is run. May require SuperSU.apk
Use Cyanogen Hostapd Binary
This is the old method and is totally removed stating with the 11/20 update
The hostapd binary contained in atleast touchwiz JB contains extra fields explained above. If the extra commands are not working on X device you can try to fall back to this binary. This uses a dirty hack which installs hostapd and symlinks between versions for native or WifiTether mode. As long as you start and stop wifitether things should always line up. If you get into an issue where you crash things might get out of sync but should fix themselves next toggle of wifi tether. I have also added in menu items for the gs3 to manually swap binaries around.
*You must have a proper setup busybox for the GS3 code to work right. It moves system files around - you might win a reflash if things really go bad*
*Cyanogen Hostapd Symlink option only*- Make a system backup, it modifies sys files so theres a chance it will break something
Bugs
You might have to toggle stuff on and off once first if you run into errors. I think there's an error on first creation of config
If you switch modes between native wifitether and fallback mode (or stock tethering), your phone may spontaneously combust(wifi crashes) after the routing mess that ensues. Just reboot and you'll be all set again.
Seems to work better on SuperSU - Probably due to the per-app permissions vs per command.
Download:
**EVERY BUILD YOU MUST UNINSTALL OLD VERSIONS FIRST OR ATLEAST CLEAR APP DATA, IT DOES NOT UPGRADE NICELY**
-If you have problems, scroll down and read FAQ in post2 before posting
WifiTether-TrevE_Mod_04-17-2013.apk - Link Soon
Older Versions:
WifiTether_TrevE_Mod_11_22_2012 (defaults to Wifi Driver Reload 1) - http://www.androidfilehost.com/?fid=9390195663897100312
WifiTether-TrevE_Mod_11_22_2012_driverReload2 (defaults to Wifi Driver Reload 2) - http://www.androidfilehost.com/?fid=9390208427046731813
Try to merge together what worked for everyone across different devices. There are 2 options in settings with mild enhancements
-Wifi-Driver Reload - Driver reload inside of tether script. Similar to 11/20 version
-Wifi-Driver Reload 2 - Driver reload outside of tether script. Similar to 11/18 version
Please report in with Carrier/Device and what option works best for you. Valid combinations are no reloads checked or one of the reload methods. Do not check both (theres no code to stop you from doing it now)
There is no code differences between the two apk versions, I just recently added in reload method 2 so rom devs can cook in whatever apk just works without changing settings.
Click to expand...
Click to collapse
Apparently I botched code along the line somewhere between 18-20. Please let me know which one of these versions you are on and what works.
WifiTether_TrevE_Mod_11_20_2012_insmodv3.apk - If v2 doesnt work this should - http://www.androidfilehost.com/?fid=9390169635556426691
If insmod v2 doesnt work, insmod v3 switches to insmod on load, rrmod to unload, then reloads the driver when finished with with mfgloader -u / mfgloader -l
WifiTether_TrevE_Mod_11_20_2012_insmodv2.apk - Hopefully working- http://www.androidfilehost.com/?fid=9390169635556426686
Driver Reload did not like loading with mfgloader in original build. This switches to insmod on load, mfgloader/rrmod to unload, then reloads the driver when finished with mfgloader -u / mfgloader -l
WifiTether_TrevE_Mod_11_20_2012.apk - Broken - Thanks halmo20 for catching that
GS3/E3D driver load/unload methods cleaned up, wifi driver reload checkbox should now be used, it was forced previously in code.
NetDndc Max client mode ported down to netd as well. Setting enables/disables with netd
all superuser code removed outside of tether binary, should have less popups for non-supersu users
Framework tether mode moved to setup
Fixed settings being applied reverting user settings at first start
All Cyanogen hostapd binary leftovers removed
Busybox check removed
WifiTether_TrevE_Mod_11_18_2012.apk - http://www.androidfilehost.com/?fid=9390190389996027907
Bam - Symlinks gone by default thanks joshbeach for all testing
New option Netdndc Max mode, this should be devices default setting.
Encryption works starting this build with netdndc max mode
WifiTether-TrevE_Mod_11-17-2012.apk - http://www.androidfilehost.com/?fid=9390188424645836869
cut down symlinks to only move hostapd around.
Made a checkbox that controls symlink code. Trying to axe it all. Moved this and fallback to settings screen. now save/load
define wifi.interface where it is undefined like on t0ltespr (hack to wire it to ndc settngs)
try to work with t0ltespr's /lib/ directory
cut down root code significantly (hopefully spam/timing issues resolved)
WifiTether_TrevE_Mod_11_15_12.apk -
Code cleanup
e3d code driver reload mess moved
samsung symlink mess in separate class, hoping to ditch this all soon
fallback mode in separate class, wired up to wifitether settings (encryption should work)
WifiTether_TrevE_Mod_11_12_12.apk - http://www.androidfilehost.com/?fid=9390169635556426338
Click to expand...
Click to collapse
***This app is signed with my certificate, you will need to uninstall old versions of wifitether first to use this***
FAQ
AP Starts but unable to connect - Make sure Send Netd max client mode option is on if your on JellyBean. read p1 for required settings
Tether does not start / Adapter does not work after tether- Try to turn off Wifi-Driver Reload #1 and turn on Wifi-Driver Reload #2
Tether cuts off on on charger connect/disconnect- Try to turn off connection optimizer. More here from eyecon82 http://forum.xda-developers.com/showpost.php?p=34467459&postcount=148
mystery_tx_man suggests removing connection manager apk - http://forum.xda-developers.com/showpost.php?p=34838831&postcount=218
Phone takes back control of wifi- Youll notice a "What the hell" toast message. Somehow the phone moved wifi state, either you toggled an app that turns on wifi or some system process was thinking for you. Disable whatever is doing it.
cyrnel suggests disabling wireless network location services - http://forum.xda-developers.com/showpost.php?p=34721619&postcount=200
If you get it on screen shut off try changing "Wifi During Sleep" - on htc its menu -> settings - wifi -> menu -> Advanced -> Keep Wifi on during sleep -> Always
You get a Tmobile Hotspot page-
Changing APNs is reported to work by Gandoff without changing useragent- http://forum.xda-developers.com/showpost.php?p=34629321&postcount=191
Changing user agents works as described by mad_unix http://forum.xda-developers.com/showthread.php?p=34388089#post34388089 and free_man http://forum.xda-developers.com/showthread.php?p=34500399#post34500399
open1your1eyes0 has some vpn setup links which should also work - http://forum.xda-developers.com/showpost.php?p=34798223&postcount=211
XXXX still doesnt work - First try SuperSU. This will avoid a lot of headaches. Then make sure you are on latest version and that you have uninstalled/cleared app data when you went to a newer version. Read over the last few pages of thread at least too to make sure its not a known issue then go for it and post away. Make sure you include Carrier / Device / Rom / SU application.
Debugging Issues
For those people having issues on other gs3 like devices / roms / whatever I do not even have a gs3 so this is all blind. To try to help debugging I created a script to hopefully grab information needed. This should help from both working/nonworking devices to help eliminate the stupid symlink code and fix up other devices.
The scripts point is to try to get a working AP. If you can post how you did it and we can get source changed. By default it does no driver reloads and starts an Open AP with SSID TrevScript.
First grab the latest script from svn (ill update it with more info after I get some logs so make sure you have latest)
http://svn.ziggy471.com/treve-tether/ grab tetherdebug.sh
Code:
adb push tetherdebug.sh /system/xbin/
adb shell chmod 755 /system/xbin/tetherdebug.sh
adb shell busybox dos2unix /system/xbin/tetherdebug.sh
Make sure wifi is on but do not start witfitethering. All you want to do is run "Set Binaries to WifiTether" option in the menu of app then follow below code
Code:
adb shell su -c tetherdebug.sh
adb pull /data/local/tmp/tether.log
rename the file to tether_wifibinaries.log. Check to see if any AP is available.
now run "Set Binaries to Native" option in app and reboot device
adb reboot
When the device comes back up, rerun the script.
Code:
adb shell su -c tetherdebug.sh
adb pull /data/local/tmp/tether.log
rename the file to tether_nativebinaries.log. Check to see if any AP is available.
reboot after you get the file.
adb reboot
ADVANCED
If you know what you are doing you can try to find a working combo. I added in the following command line args
ARG1 = ENCRYPTION. NONE/WPA2
ARG2 = DRIVERRELOAD. NONE/insmod/mfgloader
ARG3 = DRIVERTOLOAD. /system/lib/modules/dhd.ko (or whatever module is, required if ARG2 is set)
Examples:
Make sure wifi is on but do not start witfitethering. All you want to do is run "Set Binaries to WifiTether" option in the menu of app to start with a known working base then follow below code
try no encryption with insmod where your wifi module is /system/lib/modules/dhd.ko
Code:
adb shell su -c tetherdebug.sh NONE insmod /system/lib/modules/dhd.ko
try no encryption with mfgloader where your wifi module is /system/lib/modules/dhd.ko
Code:
adb shell su -c tetherdebug.sh NONE mfgloader /system/lib/modules/dhd.ko
try wpa2 (password is Trev) with insmod where your wifi module is /system/lib/modules/dhd.ko
Code:
adb shell su -c tetherdebug.sh WPA2 insmod /system/lib/modules/dhd.ko
There shouldn't be personal information in the debug logs, the most I can think of that would be displayed is if you have an encryption passphrase set in wifitether. Sending the 2 files named with what mode you were in will help get it going elsewhere and hopefully kill the symlink code
mineeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
askldfjalskdnflkasf
Worked great right out the box on Synergy Rev 111. Great job Trev. :good:
worked like a charm
Thanks guys
downloading now. Thank you very much... great work...
And working great....
BAM!
Sent from the 3rd Galaxy
Confirmed working on Beans build2, you totally rock.
+1 encryption breaks, unsecure works great.
Sent from my SCH-I535 using xda premium
cannot connect with wifi encryption
other than that working
big thanks
Works great without enabling the WiFi-Encryption, but when I do, it doesn't work...btw I'm on Synergy R111.
Confirmed working on CleanROM 4.5!! (unsecured)
+1 setting encryption breaks it. (setting it back to open fixes it)
progress!
Thank you so much!!
Thank you very much for this. Been wanting to punch myself in the nuts every time I have to use the hotspot app because of the constant data drops.
Sent from my SCH-I535 using Tapatalk 2
VRBLJ1 stock. Not working no matter what settings I use. Not the one from the play store, neither this one. :/
Can't get it to show up in the Wifi list of connections on my laptop under any condition.
Ended up using this: https://play.google.com/store/apps/details?id=kr.core.technology.wifi.hotspot&hl=en
Bypasses the stock security check perfectly and uses native tethering.
How can I make this work on sprint gs3 tw jb leak
Sent from my SPH-L710 using xda app-developers app
open1your1eyes0 said:
VRBLJ1 stock. Not working no matter what settings I use. Not the one from the play store, neither this one. :/
Can't get it to show up in the Wifi list of connections on my laptop under any condition.
Ended up using this: https://play.google.com/store/apps/details?id=kr.core.technology.wifi.hotspot&hl=en
Bypasses the stock security check perfectly and uses native tethering.
Click to expand...
Click to collapse
^^^This! Thank you this worked after trying the moded wifi tether with no success.
Sent from my GT-N8013 using Tapatalk 2
Working on Jelly "Beans" build 2
Awesome! Works great! I was about to switch back to ICS because of not being able to tether and I am glad I waited! Thank you so much for this!
Works for me on stock SPRINT JBTW gs3. Amazing!
Not working for me on stock Sprint JB LJ7.
Few things I've seen
-Encryption doesnt work.
Ill look into it, but I know its a longrunning bug for some devices. Use access control for now. I dont actually have a GS3 so its kinda a wonder this works at all
-Tether doesnt work
Please give some more details- what mode are you in regular or fallback?
does tethering turn on and show statistics at bottom of screen? if not what does the log show inside of wifitether? if so does windows see the accesspoint?
As far as Sprint LJ7 ill download the rom and check it but answers to above will help. a logcat of it turning on and off would be most helpful I threw a bunch of debugging lines in

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

[Q] Openvpn Binary for Lollipop S5

With the lolipop update a new security feature was enforced that an executable must be position independent (PIE) see:
http://en.wikipedia.org/wiki/Position-independent_code
I am trying to run an openvpn binary in a terminal emulator (command line/shell whatever you want to call it) on a rooted sprint s5 extracted from the openvpn installer apk:
https://play.google.com/store/apps/details?id=de.schaeuffelhut.android.openvpn.installer&hl=en
There is a thread on xda regarding disabling the pie security but it talks about nexus and not an s5 and I even tried the patches but it didn't work for me (I didn't get the same error about pie but it still didn't help) it works perfectly fine from a kitkat note 3.
http://forum.xda-developers.com/google-nexus-5/development/fix-bypassing-pie-security-check-t2797731
I am looking for any possible solutions (ie lolipop compatible openvpn binary or a working pie patch for the s5)
Thanks so much!
binary
hi ejgreenwald try the attached binary. it almost worked for me (Galaxy S5 5.0.1 i think) but should work now samsung have done some updates.
Error with this binary
When running this binary on 5.1.1, I get the following error:
linux ip link set failed: could not execute external program
A search on this error suggests that iproute2 may need to be included in the core
Any ideas, anyone?
SHKaminski said:
When running this binary on 5.1.1, I get the following error:
linux ip link set failed: could not execute external program
A search on this error suggests that iproute2 may need to be included in the core
Any ideas, anyone?
Click to expand...
Click to collapse
it might need busybox?
SHKaminski said:
When running this binary on 5.1.1, I get the following error:
linux ip link set failed: could not execute external program
A search on this error suggests that iproute2 may need to be included in the core
Any ideas, anyone?
Click to expand...
Click to collapse
Copy /system/xbin/ip /sbin
Hi guys! Thank you jamie_clarke_jc and gRUblo !!!
Thanks to your answers and binary I managed to finally run openvpn on my Note 3.
I can confirm that it works also beautifully on Samsung N9005 Android 5.0 :good:
EDIT: Smalll Update ...
I'm sorry, it turns out that I still have no connection through OpenVPN!
I thought that everything is fine because OpenVPN settings showed that I am connected, and I even getting an IP form VPN, but cannot ping to other devices on the same network. At first glance, I thought that it works, but it turned out that the web pages load of a devices loads from web browser cache ::crying:
wydziub said:
Hi guys! Thank you jamie_clarke_jc and gRUblo !!!
Thanks to your answers and binary I managed to finally run openvpn on my Note 3.
I can confirm that it works also beautifully on Samsung N9005 Android 5.0 :good:
Click to expand...
Click to collapse
Using this binary, latest busybox, and with the ip copied to /sbin ... I still get ... "unable to redirect default gateway - VPN gateway parameter (-route-gateway or -ifconfig) is missing".
Any ideas y'all?
rmedure said:
Using this binary, latest busybox, and with the ip copied to /sbin ... I still get ... "unable to redirect default gateway - VPN gateway parameter (-route-gateway or -ifconfig) is missing".
Any ideas y'all?
Click to expand...
Click to collapse
I think i might be because your ifconfig.
I have ifconfig in:
- /system/bin/ifconfig (link to /system/bin/toolbox) -stock ifconfig, not able to create tunnel,
- /system/xbin/ifconfig (link to /system/xbin/busybox) -created by busybox, that one works.
Path to ifconfig is fixed in the OpenVpn binary, and in the binary sent by jamie_clarke_jc, it is:
"/system/xbin/ifconfig", (since it works in my case).
Same for "route", path should be: "/system/xbin/route" (link to /system/xbin/busybox).
Please check if you've installed busybox in correct path, if yes, maybe try another version of busybox.
My openvpn binary is also located in "/system/xbin/".
It might have something to do with a client.
Mine is great" Open VPN Settings" by Friedrich Schäuffelhut.
wydziub said:
I think i might be because your ifconfig.
I have ifconfig in:
- /system/bin/ifconfig (link to /system/bin/toolbox) -stock ifconfig, not able to create tunnel,
- /system/xbin/ifconfig (link to /system/xbin/busybox) -created by busybox, that one works.
Path to ifconfig is fixed in the OpenVpn binary, and in the binary sent by jamie_clarke_jc, it is:
"/system/xbin/ifconfig", (since it works in my case).
Same for "route", path should be: "/system/xbin/route" (link to /system/xbin/busybox).
Please check if you've installed busybox in correct path, if yes, maybe try another version of busybox.
My openvpn binary is also located in "/system/xbin/".
It might have something to do with a client.
Mine is great" Open VPN Settings" by Friedrich Schäuffelhut.
Click to expand...
Click to collapse
Hmm, I have busybox from Stephen Erickson installer ... in /system/xbin, same 5.27MB openvpn binary above, and same client by Friedrich. Are you using TAP device? (Note, no problem here with TUN device ... but really need bridged connection)
Is there a chance to get this binary recompiled to the latest openvpn code? Looking to get this patch included to help with my TAP configuration:
http://article.gmane.org/gmane.network.openvpn.devel/10111
I've been using the paid version of 'OpenVPN Client' app by colucci-web.it for a month or so now ... their TAP emulator has been working fine with no issues so far as I can tell.

Categories

Resources