Let’s say it’s a hot summer day and you need to use one of the two USB-connectors of your Macbook Pro for a fan, while the other one is occupied by your keyboard. Time to turn on adb access using TCP and your local wifi-connection. Here’s how:
1. Connect your device using a USB cable.
2. Assign the port your device should use using the ‘adb tcpip [port]’ command.
3. Discover your phones’ IP-adress.
4. Connect to your phone using the setup port.
And you are done. When looking at your device list now, you will find your device using the USB-connection and your device using your Wifi-connection. Now you can unplug and use your USB-port for other important stuff.
If you want to end your connection again, use the ‘adb usb’ command.
This was tested on a rooted Nexus 5 and a non-rooted first generation Nexus 7.