Problems with Transparent Proxy. - Folio 100 General

Hi, i have a folio 100 rooted with SuperOneClick, but when i try to connect me to a proxy with Transparent Proxy it says:
failed to start redirect.sh
permission denied

i find a solution and now i have root access with the app, but when I try to turn the proxy on, I get this error:
"Failed to start redirect.sh (FIX ME! implement
getprotobyname() bionic/libc/bionic/stubs.c:378
iptabels v1.3.7: can't initialize iptables table 'nat':iptables
who? (do you need to insmod?)
Perhaps iptables or your kernel need to be upgraded"
the message repeats.

Nobody has a solution?

gilms said:
Nobody has a solution?
Click to expand...
Click to collapse
I don't have a 'solution' but you can diagnose the problem more easily if you have the file /proc/config.gz on your device... copy it off and unzip, open and look for:
Code:
#
# IP: Netfilter Configuration
#
These are the ones that probably matter?
Code:
CONFIG_NF_CONNTRACK_IPV4=y
CONFIG_IP_NF_IPTABLES=y
CONFIG_IP_NF_FILTER=y
CONFIG_IP_NF_TARGET_REDIRECT=y
I have a lot more set to =y on my device (Atrix)
You probably also need to have the 'iptables' binary in /sbin
You'd probably do best to start from a newer kernel that some dev modded for your device, and already enabled netfilter... then all you need is iptables

Related

tun driver for our hero

