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 :
helloworld.sh and helloHell.sh
inside helloworld.sh :
./helloworld
reboot
inside helloHell.sh :
./helloHell
reboot
I have written a shell script on the host PC like this :
hell-world.sh
1->adb shell sh helloWorld.sh
2->some calculated delay
3->adb shell sh helloHell.sh
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
PID =$!
kill -9 $PID
but invain,
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.