Today I found an easy solution for this issue.
adb devices -l
You’ll get list of devices with their qualifiers
List of devices attached
P753A12D device usb:26200000 transport_id:1
P753A12D device usb:24400000 transport_id:2
Then you can use qualifiers instead of serial numbers like this
adb -s usb:26200000 install xxx.apk
or with transport_id
and -t
adb -t 1 install xxx.apk