Hi!
For the ones interested in openvpn or vpnc I attach the tun.ko module.
Have fun.
Here is the tun driver package. Think you should have a rooted device to make use of it.
To install:
1. copy it to your <sdk>/tools folder
2. adb push hero-tun-module-signed.zip /sdcard/update.zip
3. Type 'adb shell reboot bootloader' to enter the bootloader.(or turn it off and then, holding back button, turn it on)
4. Type 'fastboot boot cm-hero-recovery.img' - the device will now boot into the recovery image.
5. Select the option to 'apply update.zip from SD card'. Let it complete.
6. select reboot
Hi!
Good idea and thanks for packaging it. I just made a quick shot ;-)
Will add this to 1.2.
P
get-a-robot-vpnc does not work using the tun driver included in
2.0-update-hero-modacocustomrom-enhanced-signed.zip
The message appears after entering the pasword for sign on.
The application VPN Connections (process org.codeandroid.vpnc_frontend) has stopped unexpectedly.
# insmod /system/lib/modules/tun.ko
insmod /system/lib/modules/tun.ko
insmod: can't insert '/system/lib/modules/tun.ko': invalid module format
whether tun.ko is fron the 2.0 zero,
or installed via update.zip from hero-tun-module-signed.zip - above.
dmesg says
tun: version magic '2.6.27-a5504199 preempt mod_unload ARMv6 ' should be '2.6.27-8dd6deee preempt mod_unload ARMv6 '
the /etc/net folder does not exist, neither does /etc/tun
tun for 2.6.27-8dd6deee
See attachment for tun driver kernel version: 2.6.27-8dd6deee
(MoDaCo 2.0)
Thanks gogh57,
insmod ran OK.
installed to /dev/tun
vpn is now Trying to connect...
I'll have to check the VPN parameters.
Will let you know.
Brilliant work, many thanks.
I've check and verified my vpn parameters, but get a failed to connect. I'll keep reading and trying and will let you all know.
For info, all I have done - just in case I have missed a fundamental step...
1. Installed VPN connections from the market
2. Configured a network to connect to
3. copied tun.ko to SD card
4. ran adb shell to get on phone then insmod tun.ko - no errors, and shows with lsmod
5. tried to connect.
Getting closer....!
Bryan
How to install it on my Hero?
Hi all,
I have the same problem. Currently using Modaco's 1.5.1 and I do not want to move to 2.0 as it seems that it does not offer any advantage and I am happy until now with 1.5.1.
I am trying to install tun.ko which exists in system/lib/modules (installed with Modaco's ROM). When installing the tun.ko, I get "Exec format error" with dmesg:
# dmesg | grep tun
<3>[152396.817749] tun: version magic '2.6.27-a5504199 preempt mod_unload ARMv6
' should be '2.6.27-44690c1a preempt mod_unload ARMv6 '
How can I find the 2.6.27-44690c1a version ?
Or else I will wait for Bryan's tests and if successful, I will move to 2.0
Thanks for any help
Yiannis
<EDIT> - Moved to Modaco 2.1, Insmod runs OK, VPN-Connect does not connect. I'll dig more and let u know
Newby question, but what can you do with it?
YiannisM said:
Hi all,
I have the same problem. Currently using Modaco's 1.5.1 and I do not want to move to 2.0 as it seems that it does not offer any advantage and I am happy until now with 1.5.1.
I am trying to install tun.ko which exists in system/lib/modules (installed with Modaco's ROM). When installing the tun.ko, I get "Exec format error" with dmesg:
# dmesg | grep tun
<3>[152396.817749] tun: version magic '2.6.27-a5504199 preempt mod_unload ARMv6
' should be '2.6.27-44690c1a preempt mod_unload ARMv6 '
How can I find the 2.6.27-44690c1a version ?
Or else I will wait for Bryan's tests and if successful, I will move to 2.0
Thanks for any help
Yiannis
<EDIT> - Moved to Modaco 2.1, Insmod runs OK, VPN-Connect does not connect. I'll dig more and let u know
Click to expand...
Click to collapse
I'm getting nowhere with this. I'll have to look on the phone to see if it logs anywhere to help diagnose
Let use know YiannisM if you get anywhere?!
Bryan
On my HTC Hero
Using Modaco 2.2
tun.zip included in above
VPN Connections installed
and modified scripts described here:
http://techha.us/2009/06/android-vpn-vpnc/
VPN works now,
stared via an adapted 'go' script. (but not using VPN Connections UI)
I use ConnectBot for terminal.
I'll post exact details tonight.
pvlagsma said:
I'll post exact details tonight.
Click to expand...
Click to collapse
Look forward to it, I had a quick go following the link you gave, but it *****ed (unsurprisingly) at the location of the tun device.
Well done for cracking it
So close now!
J-Zeus said:
Newby question, but what can you do with it?
Click to expand...
Click to collapse
From Wiki....
A virtual private network (VPN) is a computer network in which some of the links between nodes are carried by open connections or virtual circuits in some larger networks (such as the Internet), as opposed to running across a single private network. The Link Layer protocols of the virtual network are said to be tunneled through the transport network. One common application is to secure communications through the public Internet, but a VPN does not need to have explicit security features such as authentication or content encryption. For example, VPNs can also be used to separate the traffic of different user communities over an underlying network with strong security features, or to provide access to a network via customized or private routing mechanisms.
Simply put, for most people I imagine, it allows us to connect to work.
Bryan
pvlagsma said:
On my HTC Hero
Using Modaco 2.2
tun.zip included in above
VPN Connections installed
and modified scripts described here:
http://techha.us/2009/06/android-vpn-vpnc/
VPN works now,
stared via an adapted 'go' script. (but not using VPN Connections UI)
I use ConnectBot for terminal.
I'll post exact details tonight.
Click to expand...
Click to collapse
Also looking forward to this.
Installing VPN on the HTC Hero.
References:
----------
A: This thread - http://forum.xda-developers.com/showthread.php?p=4503502
B: vpnc details - http://techha.us/2009/06/android-vpn-vpnc/
C: ROM 2.2 - http://android.modaco.com/content/h...m-is-here-2-versions-based-on-the-new-update/
D: VPN_Connections: - http://code.google.com/p/get-a-robot-vpnc/downloads/list
E: ConnectBot - android market - the terminal app I use on my Hero. You can do all this from an 'adb shell' on your PC.
1. Flash the 2.2 ROM (others probably work, but the correct tun.ko for the linux build is included in the ROM) from Ref C.
2. Download the latest version (VPN_Connections_v09.apk at time of writing) from get-a-robot-vpnc (Ref D), and install on your Hero.
This provides the vpn modules that are needed.
However I could not get this UI to work on the Hero. It kept hanging, sometimes asking for the password, sometimes not.
Note: the android market version is still 0.6
3. Install the tun.ko module with a script, or manually. This needs to be done each time you boot the Hero.
The script is:
'prep' script ( the following 3 lines: )
-----------
insmod /system/lib/modules/tun.ko
mkdir /dev/net
ln -s /dev/tun /dev/net/tun
Install tun by typing:
sh /sdcard/prep
or typing the 3 commands. (you need to be root, to do this)
(I placed my script on the microSD card, /sdcard/prep)
You can call this script anything you like.
4. Make an 'vpn.conf' file .
IPSec gateway vpn.aa.bb.com
IPSec ID youroffice
IPSec secret yourofficepassword
Xauth username youruid
Place it on /sdcard/vpn.conf
See Ref B for details.
You can call this configuration file anything you like.
5. Make a 'go' script, like this (one long line)
/data/data/org.codeandroid.vpnc_frontend/files/vpnc /sdcard/vpn.conf --script /data/data/org.codeandroid.vpnc_frontend/files/vpnc-script --pid-file /sdcard/vpnc-pid --no-detach --debug 1
Put it in a file /sdcard/go .
N.B. The 'go' script refers to the 'vpn.conf' file which you created earlier.
See Ref B for details.
You can call this script anything you like.
(Note: VPN Connections (Ref D) installs its files to /data/data/org.codeandroid.vpnc_frontend )
6. Start VPN by typing:
sh /sdcard/go
hopefully you will see
# sh /sdcard/go
sh /sdcard/go
Enter password for [email protected]: <this is where you type in your password>
vpnc version ERSION
IKE SA selected psk+xauth-3des-sha1
NAT status: no NAT-T VID seen
got address 33.333.333.333
RTNETLINK answers: File exists
backing up dns and resolve.conf
cp: cannot stat '/etc/resolv.conf': No such file or directory
vpnc-script ran to completion
IPSEC SA selected 3des-sha1
VPNC started in foreground...
&. Start an ssh connection, or a browser to an internal website, or whatever
Brilliant, many thanks!!
couldn't find a /etc/resolv.conf have put a couple of address' into /etc/hosts so I can browse my intranet.
How are you doing DNS??
Bryan
Is it possible to configure for IPSec over tcp?
Just an update from me, the VPN Connect frontend does not work, I have used pvlagsm's instructions and worked for me.
Thanks

[HOWTO] Use OPENVPN/IPSec on Nook Color

I have compiled tun.ko for the Nook color.
Here are the instructions to get OpenVPN up and running.
I dont have a fully working OpenVPN server to test this completely but I was able to connect and get authenticated. If someone can test this out and report whether this works that would be useful.
Download tun.ko module from here
http://dl.dropbox.com/u/16190398/tun.ko
Type the following from your windows or linux console
adb shell
#mount -o remount,rw /dev/block/mmcblk0p5 /system
#su
#cd /system/lib
#mkdir modules (if it doesnt exist)
#exit
#exit
Now you are back at your windows or linux prompt
adb push tun.ko /system/lib/modules
adb shell
#su
#insmod /system/lib/modules/tun.ko
If everything works fine you should see no errors
#lsmod
You should see something like this
tun 11416 0 - Live 0xbf153000
#exit
#exit
So far so good.
Now go to the Android Market and download
1. busybox (if not already installed)
2. OpenVPN Installer
3. OpenVPN Settings
Run the OpenVPN Installer first. It will detect that OpenVPN binary is not installed and ask permission to install. You can choose to install it in /system/xbin or /system/bin (I installed it under /system/bin).
OpenVPN also needs the path to ifconfig and route which is provided by busybox. It will ask for the path and create symlinks. I created mine under /system/xbin/bb.
Next copy your openvpn config files and .crt files under /sdcard/openvpn.
Finally, run OpenVPN settings. If you have a valid config file under /sdcard/openvpn you should see those connections listed.
From the advanced menu you can set the path to your tunnel module as /system/lib/modules/tun.ko and load the module using modprobe.
Set the path to your configuration files (default is /sdcard/openvpn).
If everything looks fine then go back to main screen and click the checkbox next to your listed connection.
You should get a login icon in the notification bar if your connection requires username/password.
Thats it. Browse your internal network to check if everything is working as desired.
I just had a baby a few weeks ago and dont have time to troubleshoot this.
If someone can take over and post better/detailed instructions on making this work that would be great.
---------- 05/06/2011 Update -------------
Updated version of tun.ko for the 1.2 update. This for for kernel version 2.6.32.9.
In order to connect to Cisco/Freeswan VPN concentrators you can download VPNconnections from here. The instructions are quite straightforward and listed on the project page. http://code.google.com/p/get-a-robot-vpnc/
You will need to load tun.ko for both openvpn and VPNConnections.
http://dl.dropbox.com/u/16190398/Nook Color 1.2/tun.ko
Thanks for the step-by-step guide on this, I can confirm that it does work as expected. I was able to connect to an OpenVPN server and route traffic properly over it. One more damn device that ties me to work now, wooh!
At my work we use a Cisco VPN. On my phone I use an app called VPN Connections. I loaded the module and instead of using the open vpn I used the apk mentioned above. But it didn't work. Does the OpenVPN support Cisco vpns?
has anyone gotten this to work with alwaysVPN??
after i enter my username and password
I get
connecting
Auth
get config
then a popup window saying
fatal: cannot allocate Tun/Tap dev dynamically
iandixo said:
has anyone gotten this to work with alwaysVPN??
after i enter my username and password
I get
connecting
Auth
get config
then a popup window saying
fatal: cannot allocate Tun/Tap dev dynamically
Click to expand...
Click to collapse
Probably your tun.ko module is not loaded.
Did you set the path to tun.ko from OpenVPN settings ?
Can you use adb shell and
type
#insmod /system/lib/modules/tun.ko
then
#lsmod
and report what you see.
likearaptor said:
At my work we use a Cisco VPN. On my phone I use an app called VPN Connections. I loaded the module and instead of using the open vpn I used the apk mentioned above. But it didn't work. Does the OpenVPN support Cisco vpns?
Click to expand...
Click to collapse
OpenVPN client wont work with Cisco's VPN. They use different protocols.
However, VPN Connections is supposed to be compatible with Cisco/FreeSwan and other IPSec VPNs.
I havent used VPNConnections but if there is any option to load the tun module then you can try setting the path and loading the module.
I would suggest that you first try loading the tun.ko module manually using adb shell. Then run VPN Connections and maybe it will work
dascud said:
Probably your tun.ko module is not loaded.
Did you set the path to tun.ko from OpenVPN settings ?
Can you use adb shell and
type
#insmod /system/lib/modules/tun.ko
then
#lsmod
and report what you see.
Click to expand...
Click to collapse
I get
tun 11416 0 - Live 0xbf113000
tiwlan_drv 862084 0 - Live 0xbf03b000
bc_example 6460 0 - Live 0xbf034000
omaplfb 16584 0 - Live 0xbf02a000
pvrsrvkm 150196 56 bc_example,omaplfb, Live 0xbf000000
and the path is set in settings
what should I see in /system/xbin/bb ?? as there is nothing there at all. Reason I asked is for some unknown reason and without me changing anything, the error has now changed to something about "ifconfig unable to load external program" it flashes to fast to read
iandixo said:
I get
tun 11416 0 - Live 0xbf113000
tiwlan_drv 862084 0 - Live 0xbf03b000
bc_example 6460 0 - Live 0xbf034000
omaplfb 16584 0 - Live 0xbf02a000
pvrsrvkm 150196 56 bc_example,omaplfb, Live 0xbf000000
and the path is set in settings
what should I see in /system/xbin/bb ?? as there is nothing there at all. Reason I asked is for some unknown reason and without me changing anything, the error has now changed to something about "ifconfig unable to load external program" it flashes to fast to read
Click to expand...
Click to collapse
This is good. Make sure that you set the path as the full path to the module as
/system/lib/modules/tun.ko in OpenVPN settings. (Yea path is a little misleading)
The error is due to openvpn not finding the path to ifconfig and route which is required to set the IP address for the tun device and push the default routes.
Did you install busybox ?. If not then you should install that.
If you already installed busybox then do this
adb shell
#mount -o remount,rw /dev/block/mmcblk0p5 /system
#su
#which busybox
This should return /system/bin/busybox
Under /system/bin you should also find ifconfig and route which are essentially symlinks to busybox
Now navigate to the /system/xbin directory
#cd /system/xbin
#mkdir bb (if it doesnt exist)
#cd /system/bin
#cp ifconfig /system/xbin/bb
#cp route /system/xbin/bb
#cd /system/xbin/bb
# ./ifconfig
This should return some details about the tiwlan0 interface.
#exit
#exit
Try again and see if this works. If not you can run the OpenVPN installer again.
Shouldnt matter if you already ran it once before.
Set the path for the openvpn binary as /system/bin &
the path for ifconfig as /system/xbin/bb
Hopefully this should do the trick.
Hmm. I can't get this to work with VPN Connections either. lsmod says the module is loaded, but VPN Connections fails. I won't have time to look at this for a week or so, but if anyone has VPN Connections working with this tun.ko, that would be good to know.
well I'm getting somewhere it now connects and it seems to be passing data ...but I'm only getting a connection of 0.09kBps up and 0.06kBps down
FletchF said:
Hmm. I can't get this to work with VPN Connections either.
Click to expand...
Click to collapse
Just to clarify, "VPN Connections" is an Android VPN client that can connect to a Cisco IPSEC VPN concentrator. It works well for me on my DROID.
link down? -nm
Hi. This sounds awesome. I am trying to get vpn since i left my laptop at home and my captivate is too small to do basic work.
I can't seem to dload the above but no go for dolphin or google browser.
Can someone post a mirror?
Edit: got it... couldn't get w the browsers and rockplayer seemed to want to play it. Used ie and got it ok.
I would love to hear if anyone else has had any success with alwaysVPN. I can connect but just can't seem to get any data ...
iandixo said:
well I'm getting somewhere it now connects and it seems to be passing data ...but I'm only getting a connection of 0.09kBps up and 0.06kBps down
Click to expand...
Click to collapse
I recall that I had the same issue initially. I was able to get connected but not browse the internal network. The monitor would show a connection of 0.09Kbps.
I think this means that the initial handshake went through but the server was not able to push the ip address or the default routes.
When you get connected you should see a status which progresses as
Auth - > Get Config -> and finally connected to "server IP" as "your new IP address". If you dont see your new IP address then the connection is not fully functional.
A rather unscientific method to fix it which worked for me was
1.) Uninstall busybox
2.) Reinstall busybox
3.) Run OpenVPN Installer again
set path to Openvpn binary as /system/bin
set path to ifconfig as /system/xbin/bb
adb to /system/xbin/bb and check if ifconfig and route exists.
Reboot, do a minor rain dance and pray to the God of your choice while the Nook is rebooting.
So just to let everyone know I got VPN Connections working for my work's Cisco VPN. I did the steps outlined at first, downloaded the file, insmod the file, added openvpn and settings apps, then tried my vpn connections app but it wouldn't work. So I gave up. Two days later I tried it for fun after I had rebooted it many times and it worked! I haven't done a insmod command and I have uninstalled the two OpenVPN commands
likearaptor said:
So just to let everyone know I got VPN Connections working for my work's Cisco VPN. I did the steps outlined at first, downloaded the file, insmod the file, added openvpn and settings apps, then tried my vpn connections app but it wouldn't work. So I gave up. Two days later I tried it for fun after I had rebooted it many times and it worked! I haven't done a insmod command and I have uninstalled the two OpenVPN commands
Click to expand...
Click to collapse
I was also able to get "VPN Connections" aka vpnc, working using this method.
Am now able to connect to my Cisco ASA, thanks for the great post.
My NookColor has been all of the sudden playing a load static noise when it is off and the only way to stop it is to turn it off. So I reset everything back to stock 1.0.1 and I will wait and see if it does it without it being rooted. If so I will get a different unit. But in the next week or two I will root it again and see if I need to install OpenVPN or not.
acomiskey said:
I was also able to get "VPN Connections" aka vpnc, working using this method.
Click to expand...
Click to collapse
Hmm. Still trying here. How many reboots did it take?
FletchF said:
Hmm. Still trying here. How many reboots did it take?
Click to expand...
Click to collapse
Just one for me, I did a lot of little things trying to get it to work, once I re-root later this week or next week I will post step by step directions to get it to work unless someone else beats me to it
FletchF said:
Hmm. Still trying here. How many reboots did it take?
Click to expand...
Click to collapse
I think just 1.
I had "vpn connections" installed. I then follow the instructions at the beginning of this thread. I stopped at "Next copy your openvpn config files and .crt files under /sdcard/openvpn" since I wasn't interested in using openvpn.
I then rebooted, launched "vpn connections" and it connected.
I cannot however get the vpnc widget to work.

