Author: SK Sahil (@Sahil-Pixel
Co-authors:
- Kartavya Shukla (@Novfensec)
- psychowasp (@psychowasp)
IDEKivyAndroid is a custom Python IDE for Android built with Kivy that executes Python scripts using an isolated native Python interpreter. It features:
- A graphical interface for viewing output
- Embedded Python interpreter (
mini_python) compiled as a native executable - Support for Pythonβs
multiprocessingmodule on Android - Full integration of Python's standard library and native modules (e.g.
math,sqlite3)
This makes it ideal for Python education, quick script testing, and multiprocessing demonstrations directly on Android devices
- β Kivy GUI with text-based output viewer
- β Embedded and user-defined script execution
- β
Native
mini_pythonELF binary linked withlibpython3.11.so - β
Support for
multiprocessingusingProcess - β
Dynamic extraction of
stdlib.zipfrom assets - β
Environment setup using Java's
ProcessBuilder - β
Custom
Recipeforpython-for-android
- App UI is built with Kivy (
main.py) and embeds a script (SCRIPT_CODE). - Python script is written to a file (
script.py) at runtime. - mini_python, a native ELF executable, is invoked via
ProcessBuilder. - The Python environment (
PYTHONPATH,LD_LIBRARY_PATH, etc.) is configured dynamically. - Standard library is unzipped if needed (
stdlib.zip) to support modules. - Script output and errors are displayed in the Kivy interface.
- Python 3.11
python-for-androidbuildozer- Android NDK (via
buildozer)
- p4a.local_recipes = ./recipes
- requirements = python3,kivy,minipython
- buildozer android debug
Here's what the app looks like on Android:
