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:
fastboot
The most common way is to use the -s flag directly in the command:
-s
fastboot -s tcp:IP:PORT devices
or
fastboot -s tcp:192.168.1.100:5555 flash boot.img
ANDROID_SERIAL
You can also set the ANDROID_SERIAL environment variable to specify the target device. This works for both USB and TCP/IP connections:
export ANDROID_SERIAL=tcp:192.168.1.100:5555 fastboot devices
ANDROID_SERIAL=tcp:192.168.1.100:5555 fastboot flash boot.img
This avoids repeating -s tcp:IP:PORT in every command.
-s tcp:IP:PORT
adb
If your device is already connected via adb over TCP/IP, you can use:
adb 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
fastboot -s tcp:IP:PORT ...
export ANDROID_SERIAL=tcp:IP:PORT
adb connect IP:PORT
Note: The ANDROID_SERIAL environment variable is the closest alternative to the -s flag and is widely supported.
This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.
Vibe can make mistakes. Check answers. Learn more