[REF] VPN Connections working with the Note [Updated 1/3/2012] - Galaxy Note GT-N7000 Android Development

As many of you do, I connect to lots of Cisco based VPN's and could not function without this. So, after reading and tweaking, I managed to finally get VPN Connections to work with the Note. Apparently the problem is that the app crashes when it tries to locate the PID for the vpnc process and it can't. I found a patched, repacked APK of v97 floating around which uses a different method to do this on Samsung phones. This worked along with a small init.d script I created to create the tun symlink dependencies. Obviously, you have to be rooted, have tun compiled into the kernel with /etc/init.d support for it to work.
The script is called S95Tun in /etc/init.d:
Code:
#!/system/bin/sh
mkdir /dev/net
chmod 777 /dev/net
ln -sf /dev/tun /dev/net/tun
Make sure you chmod 755 on S95Tun to make it executable. This gives appropriate permissions to the /dev/net folder and creates the symlink that VPN Connections needs to use the tun device. Also, after more testing, I found that you need a resolv.conf in /system/etc and busybox 1.18.4 installed to /system/xbin. The app looks for files in /system/xbin like ip, ps, and ifconfig (maybe more).
/system/etc/resolv.conf:
Code:
nameserver 8.8.8.8
nameserver 8.8.4.4
This was my particular scenario, you may have to do more tweaking on yor ROM, etc. DO ALL THIS AT YOUR OWN RISK! I will answer questions he best I can. Enjoy!

wasnt there already support for VPN connections in stock kernel ?

ookba said:
As many of you do, I connect to lots of Cisco based VPN's and could not function without this. So, after reading and tweaking, I managed to finally get VPN Connections to work with the Note. Apparently the problem is that the app crashes when it tries to locate the PID for the vpnc process and it can't. I found a patched, repacked APK of v97 floating around which uses a different method to do this on Samsung phones. This worked along with a small init.d script I created to create the tun symlink dependencies. Obviously, you have to be rooted, have tun compiled into the kernel with /etc/init.d support for it to work.
The script is called S95Tun in /etc/init.d:
Code:
#!/system/bin/sh
mkdir /dev/net
chmod 777 /dev/net
ln -sf /dev/tun /dev/net/tun
Make sure you chmod 755 on S95Tun to make it executable. This gives appropriate permissions to the /dev/net folder and creates the symlink that VPN Connections needs to use the tun device.
This was my particular scenario, you may have to do more tweaking on yor ROM, etc. DO ALL THIS AT YOUR OWN RISK! I will answer questions he best I can. Enjoy!
Click to expand...
Click to collapse
could you please explain this out a bit more. im not able to connect.
thanks man,
jason

tids2k said:
wasnt there already support for VPN connections in stock kernel ?
Click to expand...
Click to collapse
Yes. The stock OS and kernel allow connections to limited non-cisco PPTP AND L2TP servers. Cisco VPN requires vpnc which allows connection to Cisco based VPN routers and concentrators.

jason370 said:
could you please explain this out a bit more. im not able to connect.
thanks man,
jason
Click to expand...
Click to collapse
Will do when I get in front of a PC. Basically you need to make sure all of your Cisco credentials are correct including group and user for it to properly connect.

ookba said:
Will do when I get in front of a PC. Basically you need to make sure all of your Cisco credentials are correct including group and user for it to properly connect.
Click to expand...
Click to collapse
are you using this alone as the vpn client or in conjunction with?

Meh, no SSL support. My crappy university switched from "standard" (ehmehm...) Cisco to Cisco SSL VPN which no damn crap mobile device seems to be able to handle.
In Switzerland all major public WiFi providers are linked together and students - by using a VPN conx - can happily surf for free virtually everywhere. But as I said: crappy Uni switched to SSL VPN, no no more love without having a notebook at hand... crap.

schaggo said:
Meh, no SSL support. My crappy university switched from "standard" (ehmehm...) Cisco to Cisco SSL VPN which no damn crap mobile device seems to be able to handle.
In Switzerland all major public WiFi providers are linked together and students - by using a VPN conx - can happily surf for free virtually everywhere. But as I said: crappy Uni switched to SSL VPN, no no more love without having a notebook at hand... crap.
Click to expand...
Click to collapse
You can try the Cisco Anyconnect client from the market for that.
jason370 said:
are you using this alone as the vpn client or in conjunction with?
Click to expand...
Click to collapse
Standalone. I connect to a handful of Cisco VPN routers and this helps tremendously.

ookba said:
You can try the Cisco Anyconnect client from the market for that.
Click to expand...
Click to collapse
There is one (now)...? Wow, will check!
Sent from my GT-N7000

Hi ookba,
I am unable to get VPN connections to work. I used your apk on my Note and it still failed to connect. I've verified the group and user passwords are correct. Do you know if there is any logs I can check on the Note for troubleshooting? My Note is rooted with N7000ZSKK1 Hong Kong ROM. thanks.
felix

felixjai said:
Hi ookba,
I am unable to get VPN connections to work. I used your apk on my Note and it still failed to connect. I've verified the group and user passwords are correct. Do you know if there is any logs I can check on the Note for troubleshooting? My Note is rooted with N7000ZSKK1 Hong Kong ROM. thanks.
felix
Click to expand...
Click to collapse
+1, exactly the same story
Sent from my GT-N7000 using xda premium

