I want to connect my adb to real-time android, not to emulator but it gives an error: "cannot connect to 192.168.10.4:5555: No connection could be made because the target machine actively refused it. (10061)" I tried this command: adb connect
-
1Does this answer your question? [Android Studio wireless ADB error (10061)](https://stackoverflow.com/questions/37267335/android-studio-wireless-adb-error-10061) – Zain Apr 24 '20 at 05:07
-
Did you run this command `adb -s
tcpip 5555` before adb connect? – Rajen Raiyarela Apr 24 '20 at 05:11 -
1**TL;DR:** Google actively and deliberately made this not possible. You will not find a solution below. **The only correct answer is to not buy any product over which you don’t have full control.** As such devices are crimes that are strangely still “legal”. Prevent such organized crime (Yes, organized crime. I has to be said.), and buy one of the many phones where the bootloader is not locked. E.g. a Fairpone. – Evi1M4chine Jan 13 '22 at 06:29
4 Answers
In latest updates of Android Studio, you can easily pair your device wirelessly
Go to Device Manager > Physical > Pair using Wi-Fi
Then go to your phone's settings Developer options > Wireless debugging > Pair using QR code
Your phone will be connected to Android Studio after scanning the QR code
Note: this feature works on Android 11+ devices
Old Devices
Make sure your phone and laptop are connected to the same router
connect your phone to your laptop with usb cable
open a terminal window
adb devicesshell response should be something like this:
List of devices attached E1MGAP2810904770 deviceadb tcpip 5556adb connect 192.168.1.47:5556shell response should be something like this:
connected to 192.168.1.47:5556
change the 192.168.1.47 with your local IP address.
you can find your phone's IP Address in Settings -> Status ...
- 315
- 1
- 12
-
12Yes, I tried the above commands. But the problem is that I want to connect my android to ADB without cable and also want to gain root access through terminal. I couldn't achieve this target. I made sure that my Laptop and Android are connected to the same wifi network. – Tour Rich Apr 25 '20 at 06:04
-
1first of all you have to use cable, then, after connecting throw wireless you can unplug your phone and work wireless – ASHKARAN Apr 25 '20 at 21:03
It is possible starting with Android 11. On the phone click Pair device with pairing code, then on the dev machine do the following:
cd myandroidsdk/platform-tools
adb pair ipaddr:port
Take ipaddr and port from your phone. The terminal will then prompt you to put in the pairing code.
https://developer.android.com/studio/command-line/adb#connect-to-a-device-over-wi-fi-android-11+
- 1,050
- 11
- 26
Please follow the below link to get the detailed answer :
https://developer.android.com/studio/run/device
And one more think , don't connect your mobile with charger while connecting the android studio to mobile without usb cable.
- 25
- 8
Connect to DNS Server IPv4 address instead of just IPv4 address. Check in your wireless properties.
- 5
- 2