Here are the Scripts sorry it took so long Hope this helps everyone I have been soo dam busy Just run these with gscript from the market run the tunup.sh first to load the tun module then the route fix after you connect to your vpn and you will be good to go. Now if I can get this to work on the mytouch 4g it would be great.
http://www.megaupload.com/?d=1G8ZNYAY
also
OPEN VPN
Install busybox in /system/xbin
openvpn install /system/xbin/openvpn
/sdcard/openvpn goes the client config files
make shure tun.ko is compiled for your kernal and is in /system/lib/modules
run the linker command in adb shell
cd /system/xbin
ln -s /system/xbin /system/xbin/bb
http://code.google.com/p/android-openvpn-settings/issues/detail?id=35 it will tell you why its not routing proparly will have to make a script.
http://forum.xda-developers.com/showpost.php?p=7794052&postcount=1195 this will help get it going.
I you have followed every thread you would know you are posting in the wrong forum. The dev forum is for DEVELOPERS so actual developer threads dont get buried by QUESTIONS.
Move this to QA
my only idea is to post in Q&A for questions (such as this) And to take a deep breath. I know it is frustrating. If you have already read and completed every tutorial and type on the forum i am not sure i can add anything additional to help since i dont deal with VPNS much on my phone. I just wanted to warn you that you may be flamed and get a lot of non useful information since you posted in development.
and before the other start. yes i know it gets old seeing people post wrong forum posts but if everyone posted in the right forum you wouldnt have to see wrong forum posts either!
Whatnissan said:
Ok I have followed every post tried every rom. I got open VPN to work on cm6 but that rom sux and I cant stand using it. Right now I have netarky kernel installed the newest one not the beta and I can get openVPN to connect and it gives me an IP on our network with in the range. but it wont route any traffic. Im pissed because I followed every dam how to and everything to try to get this crap to work. Why isnt vpn built in to android this is such bull**** is there any other roms that have this built in and working im at the end here I have spent countless hours trying to get this to work and now I want to kill the ****in phone. Any ideas???
Click to expand...
Click to collapse
please smash it im sick of these type of post im going to smash my phone ! next topic will be "how do i brick my phone"
Can you check and see if it's a dns issue? I thought I had routing issues with openvpn in linux, but it was just dns... it was even timing out ssh trying to do reverse lookup. I haven't tried to make it work on my Evo yet.. may play with it this afternoon. If I get it working, I'll let you know what I did.
In the meantime.. don't smash your phone!
Whatnissan said:
Ok I have followed every post tried every rom. I got open VPN to work on cm6 but that rom sux and I cant stand using it. Right now I have netarky kernel installed the newest one not the beta and I can get openVPN to connect and it gives me an IP on our network with in the range. but it wont route any traffic. Im pissed because I followed every dam how to and everything to try to get this crap to work. Why isnt vpn built in to android this is such bull**** is there any other roms that have this built in and working im at the end here I have spent countless hours trying to get this to work and now I want to kill the ****in phone. Any ideas???
Click to expand...
Click to collapse
I have to honestly say, that I am sorely confused by your post:
1. Why does CM6 "sux"? Is it the fact that it is not loaded with bloatware? Or do you just like using HTC's outdated, underperforming UI better?
2. It's Netarchy.
3. "Newest one not the beta": very informative; however version number and scheduler type would be much more efficient and poignant.
4. What make/model router are you trying to run traffic through?
5. "Every dam how to and everything to get this crap to work" Wow...ummm...every single one?
6. Believe it or not, VPN is not a commonly requested feature by the majority of the market of end users. Android is purchased primarily by average people who just want a phone that does everything; even though this is a development community, and Android is Linux based, most end users are not technophiles. Hence, VPN is not a big deal for most.
7. "Is there any other roms that have this built in and working im at the end here" I thought you already tried every ROM?
8. Using the singular "is" when referring to something that is plural is not cool.
9. Poor phone (!), it's not even come to life yet and you already want to kill it. This calls for the summoning of the Council of Rabbid Naked Bunnies: I hope you have a good argument for your defense.
10. Nope...no ideas here.
~Jasecloud4
I got pissed at it the other day and thew it against the wall it didnt break at all suprisingly. ok well the issue is
ifconfig shows the tap interface up
it probaly is a dns config issue cause when i check the firebox it shows that im connected from my phone but i cant acess **** and its not pulling any traffic. So how would i fix this?? The fix dns in the openvpn settings didnt work so I have no clue.
I dont like cm6 because when I flashed the latest stable release launcher kept crashing there is no 4g umm lets i didnt like how i couldnt search through my phone #'s HTC's uI is crap but cm6 is not any better. thats my personal opinion. It was reallly unstable and no 4g come on now. What I did like about it is that Openvpn worked right away no configuring except for pointing it to my config file. BUt I couldnt stand using that rom now if it had 4g i would have made it work for me.
I am frusterated what might be normal every day stuff for the people that devolop on here is not for me. Im preatty good at figureing stuff out but dam i have tried every solution that i can think of. I wish it was built in to more roms it would make it great for buisness users. Even now if my phone restarts I have to do a insmod tun.ko manualy through adb shell to get it back up what ever reason it doesnt work through openvpn settings.
# ifconfig
ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:4073 errors:0 dropped:0 overruns:0 frame:0
TX packets:4073 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:250298 (244.4 KiB) TX bytes:250298 (244.4 KiB)
rmnet0 Link encap:Ethernet HWaddr DE:03:2A:65:56:B2
inet addr:184.209.244.110 Bcast:184.209.244.111 Mask:255.255.255.252
UP BROADCAST RUNNING MULTICAST MTU:1472 Metric:1
RX packets:3836 errors:0 dropped:0 overruns:0 frame:0
TX packets:4028 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1425710 (1.3 MiB) TX bytes:470410 (459.3 KiB)
tap0 Link encap:Ethernet HWaddr D2:48:E81:FD:6A
inet addr:10.100.1.101 Bcast:10.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:180 (180.0 B) TX bytes:468 (468.0 B)
#
I dont get it it connects I get an ip and the firebox shows that im connected and on the network I just cant browse anything or connect. Also I cant ping the ip that i was assigned it just times out.
Here is the routing It looks wrong to me but how do I change it??
# /system/xbin/bb/route
/system/xbin/bb/route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
184.208.202.248 * 255.255.255.252 U 0 0 0 rmnet0
10.0.0.0 * 255.0.0.0 U 0 0 0 tap0
default 184.208.202.250 0.0.0.0 UG 0 0 0 rmnet0
#
Try this... http://forum.xda-developers.com/showpost.php?p=7794052&postcount=1195
{FIXED}
I just ran this command through adb and all is good now. I need to make 2 scripts to now to make this work when I need it to.
"ip rule del from all lookup gprs" if on celluler network
"ip ru del table wifi" wifi
I need to make a script that can run either one of those commands and i need to make one that will start in /system/lib/modules and run lnsmod tun.ko
I guess for right now I have a script that I have to run for each its teadious but it works Is there any way to have the client config file execute scripts??
I have the same problem with the PPTP vpn. Worked in 2.1, but under Froyo, connects, gives an IP address, but can't route to anything
-mark
Whatnissan said:
I got pissed at it the other day and thew it against the wall it didnt break at all suprisingly. ok well the issue is
ifconfig shows the tap interface up
it probaly is a dns config issue cause when i check the firebox it shows that im connected from my phone but i cant acess **** and its not pulling any traffic. So how would i fix this?? The fix dns in the openvpn settings didnt work so I have no clue.
Click to expand...
Click to collapse
thew it against the wall what are you 2 ?
That wrapper script didnt work I even tried to run it using gscript after i was connected. I made a script using gscript that just deletes the routing tables
ip ru del route wifi/gprs just run that and its all better now.
I don't think pptp works under froyo I think thats the reason for that.
Whatnissan said:
That wrapper script didnt work I even tried to run it using gscript after i was connected. I made a script using gscript that just deletes the routing tables
ip ru del route wifi/gprs just run that and its all better now.
Click to expand...
Click to collapse
Thanks a lot for your routing fix. I'm finally able to connect to Cisco VPN concentrators now. Is there any way you could post your script so that others can run that instead of running the command manually?
Bump.
I have interest in the script as well.
JZR said:
Thanks a lot for your routing fix. I'm finally able to connect to Cisco VPN concentrators now. Is there any way you could post your script so that others can run that instead of running the command manually?
Click to expand...
Click to collapse
Would you mind a quick run down of what you are using and steps needed to connect to Cisco VPN?
Also, is this AnyConnect or Token?
Related
*More progress 11:04pm CST 8/26/09*
Tracked down what calls the BTIP service, it's /system/lib/libandroid_runtime.so . Tried replacing it with a cupcake build, rebooted and ran into the issue where /system/framework/framework.jar is still referencing calls that were in the Hero libandroid_runtime.so . So replaced framework.jar and framework.odex from cupcake build and got the following error.
Code:
D/AndroidRuntime( 1517): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime( 1517): CheckJNI is OFF
I/dalvikvm( 1517): DexOpt: mismatch dep signature for '/system/framework/core.odex'
E/dalvikvm( 1517): /system/framework/framework.jar odex has stale dependencies
I/dalvikvm( 1517): Zip is good, but no classes.dex inside, and no valid .odex file in the same directory
D/libc-abort( 1517): abort() called in pid 1517
Any "educated" ideas?
*Questions & Progress 01:09pm CST 8/17/09*
So lately what I've been trying to do is find where a reference is made to actually call the BTIPS service. I've been lookiing in /system/framework and /data/app_s/Settings.apk but haven't found it yet. What I'm hoping to do is modify the file and have it call BT the same way cupcake did. Has anyone else found where a reference to "btips" is at?
Settings.apk, which is what pops up when on home screen and you hit menu->settings, only makes a call to "android:targetClass="com.android.settings.bluetooth.BluetoothSettings"
Anywho, if you find it in any system libraries or framework files let me know. Please no PM's or posts about where you "THINK" it may be at. I've already tried the random guessing stuff, now I'm going through libraries one by one trying to find it.
*Some more notes 12:30pm CST 7/24/09*
Here are some notes of interest.
There are two versions of the /system/bin/bts daemon that are floating around on the Hero builds
Code:
md5sum bts
29ffa46f12c01e3690690752b4e2d58d bts
md5sum bts
5aeaca42d67d3b3c64ceda9ee4bfec1a bts
There are also two versions of the TIInit_5.3.53.bts firmware files. One is actually just the brf6300.bin file renamed to match what Hero is looking for in /etc/firmware
Code:
md5sum TIInit_5.3.53.bts
d7a214bdb9b4fbc2b4e2dd7e3ab95df0 TIInit_5.3.53.bts
md5sum TIInit_5.3.53.bts
cb3d2ecbfc97c026a0dcceb8c959b7db TIInit_5.3.53.bts
If you run "strings" on /system/bin/bts and grep for "TII" you'll be able to tell which firmware files that version supports
Code:
TIInit_3.4.27.bts
TIInit_4.2.38.bts
TIInit_5.2.34.bts
TIInit_5.3.53.bts
TIInit_6.2.31.bts
*Nice picture illustrating BT architecture in Android 7:04pm CST 7/17/09*
*A note for ROM devs 02:27pm CST 7/17/09*
Something to note, Hero does not use any of the following legacy services and therefore they can be removed from init.rc & init.trout.rc . This is mainly something the ROM cookers should pay attention to. The btips service actually handles all of this now.
REMOVE THE FOLLOWING:
Code:
service hcid /system/bin/hcid -s -n -f /etc/bluez/hcid.conf
socket bluetooth stream 660 bluetooth bluetooth
socket dbus_bluetooth stream 660 bluetooth bluetooth
# init.rc does not yet support applying capabilities, so run as root and
# let hcid drop uid to bluetooth with the right linux capabilities
group bluetooth net_bt_admin misc
disabled
service hciattach /system/bin/hciattach -n -s 115200 /dev/ttyHS0 texas 4000000 flow
user bluetooth
group bluetooth net_bt_admin
disabled
service hfag /system/bin/sdptool add --channel=10 HFAG
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service hsag /system/bin/sdptool add --channel=11 HSAG
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
*Found something 01:48pm CST 7/17/09*
I was looking through init.trout.rc and noticed the following lines
Code:
chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/serial_lock_cpu
chmod 0660 /sys/devices/platform/msm_serial_hs.0/serial_lock_cpu
This may not seem like much but this node does not actually exist in our builds. It's possible, and probably likely, that HTC modified their kernel to support the changes that were made in the bts (btips) daemon.
We all are pretty much not using the HTC kernel, we're using custom compiled kernels from JAC or Cyanogen. I tried using the RUU kernel but couldn't boot at all. Is anyone able to get their phone booting off the RUU kernel and NOT one of the custom kernels that are floating around in these ROMs? If so, can you check if this device node exists?
I believe booting off that kernel could be the answer to the UART clock issues I'm getting and missing devices in /sys .
NEXT
I have been toying around with the following value in init.rc that seems to affect whether or not I get an error.
Code:
/proc/sys/net/unix/max_dgram_qlen
The default is 10, the RUU release of Hero sets it to 999. If I change that to 10000 then it pauses the BT services and just sits there. If I revert to default I get the same error that I see when its set to 999. Wondering if there's a happy medium in queue length (qlen). Just me thinking out loud.
*Latest progress 11:43pm CST 7/15/09*
I wanted to post some newer results I've been having with BT debugging on Hero. I found out how to circumvent the UART disable error. This is done by having the service btips statement in init.rc to look as follows
Code:
service btips /system/bin/bts
socket bluetooth stream 666 bluetooth bluetooth
socket dbus_bluetooth stream 666 bluetooth bluetooth
group bluetooth net_bt_admin root misc
disabled
oneshot
The most important part is "oneshot" which tells Android to NOT restart the btips service after it dies. If you leave this off then it will relaunch btips service and tie up the I2C bus.
The newest error I'm getting is the inability to launch HCI. This is hopefully the LAST error before I can get BT functional! Anyways, just wanted to update everyone that I have not stopped working on bluetooth.
Code:
1247718990.888806 BTSTACK(778) INFO | UATRAN: HCI Command was not acknowledged with an event
[ vendor/ti/btips-linux/B_TIPS/btstack/hcitrans/uart/uarttran.c:298 ]
1247718990.889935 BTSTACK(778) INFO | HCI: HCI_Process detected transport failure
[ vendor/ti/btips-linux/B_TIPS/btstack/stack/hci/hci_proc.c:1596 ]
1247718990.890179 BTSTACK(778) INFO | RADIOMGR: RmgrHciCallback: 0x6
[ vendor/ti/btips-linux/B_TIPS/btstack/stack/radiomgr.c:364 ]
1247718990.890362 BTSTACK(778) INFO | RADIOMGR: HCI init failed (retrying)
[ vendor/ti/btips-linux/B_TIPS/btstack/stack/radiomgr.c:386 ]
1247718990.890484 BTSTACK(778) INFO | RADIOMGR: HCI init error
[ vendor/ti/btips-linux/B_TIPS/btstack/stack/radiomgr.c:335 ]
1247718990.890637 BTSTACK(778) INFO | ME: HCI Init complete status: 22
[ vendor/ti/btips-linux/B_TIPS/btstack/stack/me/me.c:1220 ]
1247718990.890789 BTSTACK(778) INFO | CMGR: Received event HCI_INIT_ERROR
[ vendor/ti/btips-linux/B_TIPS/btstack/profiles/common/conmgr.c:591 ]
1247718990.890942 BTSTACK(778) INFO | Dbus | inside _BTBUS_COMMON_BTL_callback with event: 6 0[ vendor/ti/btips-linux/EBTIPS/apps/btbus_wrap_common.c:62 ]
1247718990.893536 BTSTACK(778) INFO | sending dbus message from BTBUS_COMMON_BTL_callback in {vendor/ti/btips-linux/EBTIPS/apps/btbus_wrap_common.c:84}[ vendor/ti/btips-linux/EBTIPS/apps/btbus_wrap_utils.c:189 ]
1247718990.898022 BTSTACK(778) INFO | Dbus | _BTBUS_COMMON_BTL_callback signal sent: 6 0[ vendor/ti/btips-linux/EBTIPS/apps/btbus_wrap_common.c:87 ]
1247718990.898358 BTSTACK(778) FATAL | HCI Init Status Received while neither FM nor BT On in progress[ vendor/ti/btips-linux/EBTIPS/btl/ti_chip_mngr/ti_chip_mngr.c:1232 ]
1247718990.898541 BTSTACK(778) Assert | 0[ vendor/ti/btips-linux/EBTIPS/btl/ti_chip_mngr/ti_chip_mngr.c:1232 ]
1247718990.899121 BTSTACK(778) FATAL | signal 11 sent to our program from address 0xdeadbaad and code 1[ vendor/ti/btips-linux/EBTIPS/apps/btt_task.c:102 ]
I'll update this main post as I, or others, come up with progress or advancements.
The directories for this are already created in the latest Hero init.rc . Just need to create the ddb file
Code:
touch /data/btips/TI/BtDeviceDb.ddb
chmod 666 /data/btips/TI/BtDeviceDb.ddb
The results of making these changes is you are able to get ALL bluetooth services and sockets created. Bluetooth is working from the commandline, just not on the frontend where we need it.
Going to go ahead and bump this up there
Yeah, I posted in the other thread that I had talked to Haykuro about this. He told me that he got this working 100% without adding any other files; he just used the ones already in the Hero build.
He hasn't been responding to me recently, so I can't get any more info, but when he does, I'll ask him what else we need to do to eliminate the few errors that we are getting.
amgupt01 said:
Yeah, I posted in the other thread that I had talked to Haykuro about this. He told me that he got this working 100% without adding any other files; he just used the ones already in the Hero build.
He hasn't been responding to me recently, so I can't get any more info, but when he does, I'll ask him what else we need to do to eliminate the few errors that we are getting.
Click to expand...
Click to collapse
Hmmm no other files huh, well that helps me keep my focus on what is already in the build then. Thanks, I'll keep hammering at this. I wonder why if Haykuro got bluetooth working, he didn't release Hero with the fix? Strange.
Yeah, he told me that he had Hero 2.0 (yeah, it exists along with Rosie 2.0) working 100%, but he had better Android things to do... I wonder what else Haykuro was working on (before his hard drive got wiped)
amgupt01 said:
Yeah, he told me that he had Hero 2.0 (yeah, it exists along with Rosie 2.0) working 100%, but he had better Android things to do... I wonder what else Haykuro was working on (before his hard drive got wiped)
Click to expand...
Click to collapse
Hero/Rosie 2.0 is most likely the GOLD/Production version of the Hero software whereas we have the alpha/beta version. Would be really nice to get my hands on the production version.....
Doubt he's going to ever give it to anyone.
MUST HAVE ROSIE 2.0 hahaha
i wonder where he got it from ...
maybe if we bribe him with a new phone he'lll share?
If the idiots who tricked him hadn't and people were more respecting and patient, i'll put my $0.02 in that we would have rosie 2.0 by now.
alritewhadeva said:
If the idiots who tricked him hadn't and people were more respecting and patient, i'll put my $0.02 in that we would have rosie 2.0 by now.
Click to expand...
Click to collapse
I wasnt following these forums too closely when all that happened... sorry to get off topic shafty.. just curious what happened someone pm me with the downlow? ... any way back to shafty ... gettin bt enabled "D
Made some more progress, check the main thread guys
amgupt01 said:
Yeah, he told me that he had Hero 2.0 (yeah, it exists along with Rosie 2.0) working 100%, but he had better Android things to do... I wonder what else Haykuro was working on (before his hard drive got wiped)
Click to expand...
Click to collapse
theres always ways to get info off a wiped drive, im sure he was boasting or trying to find a way to get people off his case.
as far as ontopic, i dont see why he's being a baby about all of this and should be some help on getting things fixed up. though with him gone we're getting more people giving out a helping hand.
i have a question you guys are trying to use hero bluetooth drivers? if so was'nt that for the hero phone? cant you use the drivers from ion on hero insteAD? I DUNNO NOTHING JUST SAYING
superg05 said:
i have a question you guys are trying to use hero bluetooth drivers? if so was'nt that for the hero phone? cant you use the drivers from ion on hero insteAD? I DUNNO NOTHING JUST SAYING
Click to expand...
Click to collapse
from what amgupt01 said haykuro got it working with out any additional files. so basically what ever is there, is already there, just needs some touch up apparently
dbhatesyou said:
theres always ways to get info off a wiped drive, im sure he was boasting or trying to find a way to get people off his case.
as far as ontopic, i dont see why he's being a baby about all of this and should be some help on getting things fixed up. though with him gone we're getting more people giving out a helping hand.
Click to expand...
Click to collapse
Actually, I asked him if he had it because I saw a post on the place where SuperHero is now found titled "Rosie 2.0 Is a No-Go." He seemed pretty surprised that I knew about it because he had never told anyone about it. But he told me that he had Rosie 2.0 working 100% including BT and he had gotten LED and BT on the version of Hero he released, as well. He was just pissed that people leaked his stuff so he didn't release it.
He had a bunch of stuff backed up apprently, so if he every feels like responding to me, I'm sure he could tell us what we're missing...
superg05 said:
i have a question you guys are trying to use hero bluetooth drivers? if so was'nt that for the hero phone? cant you use the drivers from ion on hero insteAD? I DUNNO NOTHING JUST SAYING
Click to expand...
Click to collapse
The bluetooth driver is located in /etc/firmware and it is the EXACT same file that is on the cupcake/ion build. You can verify by doing an md5sum on the file in the hero build and the one on the cupcake build and the sums will match up. So it looks like HTC just renamed the driver. I also looked into it further and both the HTC Hero and HTC Dream (G1) are using texas instruments chips and the /system/bin/bts daemon has support for both.
amgupt01 said:
Actually, I asked him if he had it because I saw a post on the place where SuperHero is now found titled "Rosie 2.0 Is a No-Go." He seemed pretty surprised that I knew about it because he had never told anyone about it. But he told me that he had Rosie 2.0 working 100% including BT and he had gotten LED and BT on the version of Hero he released, as well. He was just pissed that people leaked his stuff so he didn't release it.
He had a bunch of stuff backed up apprently, so if he every feels like responding to me, I'm sure he could tell us what we're missing...
Click to expand...
Click to collapse
The easiest thing would be to get one of the BLUEZ developers to lend a hand. They are the ones tasked with working on bluetooth for linux and obviously are doing that for free so they'd probably be nice enough to figure out what modules aren't being loaded. Anyone up for shooting them some emails?
mind giving me the emails?
alritewhadeva said:
mind giving me the emails?
Click to expand...
Click to collapse
http://www.bluez.org/development/lists/
Got BT working!
I got BT working this eve! Ok, more details are required. I really only got BT working from the linux perspective. Using tools that are built into the ADP phones that I transfered over to my G1/Hero I was able to enable BT, scan, and pair with my headset.
1) Push bttest and hcitool to the phone. I put them /data/local/tmp
2) ./bttest enable - you get a RC of 0. Also, watch logcat and you will see hciattach and hcid starting up successfully.
3) ./hcitool dev - will show you the mac address for your hardware
4) ./hcitool scan - will scan for bt devices
5) ./hcitool cc - will connect to the device that you specify.
The good news is that this shows that BT works from the driver/kernel/modules/hardware perspective. Now we just need to close the loop with the upper layers.
I've run into a little problem. The solution is probably pathetically simple and I will want to kick myself for being unable to find the answer...nevertheless I've searched for most of the afternoon.
I connect to my openvpn from xoom as follows :
Open terminal and type the following:
su
cd /pathto/myopenvpnfolder (in my case /sdcard/openvpn)
openvpn clientconfigfile.ovpn
everything connects fine and works flawlessly
The problem is that I cannot disconnect unless I reboot the xoom.
Do you know the command line for this?
I know that there is an app called 'openvpn settings' that automates this process but 1), I want to understand syntax and 2), the app will not sustain a connection and nags my notification area. Any ideas? Thank you in advance.
Sent from my Xoom using Tapatalk
No one has any idea?
Sent from my Nook Color using Tapatalk
Ok
First of all -- I tried some basic commands on my phone -- without openvpn specifically, so try some things here -- worst case scenario you will have to reboot.
I believe openvpn creates another network interface. tiwlan0 is the main networking interface on my phone (D1). Your interface my vary. The best way I can advise you to look for your interface name is to take a look at dmesg. So at the command line, type dmesg and then scroll through the output.
Here is the relevant networking connections in mine:
<6>[18427.544403] TIWLAN: 2235.055000:
<6>[18427.548034] TIWLAN: 2235.058662: -----------------------------------------
------------
<6>[18427.559783] TIWLAN: 2235.070412: Driver Version : WiLink_Driver_6.1.0.0.1
31
<6>[18427.575408] TIWLAN: 2235.086037: Firmware Version: Rev 6.1.5.44.1
<6>[18427.601867] TIWLAN: 2235.112465: Station ID : 00-26-BA-3C-62-CB
<6>[18427.625610] TIWLAN: 2235.136208: -----------------------------------------
------------
<6>[18427.644744] TIWLAN: 2235.155342:
<4>[18429.784362] wlanDrvIf_Open
<6>[18429.787628] ADDRCONF(NETDEV_UP): tiwlan0: link is not ready
<6>[18429.832733] ADDRCONF(NETDEV_CHANGE): tiwlan0: link becomes ready
<6>[18430.268096] TIWLAN: 2236.929695: configHW_to_connected: *** NEW CONNECTION
***
<7>[18440.122283] tiwlan0: no IPv6 routers present
In order to list the network IP address listed with the specific interface I then did:
ifconfig tiwlan0
Which resulted in the following:
# ifconfig tiwlan0
ifconfig tiwlan0
tiwlan0: ip 192.168.1.105 mask 255.255.255.0 flags [up broadcast running multica
st]
Now I believe openvpn will create another network adapter -- something like tun0 or tap0 depending if you are bridging or routing your vpn (which depends which is specified in your .conf file). To bring down the interface manually, all you would do (assuming your rooted):
ifconfig <interface_name> down
I borrowed these commands from this tutorial (which will help a little bit -- but be warned, android doesn't have the full network-tools implementation so some of the commands with various switches will not be complete): http://ubuntuforums.org/showthread.php?t=571188
Hopefully this will get you on the correct track!!!!
Awesome! First I want to thank you for answering...second I want to kick myself for not trying basic Linux networking commands...I made a mountain out of a mole hill! Thank you muchly again!
Sent from my Xoom using Tapatalk
Dollyllama said:
Awesome! First I want to thank you for answering...second I want to kick myself for not trying basic Linux networking commands...I made a mountain out of a mole hill! Thank you muchly again!
Sent from my Xoom using Tapatalk
Click to expand...
Click to collapse
hey im a noob....I have a openvpn server at home but I cannot figure out exactly how to use it on the XOOM or on my Atrix. Could you be kind enough to give me step by step guide to use openvpn on Xoom, when you get time. Thank you so much.
Hi,
I currently try to follow these instructions...
http://mobisocial.stanford.edu/news...together-by-hacking-connectivityservice-java/
Very hard for me. Don't know what to do.
The goal of COIN project is to use WiFi and 3G connections simultaneously. So it conflicts with the policy of Connectivity Service, but there is no configuration to edit the policy, and it is hard coded. You can find the clue in ConnectivityService.java:handleConnect function.
Our current solution is quite brutal, which is to mask the eyes of Connectivity Service by modifying its message handler entry like the following:
// must be stateless – things change under us.
private class MyHandler extends Handler {
@Override
public void handleMessage(Message msg) {
NetworkInfo info;
//added by COIN to disable Connectivity Service
int networkState = 8; //not any following state
/*use static google dns server for wifi and 3g*/
if (msg.what == NetworkStateTracker.EVENT_STATE_CHANGED) {
SystemProperties.set(“net.dns1″, “8.8.8.8″);
SystemProperties.set(“net.dns2″, “8.8.4.4″);
bumpDns();
}
//////////////////////////////////////////////
//switch (msg.what) {
switch (networkState) {
case NetworkStateTracker.EVENT_STATE_CHANGED:
info = (NetworkInfo) msg.obj;
int type = info.getType();
…..
And then compile the modified ConnectivityService.java in the android source code tree, you can get an new services.jar file in framework directory. Replace the existing services.jar on the cell phone with the following adb commands, then reboot the phone
adb shell “mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system”
adb shell “chmod 0777 /system/framework”
adb push services.jar /system/framework
adb shell “chmod 0644 /system/framework/services.jar”
adb shell “chmod 0755 /system/framework”
Click to expand...
Click to collapse
Does he mean I have to compile the whole Android source code again?
So I would need to learn first, how to compile Android, then change this file, compile Android, copy file?
Instant of adb shell, could I also use root explorer?
How device dependant is this? Or how android version dependant?
Could someone offer the compiled file?
No answer yet.
I believe so. This is actually what compelled me to go learn to compile android by myself-- the constant switching between 3g and wifi in a semi-strong wifi zone sucks. For now I am starting with CM7 since it is so popular.
Yes you would need to compile the whole OS and it will only work on an AOSP rom. It will also be very version dependent.
Please let me know if it worked ! I probably don't think it will. Read this on the page:
Pallas Says:
April 13, 2012 at 5:58 am
are you sure the packets are going thru both interfaces?
I think it doesn’t work, simply because you would need two default gateways, leading to some hard problems:
- how does the system choose where to send the packets?
- for outgoing packets: unless the two connections have both statically assigned public IP addresses, which is very unlikely, you will end up with two differently NATed paths, and the client will refuse packets coming from two different ip addresses on the same connection.
- for incoming packets: to let the client send packets to both interfaces, you would need to send them from both interfaces with different source ip addresses: it will not work, the client will get confused. and anyway you would need support at the application level.
to solve all this, you’d need to:
- make an ad-hoc application which understands all this and can send chuncks to both interfaces, then merge all the returning chunks. you’d need support at the application level: for example you’d need http byte range support on both client and server
- divide “equally” the single specific connections thru the two gateways. this may work but it’s pretty hard if you do not have access to advanced routing and traffic shaping at the kernel level. may be possible on a phone with custom compiled aosp rom and modified kernel
gouthamsn said:
Please let me know if it worked ! I probably don't think it will. Read this on the page:
Pallas Says:
April 13, 2012 at 5:58 am
are you sure the packets are going thru both interfaces?
I think it doesn’t work, simply because you would need two default gateways, leading to some hard problems:
- how does the system choose where to send the packets?
- for outgoing packets: unless the two connections have both statically assigned public IP addresses, which is very unlikely, you will end up with two differently NATed paths, and the client will refuse packets coming from two different ip addresses on the same connection.
- for incoming packets: to let the client send packets to both interfaces, you would need to send them from both interfaces with different source ip addresses: it will not work, the client will get confused. and anyway you would need support at the application level.
to solve all this, you’d need to:
- make an ad-hoc application which understands all this and can send chuncks to both interfaces, then merge all the returning chunks. you’d need support at the application level: for example you’d need http byte range support on both client and server
- divide “equally” the single specific connections thru the two gateways. this may work but it’s pretty hard if you do not have access to advanced routing and traffic shaping at the kernel level. may be possible on a phone with custom compiled aosp rom and modified kernel
Click to expand...
Click to collapse
(Probably for your Interest
This project works on a MultiPath-TCP Implementation (follow link to mptcp.info.ucl.ac.be). The hard times you get is compiling the Kernel with the additional files. This Protocol can only work effectively for download Purposes if the Server also has a MPTCP Kernel running. But on the other Hand you can shut down a single connection without loosing the active Connection (Downloads are not interrupted and improved Bandwidth Capacity if your Server is MPTCP-Ready)
Until now this Protocol is only working for Homeservers or similar Projects, where you have full access to the Server and the working Kernel of the system.
I am currently working on implementation of the Protocol for my Bachelor Thesis. I already compiled a working Kernel (Glados Nexus S) and now i'm working on keeping both Interfaces active. I hope this Tut can help me...
Has anybody tried other approaches to this topic? I tried manually loading the wifi-module and configuring it, but i only managed to ping via one Interface.
You managed to make it work?
bagers said:
No answer yet.
Click to expand...
Click to collapse
You managed to make it work? i want to make it also for my master thesis
Hi XDA community!
I've been working on my first real Android application for a few weeks now, and I just released in on the Google Play Store.
I'm posting here because some developers around here could be interested
It's a front-end to dropbear, a minimalist SSH server.
It allows you to SSH on to your Android phone and also to use SCP.
It is highly configurable and accepts a master password and/or public keys.
Feel free to give feedback / reports / anything.
https://play.google.com/store/apps/details?id=me.shkschneider.dropbearserver
Source is up on github and many thanks to the people listed in my README file.
Well, I installed it on a rooted Samsung Galaxy 2 with NeatRom kernel (Android 4.0.3). Installation is ok but when I start the server the applications remains blocked on the
window Starting server Please wait ...
0% ... 0/100
I waited several minutes but it does not move
Does this app have any advantages over SSHDroid? (Other than lack of ads)
It is just another alternative.
Free
No ads
Open-Source (github)
Start/Stop/Started/Stopped intents for broadcasts
Configurable
Root/non-root access
...
Sadly I can't get this to run on my Evo3d gsm. Everytime I try to connect I get "Error connecting: Connection refused" even on the adb shell:
Code:
1|[email protected]:/ # ssh -p 1022 [email protected]
ssh -p 1022 [email protected]
ssh: exited: Error connecting: Connection refused
ssh on the adb shell works with other computers in the local network.
I tried port 22 and 1022 with the same result, and tried almost every combination of the options. Certificates did not help either. One strange thing is, that i get two ips one is the usual unknown.external.ip.adress and the other is not my normal class c (192.168.0.xxx) ip i get over wlan but some 10.156.xx.xx ip. After some digging i found out, that thats the ip of the rmnet0 interface.
If you need any more information I am happy to provide you these as best as I can.
ls /sys/class/net returns:
Code:
dummy0
gannet0
ip6tnl0
lo
rmnet0
rmnet1
rmnet2
rmnet3
rmnet4
rmnet5
rmnet6
rmnet7
sit0
wlan0
I couldn't get dropbear to start on my GNex, but OK on the N7. Dropbear starts OK if I run it in a terminal. GUI just stuck at 'server stopped'.
Sent from my Nexus 7 using Tapatalk 2
Just updated, and now force closes on both
Sent from my Nexus 7 using Tapatalk 2
Latest update works great, thanks again
Sent from my Nexus 7 using Tapatalk 2
Not working for me on Moto XT910 with MIUI ICS. Even though I allowed it root, it forever says "Root privileges KO, Dropbear Status KO, Server status error"
I know the thread is a bit old and there is already a second release of this app, but I couldn't find any thread about it.
I have been running the server successfully and managed to make a connection over the local network. However, I get timed out when trying to connect over the mobile network. This should be possible, right? Or am I missing something here?
Thanks,
HolySid
where should I place my .ssh hosts file?
I wasn´t able to post the question directly under the Superman Costum Rom thread. So I try to do it here.
I installed [ROM][STABLE][TW][6.0.1][BPH6][24.08.16][SM-G930F/FD/W8] SuperMan-Rom V1.12 Aroma today. And as far it works really fine. But what bugs me is that I was able to use USB-Lan Adapter under Stock Rom that was just rooted. I only needed to input the following in the android console:
- ip link
- ifconfig eth0 up
- dchpcd eth0
The adapter started to work. I could ping to different web pages and play games etc. Only a few apps didn´t recognize internet. But after installing Superman Rom the same procedure doesn´t work any longer. I can ping to my router but not further. Any ideas so far? Thanks in advance.
So far I´ve got it working. Only if anybody wants to know it.
Its following steps:
- Root the device.
- Then install Terminal Editor or a different app like that.
then:
ip link
(shows eth0 your usb ethernet adapter somewhere in the list)
dhcpcd eth0
ndc resolver setnetdns eth0 8.8.8.8 8.8.4.4 (this line was the reason why I started this thread, my eth0-adapter couldnt resolve the dns)
then enter the following ip-rules:
ip rule add from all fwmark 0x101f7/0x1ffff lookup 1024 pref 13000
ip rule add from all oif eth0 lookup 1024 pref 14000
ip rule add from all fwmark 0x1f7/0x1ffff lookup 1024 pref 19000
ip rule add from all fwmark 0x0/0xffff lookup 1024 pref 22000
ip route add table 1024 192.168.178.0/24 dev eth0
ip route add table 1024 default via 192.168.178.1 dev eth0
(if they don´t work than look under: "ip rule". The rules for wlan0. The numbers like 0x101f7/0x1ffff behind fwmark must be similar to wlan0)
You can type in all this commands every time on restart or if you plug out your adapter. Or you save those command line entrys in a file called "eth.sh" store it on your device and execute it with Terminal emulator as "su -c 'sh eth.sh'
From there on if you ping to google or something. The packages should get to their target. But...
Some apps will still refuse to work. Because they depend on 3g or wlan adapter. So you need a app to fake wlan. You can do this with "exposed framework" and a module called "fake wlan". One reason more your device should be rooted.
After that all apps works in line now. I ve gone further and set up a init.d script that does the job when I boot up my device.
In the moment if you plug out your USB-Ethernet you may have to reboot the device. But maybe I can figure out something more convenient.