Setup USB Tethering on your Android Phone, No Root Access Required

11


When the next Android 2.2 release (Froyo) is eventually released it will be packing USB tethering by default. What is tethering you ask? Basically it allows your phone to act as a modem and share its wireless data connection with a laptop. The bad news is that even after it is released you will have to wait for it to be tested and ported to the Droid or Incredible. In the meantime there is a great way to get the same functionality without rooting your phone. This method involves a free application called azilink which uses an OpenVPN connection to route data traffic between your computer and Android device. This has been tested on Ubuntu and Fedora but it is sure to work on any flavor of Linux.

The original method is posted here.
The azilink app homepage. http://code.google.com/p/azilink/

Initial Setup and Configuration »

1 2 3
Share.

About Author

  • http://www.humans-enabled.com/2009/12/how-to-tether-your-verizon-droid-as.html Shannon VanWagner

    Hello Ryan… Thanks for posting this! Just wanted to let everyone know that I’ve created a script to set this up for the Ubuntu 9.10+ machines … See it on my blog at humans-enabled.com, or use the direct link to it:
    http://dl.dropbox.com/u/394584/Droid-Tether-SV.tgz
    Instructions here:
    http://dl.dropbox.com/u/394584/Droid-Tether-SV-README

    Enjoy!

    • http://androidnexus.com Ryan

      Thanks for the update!

    • Jim Bom

      Hey Shannon,

      Your script failed on my Fedora 14 install but I popped a livecd of Ubuntu 10.10 in my machine and it ran like a champ. thanks for throwing this together.

  • Jon

    Hi Ryan, I currently use a similar setup with Proxoid but it seems to only use 1 port (8080 by default). Does AziLink use multiple ports?

    • http://androidnexus.com Ryan

      I don’t believe that it uses multiple ports. This line does port forwarding from host port 41927 to android port 41927.
      adb forward tcp:41927 tcp:41927

  • Pingback: Froyo (Android 2.2) update disables USB tethering - Android Forums()

  • Dodekane

    Hi Ryan

    You forgot to put /etc/resolv.conf instread of resolv.conf
    in the line :

    sudo echo "nameserver 192.168.56.1" >> resolv.conf

    Thanks for your tutorial it was very clear and helpfull to me !

    • http://androidnexus.com Ryan

      Good catch thanks, fixed now.

  • Aaron

    Ryan,

    Thanks for the info, this is the most straight forward setup I have seen to date to get this accomplished.

    Thanks again!

  • Mark

    Hi Ryan,

    Perhaps you can help me. I am using your script with limited success to tether my Fedora 13 workstation to my Evo 4G.

    The short story, I run the script, start AziLink on my Evo, and get ‘Status: Connected to host’ reported by AziLink. Unfortunately, AziLink also shows ‘Bytes received: 0, Bytes sent: 0, TCP connections: 0, NAT table size: 0’. I don’t get any indications of networking.

    More details

    Output from android_tether:

    # ./android_tether
    Fri Sep 3 15:36:35 2010 OpenVPN 2.1.1 x86_64-redhat-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] built on Jan 5 2010
    Fri Sep 3 15:36:35 2010 WARNING: --ping should normally be used with --ping-restart or --ping-exit
    Fri Sep 3 15:36:35 2010 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
    Fri Sep 3 15:36:35 2010 ******* WARNING *******: all encryption and authentication features disabled -- all data will be tunnelled as cleartext
    Fri Sep 3 15:36:35 2010 TUN/TAP device tun0 opened
    Fri Sep 3 15:36:35 2010 /sbin/ip link set dev tun0 up mtu 1500
    Fri Sep 3 15:36:35 2010 /sbin/ip addr add dev tun0 local 192.168.56.2 peer 192.168.56.1
    Fri Sep 3 15:36:35 2010 WARNING: potential route subnet conflict between local LAN [128.32.147.0/255.255.255.0] and remote VPN [128.0.0.0/128.0.0.0]
    Fri Sep 3 15:36:35 2010 Attempting to establish TCP connection with 127.0.0.1:41927 [nonblock]
    Fri Sep 3 15:36:35 2010 TCP connection established with 127.0.0.1:41927
    Fri Sep 3 15:36:35 2010 TCPv4_CLIENT link local: [undef]
    Fri Sep 3 15:36:35 2010 TCPv4_CLIENT link remote: 127.0.0.1:41927
    Fri Sep 3 15:36:45 2010 Peer Connection Initiated with 127.0.0.1:41927
    Fri Sep 3 15:36:45 2010 Initialization Sequence Completed

    Contents of resolv.conf after starting checks out:

    #cat /etc/resolv.conf
    domain lan
    search lan
    nameserver 192.168.56.1

    What can I see?

    # ping www.ibm.com
    ping: unknown host www.ibm.com

    Or, explicitly providing an IP address (for http://www.ibm.com.cs186.net):

    # ping 129.42.56.216
    PING 129.42.56.216 (129.42.56.216) 56(84) bytes of data.
    ping: sendmsg: Operation not permitted
    ping: sendmsg: Operation not permitted

    What about the device?

    # ping 192.168.56.0
    PING 192.168.56.0 (192.168.56.0) 56(84) bytes of data.
    ping: sendmsg: Operation not permitted
    ping: sendmsg: Operation not permitted


    # ping 192.168.56.1
    PING 192.168.56.1 (192.168.56.1) 56(84) bytes of data.
    ping: sendmsg: Operation not permitted
    ping: sendmsg: Operation not permitted


    # ping 192.168.56.2
    PING 192.168.56.2 (192.168.56.2) 56(84) bytes of data.
    64 bytes from 192.168.56.2: icmp_seq=1 ttl=64 time=0.041 ms
    64 bytes from 192.168.56.2: icmp_seq=2 ttl=64 time=0.021 ms

    Finally, for what it’s worth, here’s what ifconfig has to say:

    # ifconfig tun0
    tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
    inet addr:192.168.56.2 P-t-P:192.168.56.1 Mask:255.255.255.255
    UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:100
    RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

    I’m not sure how to interpret this (I’ve little expertise on networking), but it seems that the host can talk with the device, but not the nameserver.

    Any suggestions?

    thanks,
    -Mark

  • Wezzy

    does this work for windows?