When using Flutter, I can't connect my Android phone to ADB with WiFi. All commands, like "adb devices", and "adb connect 192.168.1.1:5555" print errors. How to resolve this?
-
so with that you can install the app without the cable? does it require root on the device? – Feu Mar 09 '19 at 11:41
-
1@Feu yes, and you don't need root. You can start ADB-over-network on your phone by connecting it with usb and typing "adb tcpip 5555", you can find more details here: https://stackoverflow.com/questions/2604727/how-can-i-connect-to-android-with-adb-over-tcp/44460975 That should be pretty straightforward in normal apps, but Flutter complicates that a little bit, and I found the solution below. – TheLastGimbus Mar 09 '19 at 14:49
-
1First connect your device with the cable, adb tcpip 5555 & adb connect IP then disconnect the cable. It is working for me – Shyju M Mar 09 '19 at 15:46
12 Answers
Only Three Steps to follow:
- Connect via USB: adb tcpip 5555.
- Disconnect USB, Get Phone Ip Address Settings > About Phone > Status.
- Now adb connect 192.168.0.100

- 878
- 1
- 7
- 5
-
You know? We can Also make things Done with Hotspot Too, its not necessary to use Wifi – Pro Co May 29 '21 at 22:00
-
1you should go to Settings > About Phone > Status and look up for IP address and then run `adb connect **Your IP Address**` – ABDERRAHMANE OUALI Sep 17 '21 at 17:35
-
I had faced a similar issue myself when I first set up flutter..
I could easily connect my android phone using adb over wifi and debugging native code in android studio worked flawlessly..... using---
$ adb connect <device-ip>:5555
however when I ran "flutter devices" ... or "flutter run" .. the existing devices connected wirelessly using adb automatically got disconnected...
I received the following error in adb when I tried to connect adb during a flutter debug session -
ADB server did not ACK
Full server startup log: /tmp/adb.1000.log
Server had pid: 27779
--- adb starting (pid 27779) ---
adb I 07-29 02:24:57 27779 27779 main.cpp:57] Android Debug Bridge version 1.0.39
adb I 07-29 02:24:57 27779 27779 main.cpp:57] Version 1:8.1.0+r23-5~18.04
adb I 07-29 02:24:57 27779 27779 main.cpp:57] Installed as /usr/bin/adb
adb I 07-29 02:24:57 27779 27779 main.cpp:57]
adb I 07-29 02:24:57 27779 27779 adb_auth_host.cpp:416] adb_auth_init...
adb I 07-29 02:24:57 27779 27779 adb_auth_host.cpp:174] read_key_file '/home/<user>/.android/adbkey'...
adb I 07-29 02:24:57 27779 27779 adb_auth_host.cpp:391] adb_auth_inotify_init...
adb server killed by remote request
On digging a little into forums and blog posts... i identified the issue here..
It seemed that Android Studio had downloaded and maintained its own copy of adb under the Android/ directory and ... incidentally flutter was using using that instead of the system provided binary ( /usr/bin/adb in linux ) ..
So flutter was killing the default adb server before starting its own adb .... and preventing other the system binary to run during a debug session.
Once this issue is identified ... fixing it is simple. I just symlinked the <android-platform-tools dir>/adb to /usr/bin/adb and everything worked fine....
alternately we could just delete one of the two binaries and change the required environment variables to achieve the same goal.

- 359
- 2
- 5
-
WIFI ADB ULTIMATE (suggested by another answer ) also works on android studio as it uses the adb binary provided by android studio and thus there are no conflicts. – space_mill Jul 28 '20 at 21:19
-
This seems like the answer I need. Could you dumb it down even more for a unix noob? How do you make the sym lynk and how do you change the system environment variable? – EduardKieser Nov 06 '21 at 13:01
-
$ mv /usr/bin/adb
............................ $ ln -sf – space_mill Nov 15 '21 at 11:15/usr/bin/adb -
You can find the ip of your device after clicking on wireless debugging, got stuck there for a bit – Ziku Sep 05 '22 at 13:03
I am using visual studio for flutter app development and Xiaomi K20 pro as my device
- Enable Developers options on your mobile
- Enable wireless debugging option inside developers options
- Install
adb
for your respective OS (Mac/Windows/Linux).
for Mac: https://stackoverflow.com/a/32314718 - Make sure your PC and mobile are on the same Wifi network
- Check your mobile's IP address in About phone > Status (Or if you are using Xiaomi device, you can directly see it on Wireless debugging page when you enable it)
- Run adb connect <IP Address from step 5> Eg:
adb connect 192.168.0.103
.
Note: For Xiaomi mobile, you need to add the port number as well in the end, that was being shown on enable wireless debug page eg:adb connect 192.168.0.103:43431

