- Python 79.8%
- Shell 20.2%
| .gitignore | ||
| hex-input.py | ||
| install.sh | ||
| README.md | ||
| son-input.py | ||
| termux-file-editor | ||
MegaGlitchaDroid
MegaGlitchaDroid is an Android/Termux launcher workflow for running scripts that
are part of MegaGlitchATron. It
does not perform the glitching itself; Android hands an image to Termux through
the edit/open-with flow, and termux-file-editor lets you choose one of the
installed MegaGlitchATron-related Python scripts to process it.
Scripts
termux-file-editoris the Termux launcher used by Android.son-input.pyapplies the sonification-style ffmpeg effects to the provided image and writes results to:/data/data/com.termux/files/home/storage/downloads/output/YYYY-MM-DD/<input-name>/hex-input.pydumps the provided image/video to BMP frames, applies the selected byte replacement, converts the frames to PNG, and writes results to a timestamped folder at:/data/data/com.termux/files/home/storage/downloads/output/YYYY-MM-DD/<input-name>/<YYYYMMDD-HHMMSS>-frames/
Generated PNGs are scanned with termux-media-scan when Termux:API is installed,
so Android gallery and file picker apps can see them without a manual refresh.
The scan is best-effort; processing still succeeds if the command is unavailable.
Quick Install After Git Clone
-
Install Termux from F-Droid.
-
Install the Termux:API Android app from F-Droid.
-
Clone this repository in Termux.
-
From the cloned repository, run:
chmod +x install.sh ./install.sh
The installer installs the required Termux packages, runs storage setup when
needed, creates the Downloads/mgt-glitch-scripts directory, copies the launcher
and Python scripts, and copies the launcher file to
$HOME/bin/termux-file-editor.
Manual Android Deployment
Use these steps if you do not want to run the installer.
-
Install Termux from F-Droid.
-
Install the Termux:API Android app from F-Droid.
-
In Termux, install the required packages:
pkg update pkg install python ffmpeg termux-api git -
Allow Termux to access shared storage:
termux-setup-storage -
Create the scripts directory:
mkdir -p /data/data/com.termux/files/home/storage/downloads/mgt-glitch-scripts -
Copy these project files into that directory:
cp termux-file-editor *.py /data/data/com.termux/files/home/storage/downloads/mgt-glitch-scripts/ chmod +x /data/data/com.termux/files/home/storage/downloads/mgt-glitch-scripts/termux-file-editor -
Install the launcher:
mkdir -p "$HOME/bin" rm -f "$HOME/bin/termux-file-editor" cp /data/data/com.termux/files/home/storage/downloads/mgt-glitch-scripts/termux-file-editor "$HOME/bin/termux-file-editor" chmod +x "$HOME/bin/termux-file-editor" -
From Android, open an image with Edit/Open with, choose Termux, select the Python script to run, and wait for processing to finish.
-
Check the output location:
son-input.py:Downloads/output/YYYY-MM-DD/<input-name>/hex-input.py:Downloads/output/YYYY-MM-DD/<input-name>/<YYYYMMDD-HHMMSS>-frames/
Notes
- The launcher intentionally lists all
*.pyfiles in/data/data/com.termux/files/home/storage/downloads/mgt-glitch-scripts. - If Android does not show new files immediately, confirm both the Termux:API app
and the
termux-apipackage are installed. - Large images and videos can take a while because the scripts intentionally produce many generated files.