I am running adb port forwarding from computer to mobile with this command:

adb forward tcp:6401 tcp:50000

which is working completely fine (accessing when I am accessing it through the same computer, but once I try to reach it through local WiFi (local IP I am getting 'connection refused'. What am I doing wrong ?


First connect adb with usb then make connection in same network. Don't disconnect adb over usb. Now execute adb over tcp. If you are forwarding to some port means you have to disable firewall on that port. To disable firewall on port if you use linux. Open terminal or press ctrl+alt+t, Then try with these commands

ufw allow port_number

here replace this port number with forwarded new port number.

If you are windows user this thread may helpful for you. After allowing this port restart your adb server. Once the device is connected over wifi then you can remove your usb from your pc. If you need to know about port forwarding in adb see this thread.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy