So I can issue a shell command on my GalaxyS5 device using this:
$ adb shell run-as com.steenriver.littlecrane 'sh -c pwd'
/data/data/com.steenriver.littlecrane
$ adb shell run-as com.steenriver.littlecrane 'sh -c ls'
cache
files
lib
So far so good.
Now, if I want to supply an argument to the command, the shell will not see it:
$ adb shell run-as com.steenriver.littlecrane 'sh -c ls files'
cache
files
lib
I also tried starting a shell outright, and then type in commands in the terminal, but doing that just makes adb hang completely, and output nothing.
$ adb shell run-as com.steenriver.littlecrane
u0_a197@kwifi:/data/data/com.steenriver.littlecrane $ ls
<hangs>
How can I give an adb shell command with arguments?