Today we are going to learn how to execute a Flutter application on our Android device remotely.
We open our console with the Flutter project and enter:
flutter devices
And the following appears:
Now let’s activate ADB using Wifi, for this we need our device to be connected to the same network as our PC and have debugging options enabled.
To do this, we run:
./adb tcpip 5555
*If you cannot execute it, you must navigate to the path of your adb:
cd C:\Users\YourUsername\AppData\Local\Android\Sdk\platform-tools
Replace YourUsername with your username.
Now we have to find the IP of our device, I search it directly from my router, but we can go to Settings > WIFI > Select our connection > Check the assigned IP.
We connect our device with a cable.
Now we run:
./adb connect DEVICE_IP:5555
Replace DEVICE_IP with your device’s IP.
Now we disconnect the device cable.
Now we can connect:
flutter devices flutter run
And it will start running.