adb-forward
Forward socket connections to a connected Android device or emulator. tldr-pages
On several platforms
Several platforms
Forward a TCP port to the only connected emulator or device
adb forward tcp:local_port tcp:remote_portIdentifyForward a TCP port to a specific emulator or device (by device ID / serial number)
adb -s device_id forward tcp:local_port tcp:remote_portIdentifyList all forwardings
adb forward --listIdentifyRemove a forwarding rule
adb forward --remove tcp:local_portIdentifyRemove all forwarding rules
adb forward --remove-allIdentify