How do I stop an adb port forward?

n611x007 picture n611x007 · Jul 23, 2013 · Viewed 18.7k times · Source

One can forward a port with adb forward tcp:8080 tcp:8080. But do I need to kill the adb server to stop this forwarding?

I'm looking for a way to stop forwarding of a port in adb, after it was set up, but when the forward is no longer needed.

Answer

fadden picture fadden · Jul 23, 2013

Try adb forward --remove tcp:8080, or adb forward --remove-all.

This was added to adb in December 2012 (see patch here). The SDK update released for Android 4.3 (API 18) was the first to support it.