Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Since Android is Linux at its base, I logically think it should be possible to run a script on Android, like a Python script or PHP script (with executable bit obviously).

If not conventionally, is there any way to do so?

share|improve this question
Are you asking about a command prompt, or about developing Python code under Android? – david6 Nov 9 '12 at 8:11
Python and php are not the same as Linux. But regarding to your question, yes it is possible to run python and php in Android, though you do need to install them first since unlike many other Linux systems, they're not installed by default. – Lie Ryan Nov 9 '12 at 8:48
Did you try anything? – Matthew Read Nov 10 '12 at 7:06
up vote 10 down vote accepted

Python/PHP specific

If you are asking specifically for Python and PHP scripts, SL4A probably is your best choice (though there are other Python supporting apps in the playstore, like e.g. QPython Lite). And if you want to automate things, you might want to take a look at the SL4A Script Launcher (in connection with TaskBomb task scheduler) as well.

Shell Scripts

But talking about "Linux" and "scripts in general", the first coming to my mind are Shell Scripts. These can be run directly from the command line using any terminal emulator (e.g. Android Terminal Emulator, Terminal IDE) -- or, if you prefer some "graphical help", using specific launcher apps like SH Script Runner, ScriptMe, or Script Manager.

share|improve this answer
Bash shell scripts can be run from SL4A also. – Felipe Voloch Sep 1 '13 at 2:38

You want SL4A. From the website:

Scripting Layer for Android (SL4A) brings scripting languages to Android by allowing 
you to edit and execute scripts and interactive interpreters directly on the Android 
device. These scripts have access to many of the APIs available to full-fledged Android 
applications, but with a greatly simplified interface that makes it easy to get things 
share|improve this answer

Your Answer


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.