Yes, Benjamin. When using fastboot with a device connected over TCP/IP, you can specify the serial number (or TCP/IP address) in a few ways:
The most common way is to use the -s flag directly in the command:
bashfastboot -s tcp:IP:PORT devices
or
bashfastboot -s tcp:192.168.1.100:5555 flash boot.img
ANDROID_SERIALYou can also set the ANDROID_SERIAL environment variable to specify the target device. This works for both USB and TCP/IP connections:
bashexport ANDROID_SERIAL=tcp:192.168.1.100:5555 fastboot devices
or
bashANDROID_SERIAL=tcp:192.168.1.100:5555 fastboot flash boot.img
This avoids repeating -s tcp:IP:PORT in every command.
adb for TCP/IP ModeIf your device is already connected via adb over TCP/IP, you can use:
bashadb tcpip 5555 adb connect 192.168.1.100:5555 fastboot -s tcp:192.168.1.100:5555 ...
But this is more about adb than fastboot.
Some custom ROM tools or scripts may allow you to set a default serial in a config file, but this is not a standard feature of fastboot itself.
Summary Table
-s flagfastboot -s tcp:IP:PORT ...ANDROID_SERIALexport ANDROID_SERIAL=tcp:IP:PORTadb TCP/IPadb connect IP:PORTNote: The ANDROID_SERIAL environment variable is the closest alternative to the -s flag and is widely supported.
Vibe can make mistakes. Check answers. Learn more