A configurable APK and Magisk/KernelSU module builder powered by Morphe Desktop and the official Morphe patches. It is the command-line and CI companion to Morphe Manager: use Manager for an interactive on-device workflow, or use this repository when you want repeatable builds, patch selections, multiple architectures, and release automation.
This project patches software that you provide. Only modify and install APKs when you have the right to do so. Keep an untouched original APK for rollback, and follow the license and terms of every app and patch source.
- Downloads the current Morphe Desktop CLI and
.mpppatch bundles from GitHub releases, with support for pinned or development versions. - Uses the same patch bundle format and patch names exposed by Morphe Manager.
- Downloads original APKs from APKMirror, Uptodown, or an Internet Archive mirror; APKMirror APKM split bundles are merged before module packaging.
- Produces a standalone patched APK, a Magisk/KernelSU mount module, or both.
- Supports app-specific patch selections, exclusive mode, Morphe options JSON, bytecode modes, native-library trimming, source signature verification, and ARM/x86 architecture choices.
- Works locally, in GitHub Actions, and on Android through Termux.
- Keeps generated artifacts, patching reports, and cached releases out of Git.
Requirements: Bash, jq, wget, zip, unzip, and Java 21 or newer.
git clone https://github.com/iamsmmh/morphe-module-builder
cd morphe-module-builder
./build.shThe default config.toml builds YouTube, YouTube Music, and
Reddit in APK and module modes. Outputs are placed in build/.
Build another configuration:
./build.sh config-community.toml
./build.sh cleanThe builder downloads Morphe Desktop and Morphe patches on the first run; no Morphe source checkout or Gradle build is required.
Install Termux from a trusted source, then run:
bash <(curl -fsSL https://raw.githubusercontent.com/iamsmmh/morphe-module-builder/main/build-termux.sh)Termux installs Java 21 and the small native helpers, opens the configuration
for editing, and copies artifacts to
/sdcard/Download/morphe-module-builder/.
Use Actions → Build Morphe modules → Run workflow for a manual build, or let the scheduled check build when a configured Morphe patch release changes. The workflow publishes successful APKs and modules as a GitHub release.
No private signing key is committed to this repository. For stable CI updates,
add a repository secret named MORPHE_KEYSTORE_B64 containing the base64-
encoded keystore. Optional secrets MORPHE_KEYSTORE_PASSWORD,
MORPHE_KEYSTORE_ALIAS, MORPHE_KEYSTORE_ENTRY_PASSWORD, and MORPHE_SIGNER
override the signing settings without exposing them in the configuration. A
key exported from Morphe Manager is preferred when builds from both tools must
update each other.
Edit config.toml. All app tables are optional and can be
turned off with enabled = false. The complete reference is in
CONFIG.md.
A minimal custom app looks like this:
[My-App]
enabled = true
app-name = "My App"
patches-source = "owner/my-morphe-patches"
patches-version = "latest"
apkmirror-dlurl = "https://www.apkmirror.com/apk/example/app"
build-mode = "apk"
version = "auto"
included-patches = "'Remove ads' 'Custom branding'"Morphe patch options can be made reproducible with an options file generated by Morphe Desktop:
java -jar morphe-desktop-1.14.0-all.jar options-create \
--patches patches-1.41.0.mpp --out options/youtube.jsonThen set options-file = "options/youtube.json" in the app table. See the
Morphe Desktop CLI documentation
for the current patch and option names.
The generated module mounts the patched base.apk over the installed package
and leaves the app's data intact. It supports Magisk and KernelSU installation.
For a module to work with an app that is not already installed, leave
include-stock = true so the matching original APK is bundled and installed
first. If the app is a system app or its version does not match, the installer
prints the exact recovery step instead of silently overwriting it.
Morphe Desktop signs APK outputs. To share signatures with Morphe Manager,
export the Manager keystore and provide it through MORPHE_KEYSTORE; do not
publish your personal key. Reflash a module after changing the original app or
patch version.
build.sh build APKs/modules from TOML
utils.sh Morphe downloads, source adapters, and packaging
config.toml official Morphe source defaults
config-community.toml disabled examples for community Morphe sources
CONFIG.md configuration reference
morphe-module/ Magisk/KernelSU module template
source-signatures.txt optional source APK certificate pins
- Morphe Manager and Morphe Desktop for the patching engine and user workflows.
- Morphe patches and other Morphe-compatible patch authors.
- APKEditor for split APK merging.
- cmpr for module update checks.
This project is GPL-3.0 licensed; see LICENSE.