How to establish a TCP session to a virtual device

How to establish a TCP session to a virtual device?

To establish a TCP session to a virtual device, port forwarding with ADB must be set up.

The command is:

adb forward tcp:<host port> tcp:<virtual device port>

ADB forwards packets to the virtual device.

Direct contact with the virtual device is not necessary.

Port forwarding must be established each time the virtual device starts.

For more information, refer to http://developer.android.com/tools/help/adb.html#forwardports.

Related articles