flutter run -d <deviceId>
allows running the app on a specific device.
Emulators have device id as emulator-5554
, emulator-5556
and so on. Thus I can specify the emulator to use, using flutter run -d emulator-5554
When I connect two physical devices, a phone, and a tablet and run adb devices -l
I get
the same device id for both devices. Thus, Flutter cannot run on both devices simultaneously.
As you can see one is a phone LS 5020 and the other is a tablet P702 but the device id is the same. The same is found on both Windows 10 and Linux Mint 19.2
Is there a way to fix this using any other command to specify the device to use or somehow change the device id?
EDIT:
output of flutter devices
flutter devices
1 connected device:
0123456789ABCDEF • 0123456789ABCDEF • android-arm64 • Android 6.0 (API 23)
Also, flutter run -d all
runs the app on one of these devices
Output of flutter devices -v
[ +44 ms] executing: /home/droid/androidSdkUbuntu/platform-tools/adb devices -l
[ +13 ms] Exit code 0 from: /home/droid/androidSdkUbuntu/platform-tools/adb devices -l
[ ] List of devices attached
0123456789ABCDEF no permissions (user in plugdev group; are your udev rules wrong?); see [http://developer.android.com/tools/device.html] usb:1-3 transport_id:16
0123456789ABCDEF device usb:3-2 product:LS-5020 model:LS_5020 device:LS-5020 transport_id:12
[ +22 ms] 1 connected device:
[ +3 ms] /home/droid/androidSdkUbuntu/platform-tools/adb -s 0123456789ABCDEF shell getprop
[ +70 ms] ro.hardware = mt6735
[ ] ro.build.characteristics = default
[ +3 ms] 0123456789ABCDEF • 0123456789ABCDEF • android-arm64 • Android 6.0 (API 23)