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.