user2499424
user2499424

Reputation: 21

Android Debug Bridge adb shell

I want to know whether it is possible to run /system/bin/sh android shell commands remotely from windows by writing a batch file or any other way.

when I write a batch file it's not executing any commands after "adb shell" (the control is shifting to /system/bin/sh and I cannot run any commands from here)

what I need is to know if there is a way to give commands to this shell running on my android device without typing them manually ?

Upvotes: 2

Views: 549

Answers (1)

David Ruhmann
David Ruhmann

Reputation: 11367

Simple example of sending the following lines to the input buffer for adb shell to process.

@echo off
(
  echo ls
  echo cd sdcard
  echo ls
  echo exit
) | adb shell

Upvotes: 1

Related Questions