Skip to content
Zackptg5 edited this page Jan 17, 2020 · 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. 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)
  3. Modify customize.sh for your mod (instructions for this are in the customize.sh file)
  4. 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
  5. Add sepolicies to sepolicy.rule in this format EXACTLY (NO QUOTES): <Action> <source class> <target class> <permission class> { <permission1 permission2 permission3 etc.> } Syntax is the same as any magisk/supersu sepolicy statement. (See here for more details on sepolicy patching).
  6. Add any custom install logic to common/install.sh
  7. Add any addons you want from here - follow the instructions in each one
  8. You can remove any files/folders in common that you aren't using EXCEPT functions.sh - don't touch that one
  9. If you have something custom for uninstall (such as remounting a partition), put it at the top of uninstall.sh
  • If you have files/folders that don't always get installed (such as device or rom secific 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


Clone this wiki locally