How to run commands as root in Connectbot?
The su binary works just like it does on Linux; it runs all commands that follow as root until you type exit (or terminate the process, etc.). sudo &lt;command&gt; essentially does:

su
&lt;command&gt;
exit


Android doesn't normally include sudo, so If you wish to launch commands like you would with sudo, the syntax is as follows:

su -c "[command_1;command_2;...;command_N]"


For example, to get a list of installed packages in "root" mode, you can either do 

$ su
# pm list packages
# ........ &lt;listing of packages scrolls down&gt; ......
# exit


or

$ su -c "pm list packages;exit"