I hate wires. As simple as that. So if you are one among those people who do, follow this.
I use VSCode to debug my flutter apps. And lately, it has become too hectic with more and more wires coming up on the table. So here is what you do -
- Install adb platform tools. I have a Ubuntu 20.04 running hence I downloaded them from https://developer.android.com/studio/releases/platform-tools
- Add the adb file to your $PATH if you are on linux.
- Connect your device using a wire and run adb devices to see if it's detected.
- If not restart the adb by running adb kill-server and adb start-server.
- Remember to have USB Debugging on in your device.
- Run adb tcpip 5555. Your device will ask for permissions to connect.
- Once done, remove the USB.
- Connect your device to the same network as your machine.
- Find the IP address of your phone in the network. You can find it in "About Phone" usually.
- run adb connect "phone-ip":5555
- Done.
P.S. Throw away that wire.
Happy coding!
Top comments (2)
Flutter debugging wirelessly do help, but I have observed that there is lots and lots of lag in doing hot restart and hot reload. I do have a good connectivity but still I face this issue, is there any way to solve it.
I am trying the same, but with android 11 and his new way to connect throughout of the comand "adb pair". The device must be generate a code to connect are sussesfull and thats works, but when I want run the command "flutter run" not detect my device.
do you have any idea of I can makes works the adb wireless whit android 11 and his new way to connect?