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 4, 2020
·
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.
- Grab the latest build from the master branch of this repo:
git clone https://github.com/Zackptg5/Unity
- 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
- 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 - unity takes care of this) - Modify customize.sh for your mod (instructions for this are in the customize.sh file)
- 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
- 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). - Add any custom install logic to common/unity_install.sh
- Add any custom uninstall logic to common/unity_uninstall.sh
- 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