felixjai said:
Hi ookba,
I am unable to get VPN connections to work. I used your apk on my Note and it still failed to connect. I've verified the group and user passwords are correct. Do you know if there is any logs I can check on the Note for troubleshooting? My Note is rooted with N7000ZSKK1 Hong Kong ROM. thanks.
felix
Click to expand...
Click to collapse
Did you add the script:
Code:
#!/system/bin/sh
mkdir /dev/net
chmod 777 /dev/net
ln -sf /dev/tun /dev/net/tun
Or just adb shell:
C:\> adb shell
# mkdir /dev/net
# chmod 777 /dev/net
# ln -sf /dev/tun /dev/net/tun
Then try to connect.

ookba said:
Did you add the script:
Code:
#!/system/bin/sh
mkdir /dev/net
chmod 777 /dev/net
ln -sf /dev/tun /dev/net/tun
Or just adb shell:
C:\> adb shell
# mkdir /dev/net
# chmod 777 /dev/net
# ln -sf /dev/tun /dev/net/tun
Then try to connect.
Click to expand...
Click to collapse
I don't really understand how to add this script. Could you please elaborate a bit on this?
Sent from my GT-N7000 using xda premium

If your running Windows, open MS Dos promt (or command prompt), then type inn the following:
First: you are to place youself here: C:\>
Then type: adb shell (Press enter)
# mkdir /dev/net (Press enter)
# chmod 777 /dev/net (Press enter)
# ln -sf /dev/tun /dev/net/tun (Press enter)
*done

jason370 said:
I don't really understand how to add this script. Could you please elaborate a bit on this?
Sent from my GT-N7000 using xda premium
Click to expand...
Click to collapse
You just create a text file with no extension called : S95Tun in the /etc/init.d/ folder. But you have to change its permission to 755, which means:
Owner r w x
Group r x
Public r x
In other word, just do in Windows command instead which is easier.
mkdir /dev/net #create directory called /dev/net
chmod 777 /dev/net #set the folder /dev/net permission to full access by anyone (777)
ln -sf /dev/tun /dev/net/tun #force create a symbolic link at /dev/net/tun, which points to the actual file at "/dev/tun"

I did it in adb shell. But still having problems. So I'd like to know if there is any debugging logs I can check to see what the problem is. (I don't have access to the Cisco VPN device to see the logs there). Thanks again for your help.

felixjai said:
I did it in adb shell. But still having problems. So I'd like to know if there is any debugging logs I can check to see what the problem is. (I don't have access to the Cisco VPN device to see the logs there). Thanks again for your help.
Click to expand...
Click to collapse
It's hard to debug. I found the problem by running vpnc directly in a shell and entering my Cisco VPN credentials. The main problem I had was the app Force Closing. If you're simply not connecting, then it's a problem with your IPSec ID, IPSec Secret, or username/password. Took me while to get all those entered correctly. Like I said, everyone's scenario may be a bit different. You can also try the latest, unmodified VPN Connections apk to see if it works.

Hi,
I have the 0.97 debug apk installed and the S95Tun script is placed under /etc/init.d
(originally there was no init.d folder under /etc)
But I still get a force close when I try to connect with VPN Connections.
Which busybox version are you using ?
Ans where is busybox installed on your device ?

mrmrmrmr said:
Hi,
I have the 0.97 debug apk installed and the S95Tun script is placed under /etc/init.d
(originally there was no init.d folder under /etc)
But I still get a force close when I try to connect with VPN Connections.
Which busybox version are you using ?
Ans where is busybox installed on your device ?
Click to expand...
Click to collapse
What kernel are you running? Stock or CF-Root kernel does not support init.d so you will have to run S95Tun manually. Also, make sure you have a /system/etc/resolv.conf.

Hello Ookba,
I have never managed to get a simple pptp vpn connection to work. While vpn connects the access to internet drops. With all my searching I have only found that this is an android bug. Is there any chance you could help me?
Thanks!
Sent from my GT-N7000 using xda premium

Related

attached is a functioning tun.ko for droid x

Because Motorola hasn't provided the .config file for the Droid X yet, I used 'make mapphone_defconfig' and then enabled config_tun in the resulting .config file. That .config file was used to generate tun.ko - it's currently functioning and working on my droid X phone. Since it's not the .config file used by Motorola there may be some oddities, unexpected problems or your house may explode if you use it. I don't take any responsibility for anything that happens if you use this - use it at your own risk.
It hasn't bricked my phone and it's been working without a problem, but your mileage may vary.
Attached is the .config file that was used as well as the tun.ko file
Enjoy
Noob Warning:
What does this do for us ?
pman219 said:
What does this do for us ?
Click to expand...
Click to collapse
This lets you run OpenVPN or http://code.google.com/p/get-a-robot-vpnc/ (allows you to connect to cisco, nortel or freeswan IPSEC servers
Would I need the config file or is that just for compiling other kernel modules for the DX?
The config file would really only be used to compile other modules. All you need is the tun.ko file
I placed this in /dev/net/tun/tun.ko
then I ran chmod 777 /dev/net/tun/tun.ko
then I ran insmod /dev/net/tun/tun.ko
I then tried the Gui app (get-a-robot-vpnc) and it fails immediately when trying to connect - am I missing something?
I'm new to android.
kris7778 said:
I placed this in /dev/net/tun/tun.ko
then I ran chmod 777 /dev/net/tun/tun.ko
then I ran insmod /dev/net/tun/tun.ko
I then tried the Gui app (get-a-robot-vpnc) and it fails immediately when trying to connect - am I missing something?
I'm new to android.
Click to expand...
Click to collapse
Hi,
You should place tun.ko in /sdcard/ or /system/lib/modules (if you have it mounted /system read,write)... I use the app "openvpn settings" - in that program when you go into the settings and choose "advanced" you can click the checkbox next to "load tun kernel module", then in "TUN module settings" set "load module using" to "insmod" and type in the proper path to tun.ko in the "path to tun module" area.
You may need to, as root (su) run:
mkdir /dev/net
busybox mknod /dev/net/tun char 10 100
ln -s /dev/net/tun /dev/tun
Best of luck
Do I need to set the path to the openvpn binary also? (Not sure where this gets installed)
And... what is required in the config file.
This is all I use on linux:
IPSec gateway X.X.X.X
IPSec ID mygroupid
IPSec secret mysecret
thanks!
kris7778 said:
Do I need to set the path to the openvpn binary also? (Not sure where this gets installed)
And... what is required in the config file.
This is all I use on linux:
IPSec gateway X.X.X.X
IPSec ID mygroupid
IPSec secret mysecret
thanks!
Click to expand...
Click to collapse
Hi Chris,
I think that would be something that the get-a-robot-vpnc folks will have to help you out with.
I got your tun.ko working with the commandline vpnc. It appears that get-a-robot-vpnc is just not quite calling vpnc how i need it to.
Thanks for your help.
Sent from my DROIDX using XDA App
You can pull .config from /proc/config.gz
mrozzeh said:
You can pull .config from /proc/config.gz
Click to expand...
Click to collapse
While that file apparently exists on other phones, it does not on the droid x - atleast not the last time that i checked
anyone know how you would recompile this for the .32 kernel
Invalid module format
I get an invalid module format error while trying to load this module. I am running Froyo if that makes any difference. THX
Can someone post instructions.....
HI,
Can someone post some instruction how to get the vpn connections working in Droid X? Please...
I can help with a donation.... $$
SOGJC said:
HI,
Can someone post some instruction how to get the vpn connections working in Droid X? Please...
I can help with a donation.... $$
Click to expand...
Click to collapse
I would love to get some instructions as well. I have a corp 5520 with group authentication that would be very nice to be able to connect to. Anyone successfully connect with the DroidX?
Anyone?
Still cannot get this to work on my DroidX - currently on 2.3.340 stock.
mab2,
As you were able to get this file, is there any way you are able to dump a file so I can use to get EVDO internet settings stick on QPST?
VPN Connections
Are you rooted?
I will post instructions if needed, I connect to a Cisco ASA and use VPN Connections - works like a charm.
Reply
rhyzar said:
Anyone?
Still cannot get this to work on my DroidX - currently on 2.3.340 stock.
Click to expand...
Click to collapse
Are you rooted?
I will post instructions if needed, I connect to a Cisco ASA and use VPN Connections - works like a charm.

[ROM] [WIP] Custom rom for MetroPCS users (Based off CM6)

