Skip to content
 
 

Repository files navigation

Morphe Module Builder

Build Morphe Desktop Morphe patches

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.

What it does

  • Downloads the current Morphe Desktop CLI and .mpp patch 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.

Quick start

Desktop

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

The 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 clean

The builder downloads Morphe Desktop and Morphe patches on the first run; no Morphe source checkout or Gradle build is required.

Termux

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

GitHub Actions

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.

Configure it

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

Then set options-file = "options/youtube.json" in the app table. See the Morphe Desktop CLI documentation for the current patch and option names.

Modules and signing

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.

Project layout

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

Credits

This project is GPL-3.0 licensed; see LICENSE.

About

Extensive ReVanced builder. Builds both modules and APKs. Updated daily.

Topics

Resources

Contributing

Stars

10 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages