There are many ways of using the internet connection of your computer on android phone:
1- If you use windows 7 OS then its very simple. Simply download "connectify" it turns your laptop into a virtual router (hotspot) and android phones can connect to hotspots(access points).
2- If you are using any Linux distribution like Ubuntu, then things are a bit complex. If your wireless adapter supports AP mode then you can create a hotspot using HostAp and connect to it.
If your wifi adapter does not support AP mode, then we still have a workaround which i discovered recently: (no rooting required)
- Install Open-SSH on your PC
- Install connect bot on your android phone.
- Create a hotspot using your android phone.
- Connect your pc to the hotspot.
- Open connect bot on android.
- In options select port forward and add a new port forward.
- Now port forwarding is of two types: dynamic and static
- If you pc is directly connected to a broadband connection then you need dynamic pf
- Choose dynamic and add a source port like 8888 and press create port forward.
- If you are behind a proxy server like in colleges then you need local pf.
- This time choose local, in source port give any port like 8888, in destination field it should be proxy-address:port e.g. 172.16.12.2:3128 and press create port forward.
- Now restart the connect bot (optional).
- Now connect to the ssh server of your pc using connect bot.
- In proxy settings of your android phone use 127.0.0.1 as proxy address and 8888 as port.
- Now you can easily use the internet of your pc on android phone.
- Usually proxy servers keep many ports blocked, so apps like google play may not work.
- For that download tor-bundle on your pc, start tor.
- When tor gets connected then proxy-address:port should be 127.0.0.1:9050 or 127.0.0.1:9051 in local pf of connect bot.
- This is a working solution.
1You have provided zero information about your computer, or the OS it's running. – None – 2012-04-01T20:12:53.707
Windows 7 . Broadband internet connection . No router/wifi on pc . – Nikhil – 2012-04-01T20:20:28.470
Have you looked at Internet Connection Sharing? Alternately, you may be able to bridge your Internet connection with the virtual network device presented by your phone. Since I do not have an Android device, I can't test this theory. – None – 2012-04-01T20:24:01.587
While some OEM ROMs come with this functionality, CM7 does not offer it. Someone may have developed this functionality as an app or other add-on package, though, for rooted phones. – jcrawfordor – 2012-04-01T22:49:22.933
My phone is rooted :| – Nikhil – 2012-04-02T06:31:13.670