I want to debug Android APPs on my phone (LG nexus 4). I'm travelling and I forgot my USB cable. When I work at home I can do it just connecting the USB cable and executing the command 'adb tcpip 5555'. Then I can unplug the USB cable and connect via 'adb connect IP'.
But now I cannot execute the first command because I don't have a cable. I don't understand why I have to do it every time, since I already execute the 'adb tcpip' command before.
What I tried now:
I installed a terminal application on my Android and tried to execute that command there, but I received a "device not found" error. Maybe he cannot see himself...
I search for any reasonable option in "Android Development Options" and enabled everything seemed to have relation with Wifi. But nothing helped.
I search StackOverflow, but all answers I found involving connect via USB cable before. Is there I way to do this connection without the need of a cable at all?
Some info: My Nexus 4 isn't rooted. The android version is 5.1.1.
Connect to a device over Wi-Fi (Android 10 and lower) Note: The instructions below do not apply to Wear devices running Android 10 (or lower). See the guide to debugging a Wear OS app for more information. adb usually communicates with the device over USB, but you can also use adb over Wi-Fi.
ADB is normally used on Android via a USB cable. But you can also set up and use ADB wirelessly.
The question is about a non rooted device but if it is rooted the simplest way would be to:
From the terminal on your phone, do this:
su setprop service.adb.tcp.port 5555 stop adbd start adbd
See this answer for full details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With