Accessing a web server running in Android emulator from my local machine I'm trying to access a web server running on the Android emulator from my machine. I know the reverse i.e., how to access the server running on my local machine from the Android emulator (using 10.0.2.2). I have searched a lot about this stuff but couldn't get any relevant information.

When the server is up and running inside the emulator I can access it using 10.0.2.15:portNumber. I can do a telnet to the emulator, but I wonder how that will be helpful. Any suggestions on how to get connected to the web server running inside the emulator?
You need to create a port forwarding to your Android device. This can be done with ADB.

adb forward &lt;local&gt; &lt;remote&gt; - forward socket connections
                                 forward specs are one of: 
                                   tcp:&lt;port&gt;
                                   localabstract:&lt;unix domain socket name&gt;
                                   localreserved:&lt;unix domain socket name&gt;
                                   localfilesystem:&lt;unix domain socket name&gt;
                                   dev:&lt;character device name&gt;
                                   jdwp:&lt;process pid&gt; (remote only)


For example: run adb forward tcp:12345 tcp:23456 and then use the URI http://localhost:12345 to access the server running on port 23456 in the emulator. Note that some ports are reserved for Android and some can only be used after rooting, so I'd suggest using high ports (>20000) if you can.