#!/bin/sh set -e dir="${1:-.}" if [ ! -f module_installer.sh ]; then wget -c https://raw.githubusercontent.com/topjohnwu/Magisk/master/scripts/module_installer.sh fi mkdir -p "$dir/META-INF/com/google/android" cat module_installer.sh > "$dir/META-INF/com/google/android/update-binary" echo "#MAGISK" > "$dir/META-INF/com/google/android/updater-script" rm -f "$dir.zip" ( cd "$dir" ; zip -9r "../$dir.zip" . )