How can i enable port forwarding during USB tethering? I know there are plenty of apps available for this. but i want to know is there any method available to perform this without installing an app and also without rooting the device? Target machine is running with Android 4.0.4, obviously not rooted. Thank you. P.S. I am trying to host a server on a PC connected to internet via Android device(USB tethered). I want my Android device to forward incoming TCP requests to particular port on the host machine.
There are 2 adb commands:
adb forward adb reverse
As you mentioned in the comment, you are probably looking for
adb reverse which works like this:
adb reverse tcp:<remote> tcp:<local>
<remote> will be TCP port on your Android phone and
<local> the TCP port on your host computer.