This repository has been archived by the owner on Oct 17, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
Home
Zackptg5 edited this page Jan 17, 2019
·
19 revisions
Unity is an android template mod that allows you to create an installer that will properly place your files for any root solution, on any device. So rather than stressing about installing your mod, you can focusing on actually developing it.
Unity also uses bash rather than the older android shell to make your life even easier
- Grab the latest build from the master branch of this repo
- Add you mod info the module.prop. (See here for what each variable is). Note that minMagisk is 1530 for Unity - different from magisk module template/documentation
- Place your files in their respective directories in the system folder (where they'll be installed to). 2 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 vendor: ALWAYS place in
system/vendor
(regardless of target device vendor partition - unity takes care of this) - Modify config.sh for your mod (instructions for this are in the config.sh file) (See here for documentation on post-fs-data vs service boot scripts)
- Modify the post-fs-data.sh, service.sh, and system.prop files in common as you would with any other magisk module
Proper syntax for props is same as magisk module template:
prop.name=value
- Add sepolicies to common/sepolicy.sh in this format:
<Action> <source class> <target class> <permission class> { <permission1 permission2 permission3 etc.> }
Syntax is the same as any magisk/supersu sepolicy statement. Quotes around these sepolicy statements are optional (unity takes care of that). (See here for more details on sepolicy patching). - Add any custom install logic to common/install.sh
- Add any custom uninstall logic to common/uninstall.sh
- Add any unity addons you want - follow the instructions in each one. They can be found here
- 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