title: Running two application/script with a reboot in between without manual Intervention
body: <p>I have two c application running on android 
  say helloWorld and helloHell . I need to run both but with a reboot in between.
  I have adb pushed the applications to a folder in android file system and created two scripts : </p>
  
  <pre><code>helloworld.sh and helloHell.sh 
  
  inside helloworld.sh : 
   ./helloworld
    reboot
  
  inside helloHell.sh  : 
   ./helloHell
    reboot
  </code></pre>
  
  <p>I have written a shell script on the host PC like this : </p>
  
  <pre><code>hell-world.sh
  
  
  
  1-&gt;adb shell sh helloWorld.sh
  2-&gt;some calculated delay
  3-&gt;adb shell sh helloHell.sh
  </code></pre>
  
  <p>But the problem with this is after running first script (1->) the command hangs(may be due to reboot inside the helloworld.sh) and I have to manually do CTRL+C , and then manually run the second script(2->) once the reboot is over.
  I even tried killing after the first script execution(1->) by doing something like this </p>
  
  <pre><code>PID =$!
  kill -9 $PID
  </code></pre>
  
  <p>but invain,</p>
  
  <p>My aim is to run both the applications with a reboot in between with no user intervention in between.The problem here is after the reboot no new command after that will be executed and have to terminate it manually.</p>