There are a lot of folks out there that want to tether their Android device to their linux laptop, as an ad-hoc network -- but are unable to for various reasons. Usually the culprit is a cumbersome wifi device that doesn't want to connect to ad-hoc networks in Linux without a lot of painful tinkering. The result is that people can see their Android network, but when attempting to connect to it, they remain in an endless loop. Well, have no fear. Today, I am going to tell you how you can get that pesky linux laptop online using nothing more than your Android-enabled device (such as a G1), a USB cable, and a handy little app (Proxoid) available from the market. The best part is... you don't even need root access to do this!
SMALL PRINT: Just for clarification... I want to point out that my 2 laptops work fine using wifi tethering under Linux, but to confirm that this works for the purpose of this tutorial, I turned wifi off on my laptop, and I'm posting this tutorial from my tethered connection right now. Yes, with no wifi! We're bypassing the ad-hoc network for this guide, that is why it is imperative that you physically connect your G1 (or other device) to your laptop to gain the benefits of this tutorial.
Requirements
Android-enabled device
A data plan
USB cable
A Linux Laptop or Netbook
Firefox (other browsers may be used, but their configurations are not covered within this guide)
INITIAL SETUP
1. Download and install Proxoid from the Market.
2. Connect your Android device to your computer via USB.
3. Launch Proxoid, and start the service.
4. On phone, from home screen: Menu > Settings > Applications > Development > USB debugging (make sure it is checked, if it isn't)
5. On Linux laptop/netbook, from a terminal window type:
NOTE: The command above, assumes that you are using Gnome... if using XFCE, substitute mousepad for gedit; if using KDE use either kwrite or kate in place of gedit; if using another UI and text editor, call it in place of gedit.Code:gksudo gedit /etc/udev/rules.d/90-android.rules
6. Add the following line to your text editor before saving and closing the file:
7. Download and decompress the latest Android SDK. I recommend unpacking the package to a directory named "android" inside of your home directory, but you may place it anywhere you deem appropriate.Code:SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
8. Open the terminal and navigate to the tools directory of your unpacked Android SDK. "tools" will be one level deep from the base package. Alternatively, you could navigate to the tools directory using your gui file manage and launch the terminal from there. Anyway...
9. Once in the tools directory, issue the following command in your terminal window:
10. Open Firefox.Code:./adb forward tcp:8080 tcp:8080
11. From Firefox: Edit > Preferences > Advanced > Network > Settings
12. Select Manual Proxy Settings and set the HTTP Proxy field to localhost and the Port field to 8080. Click OK.
13. Start surfing.
SUBSEQUENT RUNS
Perform steps 2, 3, 8-13 from the steps outlined above.
Presto! No more pesky wifi card or ad-hoc network trouble. Enjoy.
Last edited by JaceMan; 09-11-2009 at 12:34 PM.
The JaceMan's AC Forum Stats
Kind Words Spoken = 0
Helpful Information Provided = None
Persons Owned = Many
Plans to Change Said Operation = See "Kind Words Spoken"
=-=-=-=-=
To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
!
=-=-=-=-=
My Android App =
To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
Very nice. I'm going to try this out as soon as I can.
Very nice, this needs to be a sticky.
HTC Sensation - Rooted
Motorola Xoom - WiFi - Rooted - Moray 2.2.2
To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
Works like a charm!! Thanks for the info.
I followed your instructs to the "t", and no luck I get an error saying "insuffucient permissions for device"
'Droid eris
1.5
I followed the instructions and am having trouble, when I launch the "./adb forward tcp:8080 tcp:8080" command in tools (which is in "Android/android-sdk-linux_x86/tools" it says :no such file or directory". I am wondering if there are actually a whole host of steps that I have to do between your steps 7 and 8 that make this fix a lot more complicated than it originally looked. The Adroid SDK site mentions that all these Eclipse ADT Plugins, Platforms, AVD Manager and other components need to be installed in order for the SDK to work, and in the SDK tools directory there is a "adb_has_moved" read me document that says:
The adb tool has moved to platform-tools/
If you don't see this directory in your SDK,
launch the SDK and AVD Manager (execute the android tool)
and install "Android SDK Platform-tools"
Please also update your PATH environment variable to
include the platform-tools/ directory, so you can
execute adb from any location.
So... I guess what I'm getting at, is I've already spent a few hours trying to set this up. I'm not looking at doing much development, if any.. I simply want to tether my Samsung Galaxy S on my Ubuntu laptop. Before I spend another several few hours trying to figure out what all the extra stuff is that I'm really supposed to do between Steps 7 and 8 of this recommended fix, I wondered if anybody who knew could share the directions with me so that I can expedite this without spending a lot of time learning what maybe somebody else already knows.
Sorry, I'm just a little confused and overwhelmed right now. I keep up the best I can, but this is still all like learning an entirely new language to me! I wish they made tethering a little easier! You pay $400 for a phone that can tether and you just want to plug it in and have it work. It's frustrating that this technology is putting me to work as a technician for no pay! Time is precious, you know?
Thanks very much in advance!
Likewise, I get "bash: ./adb: No such file or directory" . Can someone clarify how to get this to work? SDKs are a bit over my head and I really don't know if I want to try to "launch the SDK and AVD Manager (execute the android tool)
and install "Android SDK Platform-tools"". Also, my ears are wide open for another method for USB tethering.
I went ahead and installed the SDK by executing the android tool and all seems to have gone well. Now I don't know where the /platform-tools directory is though, so I also don't know where adb is. Help? Maybe someone could go so far as to suggest a little script for activating the USB tether when needed. I might sound lazy but, honestly, I'm just kind of ignorant and pressed for time!
@mzcmn & Vanilla Bean:
I just tried this successfully with my Motorola Defy and laptop running Fedora 16. I didn't install the whole Android SDK and assorted dependencies, I simply used the Fedora "Add/Remove Software" tool and searched for "android". This turned up the "Android Platform Tools" sourced from the Fedora Updates repo. Installing it this way means you have direct access to the adb command from the shell without having to locate it.
If you are using Ubuntu then try launching Synaptic and searching for "android" or similar and I expect you'll turn up the same package for your version of Ubuntu.
This method is a bit clunky but it does work, I'd be interested if the OP has refined it at all.
Bookmarks