-
Notifications
You must be signed in to change notification settings - Fork 125
Home
Han edited this page Jun 24, 2020
·
17 revisions
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)
- 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) - 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
- 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). - Add any custom install logic to common/install.sh
- 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
- 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