Home - Zackptg5/MMT-Extended GitHub Wiki
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.
- Add your mod info the module.prop. (See here for what each variable is)
- 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 - 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 insystem/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) - Modify customize.sh for your mod (instructions for this are in the customize.sh file)
- 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 - 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).
- Add any custom install logic to common/install.sh
- If not making a zygisk module, delete the zygisk folder and skip the below subsection. Otherwise:
8a. Follow the directions here - Add any addons you want from here - follow the instructions in each one
- You can remove any files/folders in common that you aren't using EXCEPT functions.sh - don't touch that one
- If you have something custom for uninstall (such as remounting a partition), put it at the top of uninstall.sh
- 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
Variables
Functions
Supported Partitions