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?

  • Are you asking about a command prompt, or about developing Python code under Android?
    – david6
    Nov 9, 2012 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, 2012 at 8:48
  • 4
    Did you try anything? Nov 10, 2012 at 7:06

3 Answers 3


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.

  • Bash shell scripts can be run from SL4A also. Sep 1, 2013 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 done.


To run python scripts on android download "QPython" / "Qpython3" app from google play store. To run PHP scripts don't use SL4A because you can only run php scripts but can't develop php sites,Instead download Server for PHP app from google playstore. Watch the below video to learn how to run php scripts on Server for PHP app : https://youtu.be/VG6IdIi7m8k

  • Welcome to Android Enthusiasts! This answer might be more helpful if you add a link to the apps you're recommending.
    – bmdixon
    Sep 2, 2016 at 8:17
  • 6 views to the video as of now! Seems more of a promotion than an answer.
    – Firelord
    Sep 2, 2016 at 11:19

You must log in to answer this question.

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