I want to execute two commands in the same line on Android terminal emulator.

Example: the two commands svc wifi disable and `exit

I want to create a widget to disable the WLAN and out of the terminal emulator app at the same time, and in the terminal emulator app widget, I can only put one command.

widget entry

  • svc wifi disable && exit
    – GiantTree
    Commented Aug 9, 2016 at 18:33

2 Answers 2


If you want to execute each command only if the previous one succeeded, then combine them using the && operator:

Your code should be as follows:

svc wifi disable && exit

It will work only if your first command successfully execute.


Like Andrew correctly said, with && you can combine them but you also can just add more than one command by ending each command by a ";", e.g. put into the arguments field (leave empty the command field):

svc wifi disable; exit

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .