This post described how to switch on and switch off debugging via WiFi. Is there way to detect current status for this? I think I need to get current value of service.adb.tcp.port and check it on equals -1. But how to get this value?
Asked
Active
Viewed 8,431 times
1 Answers
2
To debug via wifi you need to connect your device(phone/ tablet) to the same network as your pc. Get the device's ip from the advanced menu in Settings -> WiFi. Then use this to connect to the device:
adb connect deviceip
Now, when you use adb devices
, you should see something like deviceip:5555 device
.
UPDATE: To truly answer your question: to get the value you are looking for just use this:
adb shell getprop service.adb.tcp.port

Gabriel Porumb
- 1,661
- 1
- 12
- 21