Connect phone by network in Android Studio to debug
Good afternoon, this time I present a very convenient way to debug our applications especially when we need to use the charging port of our cell phone either to charge or connect a device.
As a fundamental requirement we must have ABS installed of the Android SDK
- The first thing is to make sure that both our PC and cell phone are connected to the same network.
- Identify Route of our Android SDK. example:/Users/testing/Library/Android/sdk/platform-tools/adb
- Identify the IP of your cell phone
- Connect USB to PC
- Open a terminal
- Run: /Users/testing/Library/Android/sdk/platform-tools/adb tcpip 5555
- Run: /Users/testing/Library/Android/sdk/platform-tools/adb connect 192.168.104.8:5555
- Disconnect USB
If you managed to do all these steps when you start debugging, the device will appear and you can debug without having to connect your cell phone to your PC.
It is very important that the cell phone previously has the developer mode activated and allows cell access.
I hope it is useful