I want to type multiple adb shell commands in one line,
for example, i want to type adb shell
and su
and cd sys
together. i tried to connect them with &&
and &
bzw.adb shell && su && cd sys
,
but it seems like not work with adb commands, but works with windows commands.
does anybody knows what is the problem?
Asked
Active
Viewed 4,626 times
2

user3789645
- 91
- 1
- 5
-
which os you are using – Simmant Jun 30 '14 at 09:28
-
This question appears to be off-topic because it belongs to http://unix.stackexchange.com/ – Paresh Mayani Jun 30 '14 at 09:40
-
@simmant my OS is Win 7 – user3789645 Jun 30 '14 at 10:21
-
@PareshMayani sorry, i will change the tags – user3789645 Jun 30 '14 at 10:22
1 Answers
6
Sovled by myself adb shell "su -c 'cd sys'"

user3789645
- 91
- 1
- 5
-
1How about inserting an argument, ie $2, into the command executed inside the shell. For instance cd $2. How can I do that? – JohnyTex Apr 18 '16 at 12:36
-