No description
  • Python 79.8%
  • Shell 20.2%
Find a file
2026-06-22 17:42:40 +02:00
.gitignore Initial Termux image scripts 2026-06-18 13:49:48 +02:00
hex-input.py Add Termux installer and align hex output path 2026-06-18 13:55:11 +02:00
install.sh Rename installer script 2026-06-22 17:42:40 +02:00
README.md Rename installer script 2026-06-22 17:42:40 +02:00
son-input.py Initial Termux image scripts 2026-06-18 13:49:48 +02:00
termux-file-editor Update MegaGlitchaDroid launcher workflow 2026-06-18 14:16:20 +02:00

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-editor is the Termux launcher used by Android.
  • son-input.py applies 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.py dumps 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

  1. Install Termux from F-Droid.

  2. Install the Termux:API Android app from F-Droid.

  3. Clone this repository in Termux.

  4. 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.

  1. Install Termux from F-Droid.

  2. Install the Termux:API Android app from F-Droid.

  3. In Termux, install the required packages:

    pkg update
    pkg install python ffmpeg termux-api git
    
  4. Allow Termux to access shared storage:

    termux-setup-storage
    
  5. Create the scripts directory:

    mkdir -p /data/data/com.termux/files/home/storage/downloads/mgt-glitch-scripts
    
  6. 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
    
  7. 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"
    
  8. From Android, open an image with Edit/Open with, choose Termux, select the Python script to run, and wait for processing to finish.

  9. 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 *.py files 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-api package are installed.
  • Large images and videos can take a while because the scripts intentionally produce many generated files.