I have a .bat
script with some adb
commands that I want to run on a Mac. So I changed the extension to .sh
and changed the mode so it's executable.
Every line works fine when I enter them in the macOS terminal, but when I run the .sh
file errors would occur.
For example:
adb shell "echo 1 > xxxxx"
Results in:
Permission denied can't create xxxx: No such file or directory
When I try to push some file in the same directory as the script, it shows the status of the transmission like:
13.2 MB/s (525534 bytes in 0.038s)
but then followed by:
No such file or directory
adb shell
adb shell
in the terminal with no problem. :) When I change the script to.sh
, looks likeadb shell
works fine too. Butadb shell "echo 1 > xxx"
does not work :(adb shell "echo test > /data/data/test.txt"
su
worked.