[GUIDE] USB reverse tethering - All apps working!!! - Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A

I've been looking for this for a while finally I got it, this is what I did:
- Connect your android device to your linux PC
- Enable USB tethering
- On your linux box as root (I'm using Fedora 16)
Code:
iptables -A POSTROUTING -t nat -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
ifconfig usb0 12.12.10.1
With this you will enabled internet sharing between network interfaces and assign an IP to the usb interface.
- Enable mobile data access (3G) on your android
- On your Android using adb or terminal emulator
Code:
ifconfig rmnet0 0.0.0.0
ifconfig usb0 12.12.10.2
route add default gw 12.12.10.1 dev usb0
setprop net.dns1 8.8.8.8
The first line will disable the data traffic through your 3G connection so all the traffic wiil go through the USB
- Enjoy
All apps works because they see a vaild 3G connection!!!
WARNING: If during you are USB connected, the 3g connection is reset, the system will restore its IP and DNS so
the traffic will go through this interface you must reset again the IP to 0.0.0.0 and the dns to 8.8.8.8. Maybe
one of the devs here could help us to prevent this happened. You can always check the IP values of all interfaces by typing "netcfg"
Press Thanks if I help you

everytime,
bash: /proc/sys/net/ipv4/ip_forward: Permission denied
yes i tried with sudo, same output.
using ubuntu12.04 64 bit. all other commands are fine,

gandhar said:
everytime,
bash: /proc/sys/net/ipv4/ip_forward: Permission denied
yes i tried with sudo, same output.
using ubuntu12.04 64 bit. all other commands are fine,
Click to expand...
Click to collapse
In Ubuntu you can re-direct to files you own as the user calling sudo, such as files in your home directory, but not system files
so try this:
sudo bash -c 'echo 1 > /proc/sys/net/ipv4/ip_forward'
or you can edit /etc/sysctl.conf and then run sysctl -p

secondary problem
Thank you very much for your post, this is what I was looking for.
I have configured correctly, ubuntu 12.10 and android 2.3.7 (Huawei U8650) but there is a problem.
Only works a few seconds, the first moments. In the browser takes more time, but when I open "play store" internet is disconnected. It seems they check applications and stop working, it's strange. Configuration is successful because it works, but only a few seconds ...
Seems to prove that internet applications not from the 3g and crashes ...
I have broken the wireless on my huawei U8650 and this is the only way I can access the internet
Thanks in advance
PS: I'm Spanish, sorry for my bad English.

wideru said:
Thank you very much for your post, this is what I was looking for.
I have configured correctly, ubuntu 12.10 and android 2.3.7 (Huawei U8650) but there is a problem.
Only works a few seconds, the first moments. In the browser takes more time, but when I open "play store" internet is disconnected. It seems they check applications and stop working, it's strange. Configuration is successful because it works, but only a few seconds ...
Seems to prove that internet applications not from the 3g and crashes ...
I have broken the wireless on my huawei U8650 and this is the only way I can access the internet
Thanks in advance
PS: I'm Spanish, sorry for my bad English.
Click to expand...
Click to collapse
Yes sometimes it happen to me too but normally takes several minutes even hours not seconds, READ the WARNING.
Hope it help.

rply plx
what about windows 7 ?
how can i let my all apps including vpn to be worked with reverse tethering

Qutub Uddin said:
what about windows 7 ?
how can i let my all apps including vpn to be worked with reverse tethering
Click to expand...
Click to collapse
check this http://forum.xda-developers.com/showthread.php?t=1371345

Related

[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] Problem with openvpn on Archos 101

Hi,
Last week I received my Archos 101. In general it is great. Even better is this forum
I installed urukdroid (thanks to the project-team!). I tried to use openvpn but it failed and I am not sure about the reason.
The server-configuration is
...
ifconfig-pool 10.10.10.120 10.10.10.130
push "route 10.10.10.1"
route 10.10.10.0 255.255.255.0
ifconfig 10.10.10.1 255.255.255.0
push "route-gateway 10.10.10.1"
push "route 10.10.10.0 255.255.255.0"
...
As the Archos is the only device it would get IP 10.10.10.120.
BUT: ifconfig shows:
inet addr.: 10.10.10.255 Bcast: 10.255.255.255 Mask 255.0.0.0
That did (and cannot) work. No ping to home network possible.
When I called route it looked fine (I used redirect-gateway).
When I send the command
ifconfig tap0 10.10.10.120 broadcast 10.10.10.1 netmask 255.255.255.0
from Archos Terminal I had at least access to my home network. But all route entries are gone.
Who has an idea what I am doing wrong? I checked it in the last day again and again... If there is no solution: is it possible to 'save' the entries from route and restore it after my manual change of ifconfig? I would like to do it via script, as my home network I only reachable via dyndns.
Thanks and best regards!
I used the OpenVPN Howto Quickstart and had no problems.
macemoneta said:
I used the OpenVPN Howto Quickstart and had no problems.
Click to expand...
Click to collapse
Yes, I know the guide. I did the same with my ubuntu-netbook and it works directly.
And I think, it would work also on the Archos, if the openvpn/ifconfig on Archos accept the 10.10.10.120. But the IP is changed to 10.10.10.255 and that did not fit.
Where the h*** did the 255 instead of 120 come from?
I noticed the same problem...
No idea where it comes from, but as a workaround, you can put a script somewhere containing a suitable "ip addr add x.x.x.x/y dev z" statement, and reference that in the .conf file as "up scriptname".
Note that you need to add "--script-security 2" to the openvpn commandline to make that work. I added that to the OPENVPN_CFG variable in /etc/uruk.conf/openvpn.
regards
Patrick
This is the openvpn configuration I use for my Archos 101 (on the server). I'm not having any problems, using openvpn 2.1.1:
Code:
port 1194
dev tun
tls-server
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/[COLOR="Blue"]<my host>[/COLOR].crt
key /etc/openvpn/keys/[COLOR="blue"]<my host>[/COLOR].key
dh /etc/openvpn/keys/dh1024.pem
mode server
ifconfig 10.8.0.1 10.8.0.2
ifconfig-pool 10.8.0.4 10.8.0.255
push "route 10.8.0.1 255.255.255.255"
client-config-dir ccd
push "redirect-gateway def1"
push "dhcp-option DOMAIN [COLOR="Blue"]<my domain>[/COLOR]"
push "dhcp-option DNS [COLOR="blue"]<my dns server>[/COLOR]"
keepalive 10 60
inactive 3600
route 10.8.0.0 255.255.255.0
user openvpn
group openvpn
persist-tun
persist-key
verb 4
I examined the situation a bit further.
The problem comes from the ifconfig command that openvpn calls itself:
Code:
/system/bin/ifconfig myvpn \
192.168.x.41 \
netmask 255.255.255.0 \
mtu 1500 \
broadcast 192.168.x.255
This is only used when tap interfaces are involved, which is the case in my setup, but not in the setup macemoneta is showing. caesar68: do you also use tap interfaces?
I can reproduce the problem by just using that ifconfig command again.
When I list the IP-address-to-set as the last argument, instead, it works, i.e.
Code:
/system/bin/ifconfig myvpn \
netmask 255.255.255.0 \
mtu 1500 \
broadcast 192.168.x.255 \
192.168.x.41
A quick scanning of the openvpn manpage, does not suggest a way to override the ifconfig command that is used, but it does give an option --ifconfig-noexec which suppresses its calling.
Unfortuntely, when I just pack the is-working-after-the-interface-is-up ifconfig command into an up script with this option, it just gives me an error SIOCSIFNETMASK (Cannot assign requested address) - even if the same commandline works when I run it over an already upped interface... Probably because the interface then already had an IP address...
No problem, though, ifconfig is obsolete anyway, let us just use ip link and ip addr, which are fortunately available under Uruk.
So, caesar68, the clean solution would be to have
--script-security 2 on the openvpn commandline, e.g. via OPENVPN_CFG in /etc/uruk.conf/openvpn
in your myvpn.conf file:
Code:
ifconfig-noexec
up-delay
up-restart
up /etc/openvpn/myvpn-on-up
a corresponding script /etc/openvpn/myvpn-on-up, executable, with content
Code:
#! /system/bin/sh
ip link set $dev mtu $tun_mtu up
ip addr add $ifconfig_local/$ifconfig_netmask \
broadcast $ifconfig_broadcast \
dev $dev
Works For Me
Thanks for the explanation and the workaround, brian_o'fish. Why are you using tap though? Tap provides an Ethernet bridge, so you'll be transporting packets that really don't need to be sent to your Archos (reducing available bandwidth). Tun is layer 3 routed, so only traffic destined for either endpoint goes over the VPN connection.
macemoneta said:
Why are you using tap though?
Click to expand...
Click to collapse
That's what the server I'm using, is configured to do, as it provides transparant bridged LAN access via VPN, and that is what I want, as I am the admin of said LAN and VPN.
If the low level of broadcasts we have, ever increases or appears to be a problem to me, I'll set up an additional tun server, but for now it is simply not an issue.
Anyway, good hint in general!
Hi all!
Thanks a lot for your comments. Yes I am using tap. I would like to have access to my home network (storage etc.). Therefore I want to use the brigde functionality. And that works only when I changed the ifconfig manually afterwards. But the route is distroyed then and packages to the internet are not routed secure thru my home-network.
@ brian_o'fish: Thanks for the advise. I will try that the next days. In the moment I am happy to read, that I am not the only one with the problem (and maybe to stupid to use openvpn - but on the netbook it works).
I have never worked with tun. Maybe I could check, if that is also a workaround.
I will keep you informed, but I am on a trip the next days.
Thanks again!
*** Update ***:
I didn't work neither with tap nor with tun. Meanwhile I tried to run VPNC. I had some trouble, but it works now.
caesar68 said:
I didn't work neither with tap nor with tun.
Click to expand...
Click to collapse
Did you try the approach I described with tap, and can tell where / how it failed?

USB to Ethernet dongle (from DealExtreme) - WORKS!

This is a DEV thread.
Unfortunately can't post in DEV forums as i never wrote in this site.
I've been working on enabling USB to Ethernet dongle on our Transformers as i didn't see any successful attempt in this area.
For my experiments I use USB to ethernet dongle from DealExtreme: (Link deleted. Can't post links. Search for "SKU 34691")
This dongle is based on ASIX AX88772B chipset.
Linux Driver was downloaded from: (Link deleted. Can't post links. Google for the driver v4.1.0)
I've compiled the driver with latest Clemsyn kernel downloaded from his git: (Link deleted. Can't post links)
The driver compiles without errors to asix.ko file (attached)
After insmoding the driver into the kernel i connected the dongle to USB port on the keyboard dock and connected RJ45 cable to it from my router. The blue led turned on and started to blink!! (Never happened before!).
Encouraged by this development i've executed the following sequence in terminal:
Code:
ifconfig eth0 10.0.1.17 netmask 255.255.255.0 broadcast 10.0.1.255
route add default gw 10.0.1.1
The commands executed without errors and i tried to ping my router
Code:
ping 10.0.1.1
and.. it WORKED!
Started pinging computers in my local LAN - everything WORKED!
Access to router web interface via browser - WORKS!
Here the happy story ends.
I couldn't manage to ping any IP addresses outside the local network.
I think i'm very close to make this work.
Any help will be appreciated.
Edit:
FULLY WORKS!!!
Need to add DNS configuration (i set to Google DNS server):
Code:
setprop net.dns1 8.8.8.8
And that is it!
USB to Ethernet dongle fully works on Asus Transformer
Edit 2:
Not all applications work with wired connection.
Browser and Gmail work, but Skype does not.
Need to investigate further.
Good stuff! It would be nice to have the option to use a wired network in case you needed to! Great work!
dear Quiethinker~~
i have been searching for whole day and finally reach your post. good stuffs
it would be even better if you can share the procedures step by step, such as how to "insmod" ....
thank you very much~~
jaseli said:
dear Quiethinker~~
i have been searching for whole day and finally reach your post. good stuffs
it would be even better if you can share the procedures step by step, such as how to "insmod" ....
thank you very much~~
Click to expand...
Click to collapse
I'll try to explain the procedure step by step (a bit improved sequence since my first trails):
1. Get USB to Ethernet dongle from DealExtreme (SKU 34691) - Do not attach it yet.
2. Install terminal application on the Transformer (such as "Android Terminal Emulator")
3. Turn off the WIFI.
4. Extract axis.ko.zip to some location in the Transformer (for example root of the sdcard)
5. Open terminal application and execute the following commands in the command line:
Code:
su
insmod [PATH_TO_KO]/axis.ko
6. Attach USB to Ethernet dongle to USB port on the Transformer's dock and connect RJ45 network cable. (Blue led on the dongle should start blinking)
7. Execute the following commands in the command line:
Code:
/system/bin/dhcpdc eth0
setprop net.dns1 8.8.8.8
8. Test that you have internet connection:
Code:
ping google.com
Currently there is lots of limitations with this solution:
- I compiled the KO module with clemsyn kernel v8b and checked only with this kernel.
- Android system doesn't recognize wired connection and therefore many apps think that there is no connection available
- When transformer going to power-down mode it disconnects the USB network. After waking up need to execute step 7 again.
I'm currently working on several directions in this area:
- Enabling support for more USB to Ethernet sticks within the kernel (custom kernel release is needed unless kernel devs will push the changes into their kernels)
- Enabling automatic configuration for wired network in android (Some scripting)
The achievement in this post is a proof of concept. I'm making a progress but very slowly due to very limited time. I hope more devs will pick this up.
Also attaching the sources for asix.ko driver so people can compile it with different available kernels
The drivers for ASIX AX88772B chipset are already in the kernel
I have one of these usb-eth dongles too and it works without the need for any extra drivers.
I simply run dhcpcd eth0 to pickup an ip address from dhcp and then setprop net.dns1 8.8.8.8 for dns.
I have an EDIMAX EU-4207
Other dongles using this chipset include the WII adapter, the Apple dongle and the linksys/cisco USB200M or USB300M
Roach2010 said:
The drivers for ASIX AX88772B chipset are already in the kernel
I have one of these usb-eth dongles too and it works without the need for any extra drivers.
I simply run dhcpcd eth0 to pickup an ip address from dhcp and then setprop net.dns1 8.8.8.8 for dns.
I have an EDIMAX EU-4207
Other dongles using this chipset include the WII adapter, the Apple dongle and the linksys/cisco USB200M or USB300M
Click to expand...
Click to collapse
Good to know that your kernel includes it!
(Checked your GITHUB, do your refer to CONFIG_USB_NET_AX8817X=y ?)
Till now i worked with Clemsyn-Blades kernel and this wasn't included (maybe need to switch kernels )
Now only need to find automatic way to configure eth0 on insert/wake-up and it will be usable for regular users.
Quiethinker said:
Good to know that your kernel includes it!
(Checked your GITHUB, do your refer to CONFIG_USB_NET_AX8817X=y ?)
Till now i worked with Clemsyn-Blades kernel and this wasn't included (maybe need to switch kernels )
Now only need to find automatic way to configure eth0 on insert/wake-up and it will be usable for regular users.
Click to expand...
Click to collapse
Ah yes, Asus added support since 3.2. I think we can enable it via a service call in init.rc but eth0 doesn't play too well with wlan0 I've found.
proby a dumb question anyways
but has to be a rooted device doesn't it?
lil-devil said:
proby a dumb question anyways
but has to be a rooted device doesn't it?
Click to expand...
Click to collapse
Shortly - yes
Ok, it works well with my USB Lan adapter (Browser, Market browsing, etc.), but if I want to download an app from the market it doesnt work (only over Bluetooth or Wifi).
Lines I used:
dhcpcd eth0
setprop net.dns1 8.8.8.8
Is there a solution for the market download problem?
Would one or both of these adapters be supported?
http://www.monoprice.com/products/subdepartment.asp?c_id=103&cp_id=10311&cs_id=1031102
Thanks.
No: Product ID: 6150
Maybe: Product ID: 5345
You need NetGear FA 120 (search ebay)
xperiaflooter said:
Ok, it works well with my USB Lan adapter (Browser, Market browsing, etc.), but if I want to download an app from the market it doesnt work (only over Bluetooth or Wifi).
Lines I used:
dhcpcd eth0
setprop net.dns1 8.8.8.8
Is there a solution for the market download problem?
Click to expand...
Click to collapse
Its a problem with honeycomb. Currently it doesn't support wired connections. We can trick it on "kernel level" but some applications use additional API to check for connectivity. Currently I don't know how to trick this API.
Sent from my HD2 using xda premium
Thanks for the info. But I dont know why Asus integrated USB LAN drivers, without automatic loaders. That makes no sense. But,... ok, I am glad that the driver is inside
xperiaflooter said:
Thanks for the info. But I dont know why Asus integrated USB LAN drivers, without automatic loaders. That makes no sense. But,... ok, I am glad that the driver is inside
Click to expand...
Click to collapse
Maybe in some future honeycomb update this feature will be built-in.
I really hope so at least!
I was able to get my USB 2.0 NIC working without a module on Stock3.2 (rooted) and Prime! 1.8.4.
I found a script on here that I placed in /data/ for DHCP
Code:
#!/system/bin/sh
netcfg eth0 dhcp
dhcpcd eth0
DNS1 = `getprop net.eth0.dns1`
DNS2 = `getprop net.eth0.dns2`
setprop net.dns1 $DNS1
setprop net.dns2 $DNS2
Here is the one for static.
Code:
#!/system/bin/sh
busybox ifconfig eth0 192.168.1.22
route add default gw 192.168.1.1
setprop net.dns1 8.8.8.8
setprop net.dns2 8.8.4.4/
Here is the original post from XDA user : Linuxslate
http://forum.xda-developers.com/showpost.php?p=14367749&postcount=41
I don't recall the brand, but here is the chipset.
http://www.asix.com.tw/products.php?op=pItemdetail&PItemID=97;71;101&PLine=71
ciphercore said:
I was able to get my USB 2.0 NIC working without a module on Stock3.2 (rooted) and Prime! 1.8.4.
.....
I don't recall the brand, but here is the chipset.
http://www.asix.com.tw/products.php?op=pItemdetail&PItemID=97;71;101&PLine=71
Click to expand...
Click to collapse
That's pretty cool. The Cisco-Linksys USB300M adapter appears to be using that same chipset, so I went ahead and ordered one. I should receive it sometime next week, at which time I'll report back if it works.
I'm working now
Running 3.2 with the latest build 8.5.9. It seems to have the needed driver built in corectly. I've then taken the following script and put it in /system/sbin (I called it wired) The apple USB to ethernet adapter is the one I'm using (cheapest available)
#!/system/bin/sh
ifconfig eth0
if [ $? -gt "0" ]; then
netcfg eth0
dhcpcd eth0
export DNS1=`getprop net.eth0.dns1`
export DNS2=`getprop net.eth0.dns2`
setprop net.dns1 $DNS1
setprop net.dns2 $DNS2
else
netcfg eth0 down
fi
If the device is not up $? will be larger than 0 (0 is success and if the device is down the command fails.) So the script brings up eth0. If eth0 is up $? equals 0 and the script brings the device down cleanly.
Now If I can just figure out how to turn this into an icon on the desktop I'll be all set
linuxrebel said:
Running 3.2 with the latest build 8.5.9. It seems to have the needed driver built in corectly. I've then taken the following script and put it in /system/sbin (I called it wired) The apple USB to ethernet adapter is the one I'm using (cheapest available)
#!/system/bin/sh
ifconfig eth0
if [ $? -gt "0" ]; then
netcfg eth0
dhcpcd eth0
export DNS1=`getprop net.eth0.dns1`
export DNS2=`getprop net.eth0.dns2`
setprop net.dns1 $DNS1
setprop net.dns2 $DNS2
else
netcfg eth0 down
fi
If the device is not up $? will be larger than 0 (0 is success and if the device is down the command fails.) So the script brings up eth0. If eth0 is up $? equals 0 and the script brings the device down cleanly.
Now If I can just figure out how to turn this into an icon on the desktop I'll be all set
Click to expand...
Click to collapse
Great script!
Search for GScript app on the market. This is what you looking for
earlyberd said:
That's pretty cool. The Cisco-Linksys USB300M adapter appears to be using that same chipset, so I went ahead and ordered one. I should receive it sometime next week, at which time I'll report back if it works.
Click to expand...
Click to collapse
Just to update, the USB300M works fine as well.

[Q] Android USB reverse tethering: How to fool the apps

USB reverse tethering = Cellphone gets network connection from PC via USB.
I know how to do USB reverse tethering except for one problem: Many Android apps will check network connection using the code below before doing any useful work:
Code:
ConnectivityManager connectivityManager = (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo info = connectivityManager.getActiveNetworkInfo();
The problem is that, when using USB reverse tethering, the above code will report no network connection. However, there IS a network connection (which is the USB reverse tethering itself), and ping, wget and all programs not doing this stupid check work well.
So the question is: How can I hack the system to let this network connection check return success (so that I can fool these apps)?
BTW. I use Cyanogenmod 7. And any solution specific to this MOD is also welcome.
Hello,
Could you please tell me how did you do the USB reverse tethering? Since on USB connection there is no option to do that under CM 7.1?
...
Thank you. Unfortunately the binary /system/bin/netsharing is not part of CM7.1, apparently it exists with Sense ROM. How do you manage to run it under CM7.1?
Sense ROM has the reverse USB tether built-in ("Internet passthrough"), maybe if the 2 commands could be executed, thanks to existing HTC NDIS driver doing NAT inside the PC it will work?
I've tested in CM7 that netsharing is not needed. Just execute the rest of the commands will be OK. Of course you need to do NAT on the PC because what you've setup is just a small LAN with private IP addresses.
Thank you for your input.
What I understand:
1- connect the phone via USB cable, choose charge only
2- Assuming my router has IP 192.168.1.1:
So I have to type these commands, could you confirm?
Code:
echo 4 > /sys/devices/platform/msm_hsusb/usb_function_switch
route add default gw 192.168.1.1
ifconfig usb0 192.168.1.1 mtu 500 up
But then how to do the NAT thing is out of my knowledge!
In fact what I want is when there is no router (since mine is wireless) with available Internet connetion
(ADSL line down). So I have to use USB 56kbps modem with telephone line to access Internet from the PC (running XP).
And I would like to plug the Android phone with USB cable and allow the phone to access Internet (Internet sharing
with the PC). I am not sure of the operations to do then.
Sorry but I don't know how to set up NAT on Windows XP... I use Linux and a simple iptables command suffices:
Code:
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

[Q] Change mac address

Hi guys
anyone can change mac of s5830I?
I try apps and busybox command but I cant.
can you help me
TNX
my English is bad
danial199 said:
Hi guys
anyone can change mac of s5830I?
I try apps and busybox command but I cant.
can you help me
Click to expand...
Click to collapse
The MAC address is hard-coded on your network interface controller (NIC) and cannot be changed permanently with simple command line from your terminal nor in software level approach. However we can assign a temporary solution for your MAC, which will be reverted back to it's original state after Reboot/Power off .
Requirements :
- Rooted phone
- Busy box app from play store installed
- Terminal emulator from play store :
Know normally your card's interface should be eth0 ( older devices ) or in case of newer phones ( wlan0)
after granting super user permission in terminal ( Su) , type >> netcfg
Code:
busybox iplink show eth0
you may change it to wlan0 , if you are on this interface
Code:
busybox ifconfig eth0 hw ether XX:XX:XX:XX:XX:XX
change the XX to your preference value ( i,e : 00:11:22:33:44:55)
Because of kernel design and absence of monitoring mode support for mac spoofing , this method won't work on protected networks ( ONLY open networks )
and if the lines above don't work for you , try to disable and enable your eth0:
Wifi is ON
su >
Code:
busybox ifconfig eth0 down
busybox ifconfig eth0 hw ether (address)
busybox ifconfig eth0 up
ehsanotaku said:
The MAC address is hard-coded on your network interface controller (NIC) and cannot be changed permanently with simple command line from your terminal nor in software level approach. However we can assign a temporary solution for your MAC, which will be reverted back to it's original state after Reboot/Power off .
Requirements :
- Rooted phone
- Busy box app from play store installed
- Terminal emulator from play store :
Know normally your card's interface should be eth0 ( older devices ) or in case of newer phones ( wlan0)
after granting super user permission in terminal ( Su) , type >> netcfg
Code:
busybox iplink show eth0
you may change it to wlan0 , if you are on this interface
Code:
busybox ifconfig eth0 hw ether XX:XX:XX:XX:XX:XX
change the XX to your preference value ( i,e : 00:11:22:33:44:55)
Because of kernel design and absence of monitoring mode support for mac spoofing , this method won't work on protected networks ( ONLY open networks )
and if the lines above don't work for you , try to disable and enable your eth0:
Wifi is ON
su >
Code:
busybox ifconfig eth0 down
busybox ifconfig eth0 hw ether (address)
busybox ifconfig eth0 up
Click to expand...
Click to collapse
Tnx for answer
after change mac I cant connect to wifi
want a new password but pass is true
danial199 said:
Tnx for answer
after change mac I cant connect to wifi
want a new password but pass is true
Click to expand...
Click to collapse
You are trying to access protected network , which comes with encryption ( WEP/WPA/WPA2 etc etc ) ? What error you are getting from Android OS ? Are you absolutely certain your MAC address is white listed inside the router/modem settings on open network protocol settings of course ?
ehsanotaku said:
You are trying to access protected network , which comes with encryption ( WEP/WPA/WPA2 etc etc ) ? What error you are getting from Android OS ? Are you absolutely certain your MAC address is white listed inside the router/modem settings on open network protocol settings of course ?
Click to expand...
Click to collapse
wpa2
when i connect to network want a password but the password is true
There isnt any listed mac address inside the router
danial199 said:
wpa2
when i connect to network want a password but the password is true
There isnt any listed mac address inside the router
Click to expand...
Click to collapse
Already explained about protected networks and the reason behind it in the first post . You need to set it to 'Open network' ( means no wpa/wpa2/wep etc,,etc) inside the router/modem you are seeking an access.
Maybe not so
I have tried several apps and every possible command in terminal (as root) and although all can successfully change the MAC address, the device is always unable to connect to an access point thereafter. This is a known issue, but unresolved and too frequently denied. I half suspect their are some "political" purposes for withholding the resolution; many have inquired about this, yet only receive pedantic or useless replies. I wonder if there is any correlation to the wifi chipset, or if it's a built-in Android limitation. I know my chipset is very difficult to identify ('demesg | grep wlan0' yields nothing familiar) and that it also seems incapable of monitor mode.
I have scoured many forums for the solution to this and found only a suggestion to change certain files, all which appear to vary between devices, etc.
What I'd like at this point, is and explanation if not a solution. Anyway, I think the OP may have been misunderstood, ergo my 'two cents'.

Categories

Resources