How to execute Python scripts in Android

First, you need to install QPython in your Android.
To access to your Android console, you can use SSHDroid (remote access) or Terminal Emulator (local access).

Python for Android depends from a lot bash scripts. You need use all of them to run it.
Now, you need add to your PATH (configurable in init.environ.rc), python executable.
Other option is create symbolic links of your apps to /system/bin, as follow:

mount -o rw,remount /system
cd /system/bin
ln -s /data/data/org.qpython.qpy/files/bin/ 
ln -s /data/data/org.qpython.qpy/files/bin/python-android5
ln -s /data/data/org.qpython.qpy/files/bin/
ln -s /data/data/org.qpython.qpy/files/bin/ python

Now you can run python on your console :)
To execute a python script without calls to python, you must write on the first line of your script this line:


To execute the script, give it execution permission throught the console:

chmod +x $

you can run the script throught your console as follow:


Popular posts from this blog

How to fix Android when developer options are not available for this user

from: can't read /var/mail/ in Python scripts

How to fix VirtualBox error when you try to import an ova file