0% found this document useful (0 votes)
38 views

Page 2: Using Android As A Modem Page 3: Reset Ubuntu Password With Live CD

Using an Android phone as a modem for a laptop requires installing Proxoid on the phone and enabling USB debugging. The computer must recognize the phone through USB and configure udev rules and port forwarding using adb. This allows the laptop's browser to use the phone as a proxy server for internet access. Resetting a forgotten Ubuntu password can be done from a live CD by mounting the Ubuntu partition, chrooting into it, and using passwd to change the password for the target user.

Uploaded by

Chxta
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Page 2: Using Android As A Modem Page 3: Reset Ubuntu Password With Live CD

Using an Android phone as a modem for a laptop requires installing Proxoid on the phone and enabling USB debugging. The computer must recognize the phone through USB and configure udev rules and port forwarding using adb. This allows the laptop's browser to use the phone as a proxy server for internet access. Resetting a forgotten Ubuntu password can be done from a live CD by mounting the Ubuntu partition, chrooting into it, and using passwd to change the password for the target user.

Uploaded by

Chxta
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Page 2: Using Android as a modem

Page 3: Reset Ubuntu password with live CD


Use Android as a modem

I have a mobile phone running Android and a 3G data package. Can I use this
to connect my laptop to the internet instead of paying out for another package
and a 3G modem dongle?

Yes. Most smartphones are able to act as a modem, usually over a USB or
Bluetooth connection. This isn't possible (May 2010) with a standard Android
system because root access is needed for this. It's however possible to gain
root access to an Android phone without much difficulty. However, there are
security implications of giving root access to all applications running on your
phone. There is an alternative, Proxoid, which turns your phone into a web
proxy server, and the Android developers' kit includes the software needed to
send TCP requests to the phone over a USB cable.

On the phone, install Proxoid from the Market. For it to successfully


communicate with the computer over USB, you need to enable USB debugging.
On your phone go to Menu>Settings>Applications>Development and turn on
USB debugging. Now you can run Proxoid and enable it. On the computer you
need to set it up to recognise your phone however. Connect it by USB then run
$lsusb
look for the entry for your phone (if you're unsure, make sure that your phone
is the only USB device connected). You will see ID followed by two hexadecimal
numbers, which are the manufacturer and product Ids for the phone. On my
phone it gives
$Bus 001 Device 003: ID 0bb4:0c02 High Tech Computer Corp.
Then create /etc/udev/rules.d/11-android.rules as root and add this line:
$SUBSYSTEMS==”usb”, SYSFS{idVendor}==”0bb4”, SYSFS{idProduct}==”0c02”,
MODE=”0666”, OWNER=”chxta”
*please note that on your computer, chxta should be replaced with your
username.
**also note that the Vendor and Product ids should be replaced with your
phone's vendor and product ids.

When you now connect your phone, the device node that udev creates would
be owned by you.

The next thing you would need to install would be the Android SDK (it may be
on your distro's repositories). You can download it from here. Get the tar ball
and unpack somewhere in your home directory.

Navigate to the android-sdk-linux_86/tools directory in a terminal and run


$./adb forward tcp:8080 tcp:8080

This command forwards TCP connections to port 8080 on the computer to port
8080 on the phone. The next step is to set up your browser to use a proxy
server at localhost port 8080 and all its requests will go through the phone.
When you want to switch back to your usual internet connection, turn of the
proxy.
Resetting Ubuntu password with live CD

I got a PC set up and installed Ubuntu on it. Unfortunately I could not log in
after install as I had forgotten the password. Is there a way to get around this?

There is a way around this which requires the use of a live CF and the
command line. Any live CD will do. Boot from the CD and when the desktop
appears, go to Places>Computer where you will see a list of the drives and
partitions. Select the one where you installed Ubuntu. It should be mounted in
the live environment as /media/disk.

Open the terminal and run


$sudo chroot /media/disk /bin/bash

Chroot, or change root changes the root directory to the path you give and runs
whatever command comes next. Sudo doesn't ask for a password because the
live CD user doesn't have one. So this swithces you to the root of your installed
system and runs the Bash shell. You are now inside your Ubuntu installation as
root and can change your password with
$passwd yourusername

It will ask you for the new password twice and then write it to disk. If you can't
remember the username you used, you can find it with
$grep :1000: /etc/passwd

Ubuntu sets the first user to have a user ID of 1000, and grep searches for that
in the password file. The username is the first item of the line it returns. Press
Ctrl+D to exit the chroot, reboot and eject the CD. You can now log in with the
password you just set.

You might also like