Friday, November 19, 2010

Android: AVD Internet

Hi

A very common problem faced by android developers in establishing a connection in the Android Emulator (AVD). The solution is quite straight forward but owing to developer phsche, the answer is never detailed out. So, here goes:

To enable internet connectivity on your AVD, do the following:

1. Make sure your AVD is running before you start this.
2. Go to cmd>run
3. navigate to your tools directory of the sdk. mine is: C:\Users\Pawan\Desktop\android-sdk_r07-windows\android-sdk-windows\tools
4. On the command prompt, you should see:
.../tools>

then type the following (only in bold):
adb.exe shell
# sqlite3 /data/data/com.android.providers.settings/databases/settings.db
sqlite> INSERT INTO system VALUES(99,’http_proxy', 'proxy:port');
sqlite>.exit

'proxy:port' is your PC's IP Address or (127.0.0.1)
so, a sample of 'proxy:port' is 10.12.23.45:80

Good luck

No comments:

Post a Comment