0

is there a way to run adb shell commands via windows?

I would like to run a batch script such as this

adb shell 
mount -o rw,remount /system
exit

Currently when i run the batch script it only runs the first command adb shell

Any other methods is fine also

1 Answer 1

1

The problem is that adb shell takes its input from stdin (e.g. the keyboard), so it won't see the subsequent commands. Instead, those will be run on your local machine as soon as adb exits.

adb shell takes a shell command as its argument, so you should be able to do:

adb shell "mount -o rw,remount /system"

The final exit is unnecessary in this case, because adb exits as soon as the command is finished.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.