Run shell script in background process no matter what activity in foreground?
It worked by just doing sh /mnt/sdcard/touch.sh &amp; after having started a shell with adb shell. Then, when I closed the terminal forcibly while the process was in the background, the process remained running in the background of my phone as expected. I was able to kill the process later by getting with adb shell the using ps to find the process ID and kill -s KILL &lt;ID&gt; to kill it.

Basically, turns out I didn't have to make an Android app just to make my script run in the background. Clash on...