In my attempts to make terminal clients of whatsapp and paytm, I was consistently asked that if we had to connect it via USB, there is not much fun. So I made this entire experience wireless. This article will explain how to do wireless adb debugging over a network.
What do you need?
- Connectbot app: To power wireless connection over ssh.
Adb setup: Use this google guide to set this up.
Same Wifi network for phone and laptop.
Lets do it.
- Note down ip address of your system. (use ifconfig on linux).
Open Connectbot, Enter your username@hostname for ssh field.
You should be able to connect to your system terminal after basic authentication clearance.
- Long press your newly made connection and select Edit host. Inside Post login automation, add this
adb connect localhost:5555
ensure to enter an extra [ENTER] after this command and press ok.
- Again go back to your connection, long press it and select Edit port forward this time. (Yes, We are going to use port forwarding to make it wireless)
Use settings button to add new port forward and enter this
Source Port: 5555
save the settings and mobile part is done.
- Connect your android to system and enter below command to allow tcpip on 5555 port for adb.
adb tcpip 5555
And you are done. Go wireless now and type adb devices on your system. you should see something like this.