- Switch on developer mode on the phone
- Goto settings -> About phone -> clink multiple times on build number -> developer mode will be turned on
- Then switch on debug via Wifi
- Check the IP and port of the phone and note it down (it should be at Debug via the wi-fi button)
- In my case 192.168.1.17:37671
- Goto windows pc the following the location
- C:\Users\user-name\AppData\Local\Android\Sdk\platform-tools
- Open cmd, then use commands
C:\Users\gamit\AppData\Local\Android\Sdk\platform-tools>adb kill-serverC:\Users\gamit\AppData\Local\Android\Sdk\platform-tools>adb tcpip 37671error: no devices/emulators foundC:\Users\gamit\AppData\Local\Android\Sdk\platform-tools>adb connect 192.168.1.17:37451connected to 192.168.1.17:37671C:\Users\gamit\AppData\Local\Android\Sdk\platform-tools>
Then check the visual code, the phone should be connected automatically, then you are good to go
If wifi is diconnect later, then port ip has to recheck run above commands
use the following in a windows batch file, only edit ip and port when need to wifi debugging
open a text file and paste following
adb kill-server
adb tcpip 40504
adb connect 192.168.1.77:40504
save as .bat format
No comments:
Post a Comment