[Q] VPN Connections - anybody running on Archos 70 IT ?

Hello,
I'm trying to connect to a Cisco VPN client by using VPN Connections on an Archos 70 IT 250 GB, that is rooted.
I always get a "Connection failed" message, after which the app crashes.
Did anyone succeed in getting VPN Connections working on Archos 70 IT ?
Regards,
Tonny
TonnyVanmunster said:
Hello,
I'm trying to connect to a Cisco VPN client by using VPN Connections on an Archos 70 IT 250 GB, that is rooted.
I always get a "Connection failed" message, after which the app crashes.
Did anyone succeed in getting VPN Connections working on Archos 70 IT ?
Regards,
Tonny
Click to expand...
Click to collapse
Hi,
I used to have the same error on my Galaxy S, when trying to create a VPN tunnel to my companies CISCO gateway.
The problem seems to relate to the missing tun.ko library.
I'm not sure if the Samsung Galaxy files will work for Archos, but you might want to adapt and try the following how-to: http://forum.xda-developers.com/showthread.php?t=793712&highlight=tun.ko
Regards,
Patrick
TonnyVanmunster said:
Did anyone succeed in getting VPN Connections working on Archos 70 IT ?
Click to expand...
Click to collapse
I found a possible clue. After trying several free pptp vpn services and noticing that it seemed to resolve a url one time then just hang, I set up a vpn on my lan and tried the local coffee shop connection to access it. I found that if encryption was completely disabled on the lan vpn and unchecked on the 70 IT, it would connect and I could browse, check email, etc. As soon as I set the policy on the vpn server to enable any level of encryption it was back to the resolve 1 url and hang behavior. Of course an unencrypted vpn is about as worthless as t*ts on a bull but it's the only clue I've found. As a control, I tried an ip*d touch w/encryption on against the same vpn with all levels enabled and that worked.
If anybody else who's running a local vpn can duplicate and confirm this, it's a step in the right direction!
VPN Connections 0.99 (aka get-a-robot-vpnc) working on A101IT with urukdriod-0.6
I've managed to make get-a-robot-vpnc (aka VPN Connections 0.99) work on urukdroid0.6 on Archos 101 IT.
There are two issues with default vpnc.script, and one issue with output of 'ps' command needed by VPN Connections 0.99 GUI, to check is there a connected vpnc process.
Resolving vpnc.script issues:
1. Symbolic link is missing that links /bin/busybox (or /usr/local/bin/busysbox on urukdroid) to 'which' command (cd /usr/local/bin; ln -s busybox which)
2. Symbolic link is missing that links /bin/busybox (or /usr/local/bin/busysbox on urukdroid) to 'ip' command (cd /usr/local/bin; ln -s busybox ip)
$aur0n told me that this two commands/links will be included in urukdroid-0.7.
Resolving GUI 'ps' issue (a bit harder ):
VPN COnnections GUI do 'ps | grep 'vpnc$' to see is there active vpnc process (established connection), but output of 'ps' command(s) found on urukdroid is not what GUI expects, so it cannot find vpnc proccess even if it is running and VPN is established.
On urukdroid there is 2 versions of 'ps' command:
1st is /bin/ps which is symbolic link to /bin/busybox (very old version of busybox (1.7.2, I believe) and output of ps this command is not suitable for VPN Connections (GUI)
2nd is /usr/local/bin/ps which is native ps command, but its output is also not suitable for VPN Connections (GUI)
There is a (hidden ) 3rd 'ps' command in /usr/local/bin/busybox (that version of busybox is 1.17.2) - but also not suitable output for VPN Connections (GUI).
Experimenting a bit I've found that '/usr/local/bin/ps -A' gives an suitable output, so I:
1. renamed /usr/local/bin/ps to /usr/local/bin/ps.new
2. made a script /usr/local/bin/ps with:
Code:
#!/bin/sh
ps.new -A
exit $?
3. chown root:root /usr/local/bin/ps; chmod 755 /usr/local/bin/ps
After that, everything worked.
Hope this solves issues for some of you
P.S. Forgot to mention - urukdroid 0.7 will have its own vpnc service built-in.
Works in UD 1.5
nenadr said:
I've managed to make get-a-robot-vpnc (aka VPN Connections 0.99) work on urukdroid0.6 on Archos 101 IT.
There are two issues with default vpnc.script, and one issue with output of 'ps' command needed by VPN Connections 0.99 GUI, to check is there a connected vpnc process.
Resolving vpnc.script issues:
1. Symbolic link is missing that links /bin/busybox (or /usr/local/bin/busysbox on urukdroid) to 'which' command (cd /usr/local/bin; ln -s busybox which)
2. Symbolic link is missing that links /bin/busybox (or /usr/local/bin/busysbox on urukdroid) to 'ip' command (cd /usr/local/bin; ln -s busybox ip)
$aur0n told me that this two commands/links will be included in urukdroid-0.7.
Resolving GUI 'ps' issue (a bit harder ):
VPN COnnections GUI do 'ps | grep 'vpnc$' to see is there active vpnc process (established connection), but output of 'ps' command(s) found on urukdroid is not what GUI expects, so it cannot find vpnc proccess even if it is running and VPN is established.
On urukdroid there is 2 versions of 'ps' command:
1st is /bin/ps which is symbolic link to /bin/busybox (very old version of busybox (1.7.2, I believe) and output of ps this command is not suitable for VPN Connections (GUI)
2nd is /usr/local/bin/ps which is native ps command, but its output is also not suitable for VPN Connections (GUI)
There is a (hidden ) 3rd 'ps' command in /usr/local/bin/busybox (that version of busybox is 1.17.2) - but also not suitable output for VPN Connections (GUI).
Experimenting a bit I've found that '/usr/local/bin/ps -A' gives an suitable output, so I:
1. renamed /usr/local/bin/ps to /usr/local/bin/ps.new
2. made a script /usr/local/bin/ps with:
Code:
#!/bin/sh
ps.new -A
exit $?
3. chown root:root /usr/local/bin/ps; chmod 755 /usr/local/bin/ps
After that, everything worked.
Hope this solves issues for some of you
P.S. Forgot to mention - urukdroid 0.7 will have its own vpnc service built-in.
Click to expand...
Click to collapse
Just wanted to say thanks! I'm using Urukdroid 1.5 and had the same issue. Used your trick and now VPNC connects to my companies VPN ^_^

[Q] [XPERIA P] Configuring wireless adapter

Hi,
The goal of my project is to implement mobile ad-hoc network routing protocol(AODV).
My problem is that I need to reconfigure the wireless driver/adapter to be able to work in ad-hoc mode. This means receiving packets from other nodes and resending packets if 2 nodes which want to communicate are far away from each other.
I don't have experience with drivers changing and I'm noob in Linux.
For better imagination, I've got source code for the Nexus One and HTC Hero and this code should be able to change wireless drivers configuration on these devices.
Here's the code for Nexus One:
Code:
case 0: //NEXSUS
system("insmod /system/lib/modules/bcm4329.ko");
snprintf(cmd, sizeof cmd, "ifconfig eth0 %s netmask 255.255.255.0", ip);
printf("\ncmd: %s\n", cmd);
system(cmd);
system("ifconfig eth0 up");
system("iwconfig eth0 mode ad-hoc");
system("iwconfig eth0 essid nexusbac");
system("iwconfig eth0 channel 6");
system("iwconfig eth0 commit");
break;
And here for the HTC Hero
Code:
system("insmod /system/lib/modules/wlan.ko");
system("wlan_loader -f /system/etc/wifi/Fw1251r1c.bin -e /proc/calibration -i /data/local/bin/tiwlan.ini");
snprintf(cmd, sizeof cmd, "ifconfig tiwlan0 %s netmask 255.255.255.0", ip);
system(cmd);
system("ifconfig tiwlan0 up");
break;
I was wondering if you could give me some advice what commands to use.
My Sony Xperia P is Rooted and I'm using Honami Moonwalker V8 ROM.
It seems that command ifconfig is not working. If I try to execute e.g
Code:
ifconfig eth0 up
android shell throws this error:
ifconfig eth0 up
error: SIOCGIFFLAGS (No such device)
Thank you for your answers. I really appreciate the time you give to this thread.
Try wlan0
ChikeD said:
Try wlan0
Click to expand...
Click to collapse
thanks ChikeD, it seems that wlan0 works fine for ifconfig but it seems that iwconfig binary is missing. Are there any alternatives for this shell command in Android?
I tried to use iwconfig binary from Android tethering project but using it throws an error like this:
Code:
[email protected]:/ # iwconfig wlan0 essid xperiaP
SET failed on device wlan0; Invalid argument
Ageiris said:
thanks ChikeD, it seems that wlan0 works fine for ifconfig but it seems that iwconfig binary is missing. Are there any alternatives for this shell command in Android?
I tried to use iwconfig binary from Android tethering project but using it throws an error like this:
Code:
[email protected]:/ # iwconfig wlan0 essid xperiaP
SET failed on device wlan0; Invalid argument
Click to expand...
Click to collapse
There is iw binary see what you can make out of that.
ChikeD said:
There is iw binary see what you can make out of that.
Click to expand...
Click to collapse
Thanks, this looks very interesting. I'll give some feedback later if I manage to make it work
Ageiris said:
Thanks, this looks very interesting. I'll give some feedback later if I manage to make it work
Click to expand...
Click to collapse
You changing the driver source?
ChikeD said:
You changing the driver source?
Click to expand...
Click to collapse
I just need to make it work in the ad-hoc mode. If think it's an IBSS mode. I just need to figure out, how to setup this type of connection
Ageiris said:
I just need to make it work in the ad-hoc mode. If think it's an IBSS mode. I just need to figure out, how to setup this type of connection
Click to expand...
Click to collapse
Assuming(thinking) is not an option.
From a brief look at the sources it seems the ad-hoc is not implemented.
ChikeD said:
Assuming(thinking) is not an option.
From a brief look at the sources it seems the ad-hoc is not implemented.
Click to expand...
Click to collapse
Sorry for delay.
So you don't consider an IBSS mode as a true ad-hoc mode? Am I right? I thought that IBSS is like a synonym of the term "ad-hoc"
According to this website: http://en.kioskea.net/contents/804-wifi-modes-of-operation-802-11-or-wi-fi
It should be the same.
To my problem. I've made this commands to work:
Code:
/*Bring the interface up (an additional step like rfkill unblock wifi might be needed: ip link set wlan0 up*/
system("iw dev wlan0 set type ibss"); //Set the operation mode to ibss ):
system("iw dev wlan0 ibss join MyAdHocNetwork 2412") //frequency for channel 6: 2437, 2412 for channel 1...
system("ip addr add 192.168.1.2/24 broadcast 192.168.1.255 dev wlan0");
system("ip route add default via 192.168.1.1");
What do you think?
Thanks
Seems so, does it work?
ChikeD said:
Seems so, does it work?
Click to expand...
Click to collapse
I don't know yet. I seems that everything is set up. Now I need to buy at least another xperia p or similar smartphone to test communication.
I am now trying to run ad-hoc mode on HTC Desire and Tablet Prestigio Multipad 3270b. But it's pain, because they don't have iwconfig and iw binaries.
Ageiris said:
I don't know yet. I seems that everything is set up. Now I need to buy at least another xperia p or similar smartphone to test communication.
I am now trying to run ad-hoc mode on HTC Desire and Tablet Prestigio Multipad 3270b. But it's pain, because they don't have iwconfig and iw binaries.
Click to expand...
Click to collapse
So what is the purpose of this?
Doesn't have to be a smartphone, you can do it with a wireless pc/laptop
http://windows.microsoft.com/en-us/windows/set-computer-to-computer-adhoc-network#1TC=windows-7
http://www.tp-link.com/en/article/?id=219
ChikeD said:
So what is the purpose of this?
Doesn't have to be a smartphone, you can do it with a wireless pc/laptop
http://windows.microsoft.com/en-us/windows/set-computer-to-computer-adhoc-network#1TC=windows-7
http://www.tp-link.com/en/article/?id=219
Click to expand...
Click to collapse
Thanks for the links. The goal of my project is to run ad-hoc mode on android. I will definitely test this later using windows but I am running out of time, so I'm focusing mainly to at least changing wireless mode from managed to ad-hoc. That's the most difficult thing because right now I am not able to change wireless mode on HTC and Prestigio using linux system commands. Maybe there is a way to change wireless mode programmatically (Java or C) but I haven't found that information yet.

[Q] support openvpn binary development with ndk

friends I downloaded the binary opnevpn for use in android 2.3.6 the question is I downloaded the binary compile from linux, ubuntu.
using ndk, ndk-build a see compiled me tumulto a binary statico the tranfiero to the celulcar and use the settigns openvpn client to connect the server connects, but throw me a FATAL error Linux ip link set failed could not execute external program, and does not connect will put a screenshot of the error that happens when I compile the binary used binary by default works well , my goal by which compile the binary is to be able to add http custom headers, that only this habiliado on android 4.x on thank the assistance and/or sugernecia of this thank you. FOR YOUR ANSWER.
:crying::crying::crying:
my not allow upload image my error is := FATAL Linux ip link set failed could not execute external program :C
My guess is that it cannot execute /system/bin/ip or /system/xbin/ip (this is Android we're talking about, right?)
If I recalled correctly, that's a symlink to busybox, so try adding something like
#include [ipbinaryheader.h]
#include [busybox.h]
Into the c.
Replace [ ] with the sharp one
Disclaimer: I'm relatively new to programming, so please try it yourself and see if it works, I'm not sure.
I'll add more later when I have time.
Sent from my not-an-iPhone using Tapatalk
panpjp said:
My guess is that it cannot execute /system/bin/ip or /system/xbin/ip (this is Android we're talking about, right?)
If I recalled correctly, that's a symlink to busybox, so try adding something like
#include [ipbinaryheader.h]
#include [busybox.h]
Into the c.
Replace [ ] with the sharp one
Disclaimer: I'm relatively new to programming, so please try it yourself and see if it works, I'm not sure.
I'll add more later when I have time.
Sent from my not-an-iPhone using Tapatalk
Click to expand...
Click to collapse
If is so friend is android what am talking, but between as user root in system / bin / and look for, ip and if this in that directory I have a doubt I equal am new in ndk, in where added them header of c that you put excuse me my English and you agredezco always its helps

Categories

Resources