I'm trying to find a single line solution for entering a shell using ADB on an android device and going straight into a different directory.
Trying something like this
./adb shell cd /insert_dir_here
does not work.
Following adb shell
with a command, executes it remotely and returns to the hosts shell right after that.
so ./adb shell cd /insert_dir_here
does work, but the shell exits right away.
what kind of commands do you want to execute after changing the directory?
I suggest using the command alias
followed with your series of commands:
alias myADB="cd /to/path; command1 args; command2 args; etc...."
then execute your alias in your own shell "not the adb shell"
myADB
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With