Skip to content
Zackptg5 edited this page Sep 3, 2023 · 17 revisions

Welcome to the MMT Extended wiki!

What is MMT Extended?

MMT-Ex (Magisk Module Template Extended) is an android magisk template mod that allows you to create an installer that will properly place your files/scripts for magisk modules. So rather than stressing about installing your mod, you can focusing on actually developing it.

How do I make a MMT Extended mod?

  1. Add your mod info the module.prop. (See here for what each variable is)
  2. Comment or remove the updateJson line if you don't want to use magisk 24+ way of updating modules. Skip the below subsection if not using this
    2a. Modify update.json file to match module.prop and url of your zip and changelog
    2b. Don't forget to zip your module when completed and place at the zip url specified above
  3. Place your files in their respective directories in the system folder (where they'll be installed to). 3 exceptions to this:
    For apps: if the target device doesn't have a priv-app folder, all priv-app files will be installed to app instead
    For binaries: if target device doesn't have a xbin folder, all xbin files will be installer to bin instead
    For vendor: ALWAYS place in system/vendor (regardless of target device vendor partition - magisk mount takes care of this)
    For product and system_ext - same as vendor (system/product and system/system_ext respectively)
  4. Modify customize.sh for your mod (instructions for this are in the customize.sh file)
  5. Add post-fs-data.sh, service.sh, sepolicy.rule, and system.prop files in to the root of your installer as you would with any other magisk module (See here for documentation on post-fs-data vs service boot scripts) Proper syntax for props is same as magisk module template: prop.name=value 5a. Can add boot-completed.sh for KSU
  6. Add sepolicies to sepolicy.rule as listed here Syntax is the same as any magisk/supersu sepolicy statement. (See here for more details on sepolicy patching).
  7. Add any custom install logic to common/install.sh
  8. If not making a zygisk module, delete the zygisk folder and skip the below subsection. Otherwise:
    8a. Follow the directions here
  9. Add any addons you want from here - follow the instructions in each one
  10. You can remove any files/folders in common that you aren't using EXCEPT functions.sh - don't touch that one
  11. If you have something custom for uninstall (such as remounting a partition), put it at the top of uninstall.sh
  12. See 2b if using magisk 24+ updating module method
  • If you have files/folders that don't always get installed (such as device or rom specific stuff), common folder is the best place to put them
  • DO NOT MODIFY ANY OTHER FILES THAN THOSE MENTIONED ABOVE - So all of the files you need to modify are located in the root and common folder of the zip
  • Note that you can delete any of the above listed files in the common folder if you're not using them

Be sure to check out the variables and functions, they make your life easier:

Variables
Functions
Supported Partitions