Skip to content
This repository has been archived by the owner on Oct 17, 2020. It is now read-only.
Zackptg5 edited this page Jan 12, 2019 · 19 revisions

Welcome to the Unity wiki!

What is Unity?

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

How do I make a Unity mod?

  1. Grab the latest build from the master branch of this repo
  2. 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
  3. Place your files in their respective directories in the system folder (where they'll be installed to). 2 exceptions to this: For apps: place in system/app/<APPNAME>/<APPNAME.apk> For vendor: ALWAYS place in system/vendor (regardless of target device vendor partition - unity takes care of this)
  4. 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)
  5. 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
  6. 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).
  7. Add any custom install logic to common/install.sh
  8. Add any custom uninstall logic to common/uninstall.sh
  9. 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

Due to the variance between devices and root solutions, there's quite a few functions and variables, some of which you can use for your mod:

Variables

Functions


Clone this wiki locally