SHELL Command works fine as a standalone command, but fails when put into a shell script?
2
votes
1
answer
1208
views
Android 8.1 PIXEL 2 with root access.
I have seen this asked here once before but the only solution didn't help me at all. I am going to try and make this as simple as I can for the example.
If I run the following command in terminal emulator or adb shell:
am force-stop com.myapp.frustrated
It will quit the app just fine. But when I run it in this shell script:
#!/bin/sh
am force-stop com.myapp.frustrated
Nothing happens. It is odd to me that I can do many other commands just fine in a script, but a handful of them do not work.
Any suggestions you have are much appreciated.
Asked by Jason Waltz
(175 rep)
Feb 11, 2020, 11:05 PM
Last activity: Feb 11, 2020, 11:26 PM
Last activity: Feb 11, 2020, 11:26 PM