- 1,035
- 14
- 10
It looks like Flutter is "reserving" ADB for itself, and won't let you use it, forcing to use "flutter devices". Luckly,I've found plugin for Android Studio that somehow bypasses that.
- Install "WIFI ADB ULTIMATE" plugin for Android Studio.
- Restart Android Studio, but don't open any Flutter project yet.
- Start ADB WiFi server on your phone as usual. But don't "adb connect 192.168.1.1:5555" yet.
- Open your Flutter project in Android Studio, and the "Android" part of your project on second window (open main Java/Kotlin file, and click on link that should pop up at the top).
- Open WIFI ADB ULTIMATE tab (it should be on the right), type in your device IP, and click green button.
- You should now see your device in "flutter devices", or at the expandable list on the right form the "run" button in your Flutter project in Android Studio.
Hope that helped someone ;)

- 581
- 1
- 6
- 13
-
4I skipped all of this and did what this comment said, and it worked: https://stackoverflow.com/questions/2604727/how-can-i-connect-to-android-with-adb-over-tcp/44460975#comment45408200_2604727 – temirbek Aug 26 '19 at 12:05
- Press
shift + command + .
to make visible the hidden Library. - Now click
Go -> Library -> Android -> sdk
. - Right Click on the
platform-tools
, then clickNew Terminal Tab at Folder
. - Type
./adb devices
in the terminal to show all the connected devices. - then type your device IP address you want to connect
./adb connect 192.168.XXX.XXX
.

- 838
- 8
- 13
1 - Make sure you have adb installed.
2 - For the first time, you need to connect your device to the PC with USB Cable.
3 - In your mobile, Go to Settings > About Phone > Find the IP Address there.
4. Now in your command prompt, run this command.
adb tcpip 5555
- Now run this command
adb connect 192.168.137.112

- 174
- 1
- 9
Checklist:
- Make sure that wireless debugging is enabled on your device.
- Most answers and tutorials assume the port is 5555 but it could be something else. Check on the wireless debugging settings page of your device.
- Run the
adb connect
command with the decive connected via USB. Once the TCP connection is made, you can disconnect the cable.

- 2,776
- 1
- 25
- 34
In my case I just set the Use existing manually managed server on Debugger Android Studio's Settings. Just make sure your adb server
is running on port 5038
, if not, change it accordingly.
If you don't want to change the adb
settings on Android Studio, you can use the adb
that come with it, normally you'll find it on platform-tools
directory and you can create a symbolic link.
There is an example if you're on Ubuntu:
$ sudo apt remove adb
$ sudo ln -s /home/user/android-sdk/platform-tools/adb /usr/local/bin/
$ adb --version
Android Debug Bridge version 1.0.41
Version 31.0.2-7242960
Installed as /home/user/android-sdk/platform-tools/adb
Next you just need to follow these steps to pair your device (if you have Android version 11+).

- 739
- 9
- 12
-
1I recently re-installed my OS and that's what I did - *not* install adb with apt, and just use one included in platform-tools – TheLastGimbus Jun 13 '21 at 13:01
Flutter in Android Studio with WifiADB Solution:
My WorkAround Solution:
1:If there is an emulator already running:Stop the Emulator. 2:If you already have wifi adb installed,Uninstall Wifi Adb and restart Android Studio-(Invalidate Caches/Restart).
3:Install WifiAdb.
4:Connect your device to your machine(USB and then start wifi adb (Make sure Developer mode is already configured on your physical device)
5: Run app(To your device)..without disconnecting the USB cable.Once the app installs on your device successfully,Disconnect the USB cable. With Wifi ADB connection to your device, you should now be able to hot reload via wifi without a problem.

- 2,536
- 25
- 30
Flutter in Android Studio 2023
Android Phone:
- Developer Settings
- Wireless debugging
- Activate
- Pair device with pairing code
Android Studio:
- Menu => Tools => Device Manager
- Physical Tab
- Click on Pair Using Wi-FI (see Screenshot)
- Pair using paring code Tab
- Choose your phone
- Enter pairing code from phone

- 11
- 3
It's really so easy on VScode following this step:
- Install
adb
for linux users:$ sudo apt install adb
- install the extension by searching for "Android ADB WLAN" on VScode
- follow the instruction on the extension and if everything goes well, with
flutter devices
you should see the connected device with their IP address.
link to extension.

- 326
- 4
- 12
There are several steps you need to follow:
Make sure adb path is entered in your environment path. For if you are having an error as:
adb is not recognized as an internal or external command.
You need to configure it firstC:\Users<YOUR PC USER NAME>\AppData\Local\Android\Sdk\platform-tools
Add this path to your environment variable.
Make sure your PC and mobile device are connected to the same network.
Connect your mobile phone to your PC through the wire.
Type adb tcpip 5555
Type adb connect 'Your mobile device IP address' e.g(192.168.0.222). You can find it in your phone about section.
Now you can remove your data cable.
Generally if you don't have stable internet then it will take long time to run your flutter app.

- 41
- 5