Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

On Windows, I can run two commands using a .bat file. How can I achieve the same thing on Android

For example:

  1. update my podcasts by calling pcastclient /updateALL

  2. force sync of my pictures sugarsync /forceupdate

share|improve this question

2 Answers 2

up vote 11 down vote accepted

Android's shell will support a limited amount of Unix-style shell scripting. It specifically should have a shell at /system/bin/sh that you can use, however:

  1. The shell provided with Android has a severely restricted set of commands available to it. If you want to do anything even remotely complex you'll need a busybox install (or another shell).
  2. It's generally pretty rare for Android apps to provide any kind of command line interface or binaries. I very much doubt that Sugarsync, for example, allows you to perform a sync from the command line.

If you want a bit of a GUI you may want to look at something like GScript.

share|improve this answer

There are a few Android apps that are able to control other Android apps, and can chain several commands together using their GUI in a similar way to a script, they both have plugins to extend their support to many popular Android apps and functions.

Tasker and Locale are probably the most famous of these (see here for some comparison) but there are also other similar (free) apps that you could look at.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.