Page 1 of 1

[How to] Android Mobile Phone as Modem

Posted: 04 Aug 2011, 03:15
by wread
You can have your Android phone connected as modem to your computer. I named this script /opt/porteus-scripts/android-modem, that works for me ok.

#!/bin/bash
# This script tunnels the tcp-output of an android phone to the usb input of a computer,
# thus making the phone act as a high velocity modem.
# First you must have a rules-file. Name it /etc/udev/rules.d/90-android.rules, containing
# one line: SUBSYSTEM=="usb", ATTRS{idVendor}=="22b8", MODE="0666"
# substitute idVendor with the idVendor of your phone. In a konsole type lsusb,
# (mine says ID 22b8:2d66 Motorola PCS)
# Second, you must have the executable file adb from android-SDK installed in the exec path.
# Third, you must edit Firefox to use the mobile phone as proxy:
# Edit>Preferences>Advanced>Network>Settings, Manual proxy configuration, HTTP Proxy (set
# localhost) Port (set 8080), and check "Use this proxy server for all protocols"
#
/usr/bin/adb forward tcp:8080 tcp:8080
#
# In your android mobile you must start the application "proxoid" with Port parameter 8080

The rules-file I put in /rootcopy, as well as the /usr/bin/adb executable. So I connect the phone to usb, start proxoid in the phone, run /opt/porteus-scripts/android-modem, edit Firefox and navigate. :Yahoo!:

If you don't have adb, get it from http://www.mediafire.com/?jmg4i1g5jjwjt94

Enjoy!

Re: [How to] Android Mobile Phone as Modem

Posted: 24 Aug 2011, 09:45
by francois
Thanks wread.Good to know.

Re: [How to] Android Mobile Phone as Modem

Posted: 24 Aug 2011, 10:22
by ponce
FYI, I use the native usb tethering on the phones: that creates an usb0 device (when connected and activated) on which you can

Code: Select all

dhclient usb0
and you're ready to go.

Re: [How to] Android Mobile Phone as Modem

Posted: 28 Aug 2011, 13:01
by wread
@ponce
Of course, yours is a more elegant solution, thanks for the tip, Ponce!; I didn't even know the existence of dhclient. Dhclient is not part of Porteus 1.0 -at least I couldn't find it!- . :oops:

Meanwhile I hacked my Android to get root access and use Tether over Wi-Fi or Blue Tooth to get connected to IN.

Cheers! :beer:

Re: [How to] Android Mobile Phone as Modem

Posted: 17 Feb 2012, 03:47
by brokenman
These are not the androids you are looking for (use the force).

Re: [How to] Android Mobile Phone as Modem

Posted: 30 Apr 2012, 18:10
by TheDoctor
ponce wrote:FYI, I use the native usb tethering on the phones: that creates an usb0 device (when connected and activated) on which you can

Code: Select all

dhclient usb0
and you're ready to go.
This is what we did for our last Byzantium Linux field test (yesterday afternoon) and it worked like a charm.