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 4, 2020 · 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.

How do I make a Unity mod?

  1. Grab the latest build from the master branch of this repo: git clone https://github.com/Zackptg5/Unity
  2. Add you mod info the module.prop. (See here for what each variable is). Note that Unity is no compatible with magisk versions older than 19
  3. 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 - unity takes care of this)
  4. Modify customize.sh for your mod (instructions for this are in the customize.sh file)
  5. Modify the post-fs-data.sh, service.sh, and system.prop files in common 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
  6. Add sepolicies to common/sepolicy.rule 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/unity_install.sh
  8. Add any custom uninstall logic to common/unity_uninstall.sh
  9. Remove any unity addons you don't want into common/addons and modify any you want to keep - follow the instructions in each one
  • 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

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