I\'m noticing a problem when running multiple adb commands from a shell script loop most of the commands does not execute.
This is an example script.
adb shell connects stdin to the command running on the device, which will generally consume stdin until a EOF is reached. So these commands consume all of the rest of your device names, causing the loop to exit.
Run adb with a stdin redirection, so they get an immediate EOF without messing with what you're trying to loop over:
serialno=$(adb