I have decided not to build a ROM anymore. Instead, I have been working on the "Proxy Configuration Tool for Alternate Carriers" so that you can use almost ANY ROM (including CM6) with MetroPCS AND Cricket, yes, the Proxy Configuration Tool for Alternate Carriers will also support Cricket.
As you can see, the Proxy Configuration Tool for Alternate Carriers is an open-source project and you can contribute to it.
Here's the current TODO list:
- BUG: Proxy actually not updating properly when setting it through the sqlite db.
- Find out the correct ip for the mms proxy server for both MetroPCS and Cricket.
- Find out the correct network interface used by the Motorola Droid on FroYo.
- Find out the correct eri.xml file for cricket.
- Setup screen first time it runs & check for the following on every boot.
- Automatically setup APN.
- Check build.prop and modify it if it's needed (backup too) (ask for restart if modified)
- Check /data/eri.xml and install the new one if it's needed (backup too) (ask for restart if installed)
- Check for u2nl binary, if not available install it in /system/bin/, it's in the assets folder. (ask for restart if installed)
- Check for sqlite3 binary, if not available install it in /system/xbin/, it's in the assets folder. (ask for restart if installed)
- Drop database tables and replace them with appropriate Carrier Settings in: /data/data/com.android.providers.telephony/databases/telephony.db
- Document, organize and maybe improve configuration screen.
- It needs a better icon.
As you see, at this point is not complete, mostly due to the fact that the Proxy is not changing properly unless you reboot. It must be a stupid mistake on my part. I have been really busy lately and I have only been working on this when I get some free time, I figured somebody could contribute to this
If you'd like to test it go to the github link here and click on the Downloads tab and there should be an alpha version in there. I'll be building new versions whenever I clear out any of the items in the TODO list above.
Thank you.
[RESERVED]
How do you get metropcs on the Dinc....I would love to know
Sent from my ADR6300 using XDA App
there's shops that will flash any cdma phone over to metro. That's why you see sprint and verizon phones with bad ESN #s selling on craigslist
mexicanigga said:
How do you get metropcs on the Dinc....I would love to know
Sent from my ADR6300 using XDA App
Click to expand...
Click to collapse
- Use the ##778 programming instruction just like as if you were flashing a Droid Eris.
- Find somebody (a dealer most likely) to put the ESN into MetroPCS's database.
- Flash this rom (hopefully it'll be completely done soon)
WOW!! Ok I am currently running CyanogenMod 6.0RC1 on a HTC Sprint Hero and had a vendor here in town who gets ALL Verizion\Sprint CDMA phones on MetroPCS hook me up. He uses DamageControl 1.0 and everything works except the market of course..It does work on WiFi however.
My problem began when I just did NOT have consistent internet. It just was hit and miss. WiFi worked no problems. So I started messing around with different ROMS with NO luck at all. I have wiped and wiped (phone and SD card)everything you could do..Still notta!!! So I am super curious if this would work? I really just need my dam internet to work..It would be awesome if it was on this CyanogenMod 6 ROM...It's smoking and appears to be the best ROM I have found for a Hero..Man if anyone could help me get this baby on the net...I would be willing to pay. I think my settings are off honestly...HELP!
Your thoughts?
CyborgNM156 said:
WOW!! Ok I am currently running CyanogenMod 6.0RC1 on a HTC Sprint Hero and had a vendor here in town who gets ALL Verizion\Sprint CDMA phones on MetroPCS hook me up. He uses DamageControl 1.0 and everything works except the market of course..It does work on WiFi however.
My problem began when I just did NOT have consistent internet. It just was hit and miss. WiFi worked no problems. So I started messing around with different ROMS with NO luck at all. I have wiped and wiped (phone and SD card)everything you could do..Still notta!!! So I am super curious if this would work? I really just need my dam internet to work..It would be awesome if it was on this CyanogenMod 6 ROM...It's smoking and appears to be the best ROM I have found for a Hero..Man if anyone could help me get this baby on the net...I would be willing to pay. I think my settings are off honestly...HELP!
Your thoughts?
Click to expand...
Click to collapse
It will work for you, but you must be sure to take one very important step before you attempt this, or you will end up with a bricked phone.
Buy a HTC Droid Incredibile
Using this rom, or any other rom for the incredible on a device that is not an incredible will result in an unusable phone, if not bricked forever!
Teksu said:
It will work for you, but you must be sure to take one very important step before you attempt this, or you will end up with a bricked phone.
Buy a HTC Droid Incredibile
Using this rom, or any other rom for the incredible on a device that is not an incredible will result in an unusable phone, if not bricked forever!
Click to expand...
Click to collapse
That's completely right.
The beauty of what I'm doing here, is that, just like I did for the Droid Incredible and the Droid, it could also be done for the Hero and the EVO, since CM supports all of these devices. As long as the source is completely open of course.
Once I fix these issues with the u2nl binary not working properly, I'll update my winzip and build the "roms" for the Droid, EVO and Hero.
For now, this build above only works for the Droid Incredible.
Nice would this work for my flash metropcs hero? Please let me know.
Thanks
velazcod said:
I have forked and prepared a vendor repo to build CM6 for MetroPCS on the Dinc.
DO NOT FLASH THIS UNLESS YOUR PHONE IS ON METROPCS AND YOU KNOW WHAT METROPCS IS.
Reason why I did this was so that anyone that wanted to "flash" a Dinc/Droid to MetroPCS didn't have so much of a hard time doing it, and also so that everything worked out of the box (including internet on apps, connected to wifi or not).
I also managed to build a little service "app" that runs on the background and detects changes on the state of wifi connections, and it activates/deactivates proxy (and u2nl) depending on that.
Wifi Disconnected = Proxy/U2NL activated
Wifi On = Proxy/U2NL deactivated
When proxy/u2nl is active, all data goes through MetroPCS's proxy server, otherwise use wifi's internet connection.
At this point, it works great, but it's unfinished.
- Calls and SMS work perfectly with no issues at all.
- MMS can be sent and received with no issues either.
- On wifi, everything works perfectly.
- On MetroPCS data, only browser works, for some reason the u2nl binary it still not working properly.
This is meant to be free and open sourced. Not a paid solution.
The "proxy switcher" also has a configuration screen which allows to change the configuration. You can use a custom proxy, activate/deactivate proxy/u2nl, etc.
If you have the time and know about this, please figure out a way to make the u2nl binary work properly, or contact me, my twitter is in my signature, or you can PM me and we can gchat or email. I have had limited time to work on this these past few days.
Everything is open sourced,
vendor config is here http://goo.gl/ISk6
"wifi switcher" (for proxy) is here: http://goo.gl/2wwM
Also,
If you are interested on doing this on the Motorola Droid, here's the vendor config:
http://goo.gl/kuX3
Here's a built rom, if you'd like to test it
http://bit.ly/aBa5Qr
As soon as you install it, let it boot, and open APN configuration (use AnyCut or BetterCut).
Edit the one that says "metropcs" and on on the username, make replace "MDN" with your phone number, press menu, save, and then click on the radio button for that entry. After that, MMS will work.
This is based off CyanogenMod-6.0.0 and it hasn't been modified at all. All credits go to the CyanogenMod team
Click to expand...
Click to collapse
I'll tell you what work for me.
You need to the u2nl.zip from whiterabbit.org
In that file you will find the autostart.sh file for htc hero eris under metropcs folder.
I have to edit the autostart.sh file in order to work getting rid off some lines.
This is the file I'm using. autostart.sh
export PATH="$PATH:/system/bin"
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -F
iptables -t nat -F
iptables -X
iptables -t nat -A OUTPUT -o rmnet0 -p 6 ! -d 10.223.2.4 -j REDIRECT --to-port 1025
u2nl 10.223.2.4 3128 127.0.0.1 1025 >/dev/null 2>&1 &
exit 0
and that's all
I've pushed the files via adb in Clockwork recovery console mounting system and data
adb shell su
cd /data/
mkdir opt
chmod 0777 /data/opt/
chmod 0777 /system/bin/
exit
adb push autostart.sh /data/opt/autostart.sh
adb push u2nl /system/bin/u2nl
adb shell
chmod 0777 /data/opt/autostart.sh
chmod 0777 /system/bin/u2nl
reboot
Result is working
ahernandez4110 said:
Nice would this work for my flash metropcs hero? Please let me know.
Thanks
Click to expand...
Click to collapse
That question was answered in the post right before yours.
diegov600 said:
I'll tell you what work for me.
You need to the u2nl.zip from whiterabbit.org
In that file you will find the autostart.sh file for htc hero eris under metropcs folder.
I have to edit the autostart.sh file in order to work getting rid off some lines.
This is the file I'm using. autostart.sh
export PATH="$PATH:/system/bin"
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -F
iptables -t nat -F
iptables -X
iptables -t nat -A OUTPUT -o rmnet0 -p 6 ! -d 10.223.2.4 -j REDIRECT --to-port 1025
u2nl 10.223.2.4 3128 127.0.0.1 1025 >/dev/null 2>&1 &
exit 0
and that's all
I've pushed the files via adb in Clockwork recovery console mounting system and data
adb shell su
cd /data/
mkdir opt
chmod 0777 /data/opt/
chmod 0777 /system/bin/
exit
adb push autostart.sh /data/opt/autostart.sh
adb push u2nl /system/bin/u2nl
adb shell
chmod 0777 /data/opt/autostart.sh
chmod 0777 /system/bin/u2nl
reboot
Result is working
Click to expand...
Click to collapse
Yeah, if you take a good look at the vendor source I posted on the OP, this is basically what I'm doing (especifically this file). At first I tried building u2nl from scratch that didn't work, then, just to try it, I tried the u2nl binary found in whiterabbit.org and that didn't work either.
There's still something wrong with this setup I'm using, but I haven't been able to track it down yet, I did this about 2 weeks ago but lately I haven't had the time to troubleshoot it all
Link to your ROM is dead.
Been trying to get the new Skyraider 3.0 to work on Metropcs
dannystang said:
Link to your ROM is dead.
Been trying to get the new Skyraider 3.0 to work on Metropcs
Click to expand...
Click to collapse
Sorry, I was messing with some files and screwed up the links.
I'm currently rebuilding it again with a few changes I made and also sync'd everything with CyanogenMod's source.
Will post new link tonight and also have builds for the Motorola Droid and HTC EVO.
Updated OP with latest build. This is based on latest CM6.
http://bit.ly/incredibleMetro
http://bit.ly/bh4wbh - Google Apps (Latest)
Thanks! I couldn't sleep so I finally figured it out
I mounted the Skyraider 3.0 RC2 release, everything works except hulu on data without wifi which is ok cause metro is slow data anyhow.
I read past instructions to get data to work I just used whiterabbit u2nl File but it seems he has a "new" folder with an edited autostart which when I pushed it on works fine...
No need to edit anything, I can switch on and off wifi no problems...
dannystang said:
Thanks! I couldn't sleep so I finally figured it out
I mounted the Skyraider 3.0 RC2 release, everything works except hulu on data without wifi which is ok cause metro is slow data anyhow.
I read past instructions to get data to work I just used whiterabbit u2nl File but it seems he has a "new" folder with an edited autostart which when I pushed it on works fine...
No need to edit anything, I can switch on and off wifi no problems...
Click to expand...
Click to collapse
That is strange, nothing works for me except the browser, as in, only the proxy is working and not the u2nl... I'll work on this tomorrow again
diegov600 said:
I'll tell you what work for me.
Result is working
Click to expand...
Click to collapse
+1 This worked for me on Skyraider 3.0 RC2.
Thanks!!!
Will try it on CM6 now.
Edit: Won't work on CM6 NIGHTLY 08/24.
Works on IncredibleDoes AOSP - FRF91.
I got it working on CM6 RC3.
Now we just need Skyraider with the Froyo Final
Why did you guys have to use the edited autostart though?
Wondering why mine works and its so different...

Wifi not working after Wpa_supplicant patch

Hello all,
I have a problem. I looked all over and everybody is excited to get their Tab to hook up to Ad Hoc connection. But rarely anybody addresses the issue that follows... It kills regular Wifi!
I cannot connect to any regular wifi now, just my ad hoc connection via my Sprint CDMA Rhodium (touch pro2). I use wifi all the time and running wifi router on my phone all day is not a sensible thing to do.
I tried to put the original wpa file that I had backed up, but still the galaxy cannot connect to regular wifi.
All it says is "connecting" and then "disconnected" and keeps trying to connect to it but never to a point that it says "obtaining ip address"
Please help
Sent from my SPH-P100 using XDA App
try chmod new wpa_supplicant file to 777 had the same issue and solved it with this.
kromosto said:
try chmod new wpa_supplicant file to 777 had the same issue and solved it with this.
Click to expand...
Click to collapse
may sound like a stupid question... but what is chmod?
sorry im pretty good with winmo, but a total noob on android development.
Ok so I downloaded this app called chmod from the market. It's giving me a settings screen with an ability to change numbers and options like read, write, exec...
I feel like this is for the whole system... Not an individual file.
Please help. I really appreciate it! ! !
Thank you
Sent from my SPH-P100 using XDA App
i dont know the app but you can get and terminal app from the market go to the directory you copied the wpa file and write chmod 777 wpa_supplicant and it should be fine you may need su command to get super user access before this command
Did that.
#Su
#Chmod 777 system/bin/wpa_supplicant
Then the terminal registers and goes to next line.
I did reset term, app exited. Wifi doesn't work, ad hoc works
second time I backed out of the app. Still wifi- no, ad hoc-yes
Any clue?
Should I hard Reset?
Sent from my SPH-P100 using XDA App
so you problem is not same as mine. i can tell you what i did exactly maybe it helps.
i didnt use mount commands that wpa-supplicant thread i used androotfile program from the slideme market (normal android market doesnt have this or i couldnt find it) to backup the old one and use it to copy the new one. then got the same problem as you had so go back to old wpa file with again androotfile but still have the same problem. then tried chmod command with the old file and yes it worked (cant remember if i restarted the device) so again copy the new one and chmod it and all started to work.
Actually I just observed that my laptop didn't connect to the internet. So I reset the router and voila! The wifi on my pad works! ! !
All I needed to di was rest the router... stupid me! Didn't think to cover the basics...
And to think, I was soo close to painting a hard reset.. Haha
Thank you so much! ! ! I really appreciate it! !
You are the man!
Sent from my SPH-P100 using XDA App
Hy,
i did everything exactly as described here.
copied new wpa_supplicant to system/bin and thereafter
chmod 777
when i check the permissions with ls -l i can see
wpa_supplicant has following permissions: -rwxrwxrx root root
i can see AD-HOC and "normal" WIFI, but when i want to connect to adhoc, it says: receiving IP Adress, and thats it.
any thoughts?
(i try to connect to my HTC Touch diamond Wm 6.5)
Regards
R
Works like a charm
This fixed my problem getting disconnected from my AP all the time.
Thanks
@kromosto - dude.. THANK YOU! I created an acct on here just to say that. I thought I was in **** water cause my new wpa_supplicant would not work for the life of me, spend hours, and thought the tab was paper weight. Found your post, changed permissions to execute, and I no longer that that 'error' under the Wifi turn-on.
YOU ARE A LIFE SAVER..
armageddon!
Dear All,
I am in the same situation with wpa_supplicant on my brand new Samsung Galaxy S Wifi 5.0, running Froyo, firware: 2.2.2.
I did the following:
1. Download this file: wpa_supplicant
2. Start -> Accessories -> Command Prompt Run as Administrator
3. cd the directory
4. Connect your phone via USB to your computer, then execute the following command:
5. adb shell
6. su
7. mount -o remount,rw -t yaffs2 /dev/block/stl9 /system
8. cp /system/bin/wpa_supplicant /sdcard/wpa_supplicant_ORIGINAL
"/system" is now "rw" mode, original wpa_supplicant is saved.
9. Open another command prompt ( repeat step 2. and 3. ) Then execute the following commands:
10. adb push wpa_supplicant /sdcard/wpa_supplicant
( adb push localfile /remotedir/remotefile )
11. Get back to your other command prompt, and execute the following commands:
12. cp /sdcard/wpa_supplicant /system/bin/wpa_supplicant
13. sync
14. chown root.shell /system/bin/wpa_supplicant
15. chmod 755 /system/bin/wpa_supplicant
16. sync
17. exit
18. exit
So at the moment wifi does not work (ad hoc also, but i do not care) I have the original wpa_supplicant file, but I am too noob to restore it. If someone who already managed to get back wifi working could explain what to do it would be highly appreciated.
Thanks!!!!!!!
cusin
help
nubie said:
Did that.
#Su
#Chmod 777 system/bin/wpa_supplicant
Then the terminal registers and goes to next line.
I did reset term, app exited. Wifi doesn't work, ad hoc works
second time I backed out of the app. Still wifi- no, ad hoc-yes
Any clue?
Should I hard Reset?
Sent from my SPH-P100 using XDA App
Click to expand...
Click to collapse
Hello,
It's fantastic.. it's long time I'm looking for a way to connect via adhoc and now I see that you have already done and trying to get back to original.
Please let me know how you were able to activate this feature(adhoc) on android.
I'm really stopped!!
Still stuck
I actually didn´t backup my old wpa_supplicant :\\\
Still struggling with this!! Any help?
I´m on a galaxy tab 2 GT-P3110 on android 4.0.4.
Thanks!

[HOWTO] Mount Nexus 4 in Linux

You are unable to just plug in your Nexus 4 in Linux but it is very easy to mount and unmount to move data to/from your sdcard. This is one option that will allow you to utilize Nautilis (or any other file browser) to copy files to/from your Nexus 4. This is written for Ubuntu, but should work the same for other Linux systems. Also, this should work for Nexus 7 and 10.
1. Enable Developer options and enable USB debugging.
2. Install necessary modules to your computer:
sudo apt-get install mtp-tools mtpfs
3. Configure 51-android.rules:
sudo gedit /etc/udev/rules.d/51-android.rules
paste the following at the end of the file (if the file does not exist then just paste):
#LG - Nexus 4
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
#Samsung - Nexus 7 & 10
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"
Save and exit.
4. Make the file executable:
sudo chmod +x /etc/udev/rules.d/51-android.rules
5. Restart udev
sudo service udev restart
6. Create mount point and permissions (will need to do this for other Nexus' if using for the 7 or 10)
sudo mkdir /media/nexus4
chmod 755 /media/nexus4
7. Plug in the Nexus 4 and make sure MTP is enabled.
8. Mount with the following command:
sudo mtpfs -o allow_other /media/nexus4
9. When you have completed your work you must unmount:
sudo umount /media/nexus4
Now each time you need to copy from/to your Nexus 4 to your Linux computer you only need to plug in and run 8, then 9 when you have completed your work.
Good info! I'll try it out on my Ubuntu laptop later.
Thanks!
Awesome. Thanks
sent from my straight out of limbo 2 Nexus 4 using XDA-premium
This isn't so much a Nexus 4 guide as a general Linux mounting guide, but still cool. Thanks!
First, thanks to the OP! Just wanted to add another way for linux.
Just install and run gMTP plug your phone in and click connect. It is in the Ubuntu software center or for other versions of linux at http://gmtp.sourceforge.net/
I prefer adb+qtadb. Better speed and stability compared to mtp i think.
Sent from my Blade using xda app-developers app
Thanks for that write up. On my gentoo box my galaxy nexus worked flawlessly but the nexus 4 did not. Hopefully this will do it!
Sent from my Nexus 4 using Tapatalk 2
Kaar3l said:
I prefer adb+qtadb. Better speed and stability compared to mtp i think.
Sent from my Blade using xda app-developers app
Click to expand...
Click to collapse
Yes QtADB works very nicely also. It requires a little more setup than gMTP, but you are correct that it is a little faster and stable.
Kaar3l said:
I prefer adb+qtadb. Better speed and stability compared to mtp i think.
Sent from my Blade using xda app-developers app
Click to expand...
Click to collapse
the3dman said:
Yes QtADB works very nicely also. It requires a little more setup than gMTP, but you are correct that it is a little faster and stable.
Click to expand...
Click to collapse
Never heard of that. What is it?
Generating random authentication keys
---------- Post added at 07:48 AM ---------- Previous post was at 07:47 AM ----------
Konsyst said:
This isn't so much a Nexus 4 guide as a general Linux mounting guide, but still cool. Thanks!
Click to expand...
Click to collapse
Haven't gotten my N4 yet but I'm gonna try this on my sIII.
Generating random authentication keys
Thanks for your work! very useful..!
Konsyst said:
This isn't so much a Nexus 4 guide as a general Linux mounting guide, but still cool. Thanks!
Click to expand...
Click to collapse
Not such a general Linux guide as a Debian-derivative guide.
Helpful nonetheless marty331 for the correct udev strings, thanks!
I personally think using sshfs and sshdroid is a much more stable solution. MTP support on Linux is... shoddy to say the least.
Thanks given anyway though.
It seems that mtpfs 1.1 is broken. I downgraded to 1.0 and it worked. However, there is usually lag for some reason whenever the screen is off.
I had MTP/PTP crash several sdcards of mine which required me to format them (no write permissions had no way to get that back.)
Ever since that I just use ADB (Android Debugging Bridge) there are several GUI front-ends available in the default deb/rpm repositories, or if you are comfortable with the terminal (and with ADB it's really really simple to master) you can just get the binary and put it in your bin folder and transfer it via that. Highly reliable, speed is about 2-3mb/s -- but it works.
I gave up on this on Debian Testing. My Galaxy Nexus would not mount no matter what udev rules I used and mtpfs is not a solution. Instead, I just use a ftp server on the phone and ftp things to it or push things using adb. I've also tried airdroid a few times. I would not mind trying the sshfs alternative either. Gonna check that one out.
jamcar said:
Never heard of that. What is it?
Click to expand...
Click to collapse
QtADB is just a GUI for ADB and it works very well. Search QtADB on Google and you will find the download page with instructions.
Sent from my Nexus 4 using xda app-developers app
OP's use of udev inspired me to come up with this solution using ADB.
I'll assume you have ADB installed. There's plenty of indepth guides for that elsewhere.
This tutorial will have you playing around in system directories on your Linux install. I tried to make this guide user friendly but you should have at least SOME knowledge of Unix like OSes before you even try this.
Not for the faint of heart.
Get http://https://play.google.com/store/apps/details?id=berserker.android.apps.sshdroid&hl=en from the play store. Enable USB debugging in the developer options on your phone.
Open SSHDroid on your phone and set your port to something other than 22. I use 2222.
Open a terminal window on your computer and elevate yourself to root (Preferably using su -. Otherwise use sudo su -.).
Now that we got that done, try logging into your phone to make sure everything works. It'll be something like
Code:
ssh -p2222 [email protected][yourPhone'sIP]
. If you get asked a password it probably works. Just hit ^C (Ctrl+C) to exit that password prompt since we don't need to go further yet.
Next you'll need to create a passwordless SSH login. Run
Code:
ssh-keygen -t rsa
. Just hit enter to use the defaults on all the questions, we don't need anything more.
Now run
Code:
scp -P2222 ~/.ssh/id_rsa.pub [email protected][yourPhone'sIP]:/emulated/storage/legacy/
. When it asks for the password just type "admin", though it should tell you that anyway.
If the file copied over successfully you should no be able to type
Code:
ssh -p2222 [email protected][yourPhone'sIP]
again and not be prompted with a password at all. Cool!
At this point it's recommended you go into the SSHDroid settings on your phone and untick the "Enable Password" box, though it's not required, especially if you want to ssh to your phone from other devices/computers.
Run lsusb and look for the line that says Google in it. You want to look out for something like
Code:
Bus 001 Device 070: ID 18d1:4ee2 Google Inc.
Copy the two alphanumeric codes before "Google Inc.". The first is your vendor ID and the second is your device ID. You might want to label them so you remember which is which.
Here's the scary part of the tutorial. Use your favorite text editor (preferably command line based) and create a new file at "/etc/udev/rules.d/85-android_mount.rules". Copy and paste this and edit to fit the IDs you got in the previous command.
Code:
SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4ee2", RUN+="/usr/local/sbin/phone-mount -m" SYMLINK+="Nexus_4"
SUBSYSTEMS=="usb", ACTION=="remove", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4ee2", RUN+="/usr/local/sbin/phone-mount -u" SYMLINK+="Nexus_4"
It should be obvious where you need to put your Vendor and Device IDs now.
Save it and run these commands.
Code:
chmod +x /etc/udev/rules.d/85-android_mount.rules
chmod 775 /etc/udev/rules.d/85-android_mount.rules
chown root:root /etc/udev/rules.d/85-android_mount.rules
Now we need to create another file at "/usr/local/sbin/phone-mount" and paste this inside.
Code:
#!/bin/bash
export PATH=/opt/android-sdk-update-manager/platform-tools/:$PATH
case "$1" in
-m )
adb wait-for-device
adb forward tcp:2222 tcp:2222
# If you have SSHDroid Pro you just need to add "pro" to the "sshdroid".
adb shell am broadcast -a berserker.android.apps.sshdroid.command.START
sshfs -p2222 -o allow_other,idmap=user [email protected]:/storage/emulated/legacy/ /media/nexus4
exit 0
;;
-u )
umount /media/nexus4
exit 0
;;
esac
We need to modify the permissions for this file too.
Code:
chmod +x /usr/local/sbin/phone-mount
chmod 775 /usr/local/sbin/phone-mount
chown root:root /usr/local/sbin/phone-mount
Almost done. If you don't already have sshfs installed on your Linux install then do so now. You'll also need to enable the "allow_other" option. For my distro it's as simple as editing "/etc/fuse.conf" and uncommenting the "user_allow_other" line. Your results may vary.
Now finally we need to create the actual folder you'll be mounting your Nexus 4 at. If you blindly followed my guide that'll be /media/nexus4.
Code:
mkdir /media/nexus4
chown root:users /media/nexus4
chmod 775 /media/nexus4
Now all we need to do is restart udev. Right now you'll want to make sure the phone is unplugged, then restart your udev daemon. For Debian based distros like Mint, Ubuntu, Debian, Crunchbang, etc. you'd run.
Code:
service udev restart
After it's done restarting you can plug your phone in, wait a few seconds, and hopefully have your phone automount to /media/nexus4 .
You may have to improvise in a few spots because all distros are not the same, especially when you compare something like Gentoo to Debian. If you're having problems with sshfs chances are your answer is on Google. You'll honestly get better help there than having me trying to guess your system.
Also note this is a pretty hacky and dirty way to do things. Don't go yanking your phone's USB cord out without unmounting "/media/nexus4" first. You shouldn't have any problems if you're not reading or writing anything, but there is the potential for data loss and crashing udev.
i got this error at the last step
Code:
Attempting to connect device
PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
Android device detected, assigning default bug flags
Listing File Information on Device with name: (NULL)
fuse: bad mount point `/media/nexus4': Transport endpoint is not connected
i dont have a nexus 4 and im not on linux. but dermann made a script for this i think.
http://forum.xda-developers.com/showthread.php?p=33499930#post33499930
I've been using AirDroid. Works great for transferring files.

A working cifs.ko

Don't want to flash a full kernel just need the modules if possible. Many thanks
SordFish said:
Don't want to flash a full kernel just need the modules if possible. Many thanks
Click to expand...
Click to collapse
This is currently one of the top google results for "cifs ouya;" please delete or rename this thread, as there had been zero progress on it, but everyone who wants cifs on ouya is getting steered to it.
huh? no one compile it?
here you are
What I need to do with this files? can you explain with more detail please.?
download and extract them
Code:
adb push md4.ko /data/local/tmp/md4.ko
adb push nls_utf8.ko /data/local/tmp/nls_utf8.ko
adb push cifs.ko /data/local/tmp/cifs.ko
adb shell
su
mount -orw,remount /system
cat /data/local/tmp/md4.ko > /system/lib/modules/md4.ko
cat /data/local/tmp/nls_utf8.ko > /system/lib/modules/nls_utf8.ko
cat /data/local/tmp/cifs.ko > /system/lib/modules/cifs.ko
mount -oro,remount /system
insmod /system/lib/modules/md4.ko
insmod /system/lib/modules/nls_utf8.ko
insmod /system/lib/modules/cifs.ko
then use something like "CifsManager" to mount smb share
P.S. those modules are for 1.0.393-r1 only, and if Ouya release a newer firmware, you will lost the cifs functions.
>s added
needed some >s. I inserted them below
i just pasted it without looking and MAD pc speaker beeping action when it cats to the terminal
Code:
adb push md4.ko /data/local/tmp/md4.ko
adb push nls_utf8.ko /data/local/tmp/nls_utf8.ko
adb push cifs.ko /data/local/tmp/cifs.ko
adb shell
su
mount -orw,remount /system
cat /data/local/tmp/md4.ko > /system/lib/modules/md4.ko
cat /data/local/tmp/nls_utf8.ko > /system/lib/modules/nls_utf8.ko
cat /data/local/tmp/cifs.ko > /system/lib/modules/cifs.ko
mount -oro,remount /system
insmod /system/lib/modules/md4.ko
insmod /system/lib/modules/nls_utf8.ko
insmod /system/lib/modules/cifs.ko
Thanks.
WonderEkin said:
huh? no one compile it?
here you are
Click to expand...
Click to collapse
Err, I guess I should have noted that possibility as well, haha. Thanks.
hi, anyone have working cifs.ko in ouya?, the library is missing. the only option is cifmanager but can´t add at startup
I apologize for my ignorance, but what sort of practical applications would CIFS support offer on the OUYA? I side loaded an app called Samba Filesharing, and it seems to work fine, however the write speed is quite slow - under 3 MB/s from my laptop.
What would be the difference between following the steps above and just side loading the app I've mentioned? I'm very interested in using my OUYA as a file server in conjunction with a USB hard drive.
Thanks!
Sent from my iPhone using Tapatalk 2
So... figured I'd update this thread if anyone wants to test these...
Here's modules that should work on the current firmware ( OUYA 1.2.771 as of this writing ) as well as CIFSManager.
Install the same way as described by WonderEkin.
.. need some direction .. can't make this work .. "No such file or directory" .. share my directory from win8 with no security credential .. smb is working fine ..
realhuh said:
.. need some direction .. can't make this work .. "No such file or directory" .. share my directory from win8 with no security credential .. smb is working fine ..
Click to expand...
Click to collapse
Do these still work?

Categories

Resources