How can one rename a connectd device in Flutter run command?

138 Views Asked by At

In Flutter one can check available connected devices using flutter devices. When running one can do flutter run -d <device-name>. It turns out some devices have very long names, with numbers and letters combined. Is there a way to rename a connected device just for the current session?

1

There are 1 best solutions below

0
Kaushik Chandru On

There are few ways you can achieve this

  1. Execute flutter run and it will display all devices in a numbered list. So all you have to do is enter a number and hit enter again

  2. If your device is iohone xd45rchdjb...gjcf You can execute flutter run -d iphone6.. you can ignore the ID part. Also you can pass only the ID and not pass the name. That will also work