5

How to Tether your Verizon Droid (as an Internet modem) to Ubuntu GNU/Linux 9.10

view full story
linux-howto

http://www.humans-enabled.com – So if you're like me you recently picked up the fabulous Verizon Droid Linux-based phone, and now you're one happy camper.I've been cruising along with my Droid for a month now, and I'm happy as a clam. I have to tell you... The Verizon Droid is quite a fine Linux-based device indeed.So now that I've used the Droid for awhile, I set out in search of a piece of functionality that I hadn't yet replaced from my Blackberry days. That is: The capability to tether my Droid as an Internet modem to my Ubuntu GNU/Linux 9.10 machine using the USB cable.On the Blackberry, this was as simple as, a.) provisioning the data service through Verizon(yes, this does cost extra), and then b.) setting up the "Berry4All/BBTether" script (by the extravagant Mr. Thibaut Colar) on my Ubuntu Linux box.In my search for a solution, the first place I checked for a tethering application was in the Android Market. And while there are many other applications, the only app I was able to find for tethering, required for my phone to be "rooted". And so instead of jumping right into that, I went looking for an easier solution, and voila! - I found it.What I found is some easy tethering instructions by the masterful Shwan.c on this post at Ubuntuforums.org. So now there was only one problem: I'm using the Verizon Droid, not the HTC Magic. The good news is that the process is generally the same, except for a difference in hardware id information for the udev rules settings in Ubuntu.So after some minor changes, I've now successfully tethered my Verizon Droid via USB as a modem for my Ubuntu GNU/Linux 9.10 machine.So here are the easy steps to get you up and running with using your Droid as a USB tethered modem (and a big Thanks to Shwan.c for posting the original idea):1.) Download the current Android SDK (Linux version) from:http://developer.android.com/sdk/download.html?v=android-sdk_r04-linux_86.tgz2.) Extract the SDK, then navigate to the folder where the adb application is:tar xvf android-sdk_r04-linux_86.tgzcd android-sdk-linux_86/tools3.) Copy the "adb" application to your Ubuntu /usr/bin directory (sudo privs needed)sudo cp adb /usr/bin/adb4.) Create/edit/save a rules file for udev to allow your machine to see your devicesudo vi /etc/udev/rules.d/91-android.rulesPut the text below into the file(using "i" to enter "insert" mode and hitting the escape key to return to "select" mode before saving.. C'mon, what fun would Linux be without using vi? If you really don't like vi, you can substitute with something like gedit, or nano, or kate, or etc.), replace USERNAME with your logged Linux username, then type ZZ to save the file from vi.SUBSYSTEM=="usb", ATTRS{idVendor}=="22b8", SYMLINK+="android_adb", MODE="0666", OWNER="USERNAME"5.) Set the appropriate permissions to the rules file you just created.sudo chmod a+r /etc/udev/rules.d/91-android.rules6.) Restart udev to load the new rule.sudo restart udev7.) Enable "USB debugging" on your Verizon Droid via Settings>Applications>Development8.) Connect your Droid to the computer with the USB cable and then use the following adb command to check for your device.adb devicesexample:$ adb devicesList of devices attached040364FA0901E0119.) Install openvpn on Ubuntu so you can connect to your device with it.sudo apt-get install network-manager-openvpn openvpnsudo /etc/init.d/networking restartsudo /etc/init.d/NetworkManager restart10.) Install openvpn on your Verizon Droid.cd /home/Downloads/mkdir azilinkcd azilinkwget http://lfx.org/azilink/azilink.apkadb install azilink.apkwget http://azilink.googlecode.com/files/azilink.ovpn11.) Create a replacement resolv.conf file to be copied over to your /etc directory at run-time:vi resolv.conf#Type in the text below(hit "i" for insert first, then ESC after the insert, before saving) and then hit ZZ to savedomain lansearch lannameserver 192.168.56.112.) Now create a very small script to start the modemvi start_modem#Type in the text below, then hit ZZ to saveadb forward tcp:41927 tcp:41927sudo cp resolv.conf /etc/sudo openvpn --config azilink.ovpn13.) Set your new script to be executable.chmod 755 start_modem14.) On your Verizon Droid, launch the azilink app and place a checkmark by "Service active" so it can receive the connection from your Ubuntu machine.15.) With your wireless connection in Ubuntu "unchecked"(via right-click of the Network manager applet), launch the the connection script you just made in the Terminal:/home/Downloads/azilink/start_modemYou should now be able to surf the Internet, using your Verizon Droid as a tethered modem. When you're finished - hit ctrl+c at the Terminal from which you started the connection script. Then uncheck "Service active" on your Droid.If you have any questions, feel free to leave a comment.Shannon VanWagner11-02-09 (HowTos)