Shell script to kill custom apps, run another app then restart killed apps? Is it possible to make a shell script that would run using Smanager, for example, to do the following:


Kill a list of custom apps loaded from a file
Run one custom app loaded from the same file
When that app is closed, restore killed apps


If that's not possible, then could it be split into two scripts, one that kills all the custom apps and launch one custom app, the other to restart the custom apps?

All of this is on a rooted phone.
Thanks.
You can use an Tasker to kill apps when you launch your game. And you are also able to do the opposite, when your game gets closed, Tasker can initialize other apps.
You may use the trial version to test this, but I believe that better results can only be achieved with root.

Tasker
Tasker by Crafty Apps available from Google Play Store (4,49€)
From their website you have a free 14-day trial download.