title: adb "error device not found" when trying to use 'adb shell' but "adb devices" detects the device
body: <p>Guys basically I've plugged in a bunch of Android devices to a computer and each of them has <code>adb</code> enabled. I'm running a shell script to push certain files to the devices using the Device Serial Numbers stored in a text file. When I trigger the script the first time it works. if i trigger it again <code>adb</code> throws an error , <code>"error device not found"</code> though the devices are still detected using <code>adb</code>. If i close the terminal and reopen it and run the script it works fine. I plan to eventually automate the script running. How can i stop this from happening.</p>
  
  <p>EDIT: This is the piece of code where the adb shell commands are triggered</p>
  
  <pre><code>cat device_serial | while read line
  do
  adb -s $line shell
  cd /data/
  ls
  exit
  adb -s $line root
  adb -s $line push 'stestfile.txt ' /data/
  echo "done"
  done
  </code></pre>