Debug your Flutter app on a real Android device over WiFi!

Yazeed AlKhalaf
3 min readJan 10, 2021
Photo by Niclas Illg on Unsplash

Well, I got this question in my mind about debugging my app over WiFi so I started by googling and found that not a lot of people care about it but for me it did. I had my Android phone with a poor USB-C cable that disconnected a lot and had me really upset. So it was like finding water after a week in the desert!

In this blog post, I will be guiding you on how to debug your Flutter app on your real Android device over WiFi.

Requirements:
- Android device
- Computer
- USB cable. one last time 🙈
- ADB, comes pre-installed with Android Studio, make sure it is in your PATH
- Developer mode on, so that you can use USB debugging!

Step 1
Now with that out of the way, connect your Android device to the computer and click allow if prompted for `Allow USB debugging?`

Click `Allow`, do it. I see you 🙈

Step 2
Fire up your terminal and start typing :
```bash
adb devices
```
You should see the following output:

Yup, I use Git Bash

Step 3:
Now run the following command:
```bash
adb tcpip 5555
```
You should see the following output:

Oh, that looks cool 😎

Step 4:
Now disconnect your Android device! AKA (Remove the USB cable) 🎉

Step 5:
Get you device’s IP address on the local WiFi network by going to:
`Settings > About Phone > Status > IP address`
P.S. you can find it in some phone directly in `About Phone` menu

Step 6:
Now run the following command replacing `<IP_ADDRESS>` with your phone’s IP address.
```bash
adb connect <IP_ADDRESS>:5555
```

HOORAY! 🎉

P.S. click allow if prompted for `Allow USB debugging?` on the Android phone.

Finally run `adb devices` to check that everything is ok!
You should see something similar to this:

My device is connected!

That’s it for this post. I hope you learned something new.

Don’t forget to share with your friends and colleagues to make their lives easier!

--

--