I am working on an app so need to connect to the device through wireless pairing. I frequently put the device in flight mode and this turns off the wireless option as desired. But when I switch off the flight mode, the wireless debugging option remains disabled. What's more, after manually enabling the wireless debugging, the IP port gets changed so I have to connect via
adb connect and give the new IP port address every time.
Is there any way to make the device automatically enable the wireless option after the flight mode is deactivated (if it was enabled previously)? Or at least to force the device to use the same port number every time?