forked from topjohnwu/Magisk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Magisk Documentations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Magisk Procedures</title> | ||
<meta charset="utf-8"/> | ||
</head> | ||
<body><div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="{"highlight":"#0000ff","nav":true,"resize":true,"toolbar":"zoom layers lightbox","edit":"_blank","xml":"<mxfile userAgent=\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36\" version=\"7.0.9\" editor=\"www.draw.io\" type=\"google\"><diagram name=\"Page-1\" id=\"74e2e168-ea6b-b213-b513-2b3c1d86103e\">7V1bk6M2Fv41ruo8tAtx5zHdM5NkK5PMpieVzb6kaFu22cHgYDzdnV+/EkgYXcAyRoC7px9mbNnIIH3n6NzPzLrfPv+QhbvNx3QJ45lpLJ9n1ruZaQLH8dB/eOSlHPEDvxxYZ9GyHDKOAw/RP5BcSUcP0RLuyVg5lKdpnEc7dnCRJglc5MxYmGXpE/u1VRovmYFduIbCwMMijMXRP6JlviGjwA2OH/wIo/WG/LRvkgd+DBdf1ll6SMjvzUxrVfyVH29DOhd50P0mXKZPtSH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dMzu8T4lPmd/4VFc+5XQ8UgU+pSk1U+BTunMKzP76Vr/uLuWm5c2D2p/HleXo2rT8xLymA5iPh6uoaJpXX77gCstqSLqQdzVWu7bBQIdLsNJU4UDIkdFeZ8M0+yhx8AZY2ElEdM0NbZ93TBbWR8K7gIzmQsaTR4AdBNzedI0X4meygTXgvvYhvL+mffVpuN/F+8rP1N++ordF1Hft60gH3XxMlxB/4/8=</diagram></mxfile>"}"></div> | ||
<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
## Magisk Module Template Intro | ||
The **Magisk Module Template** is hosted **[here](https://github.com/topjohnwu/magisk-module-template)**. | ||
|
||
The template is created to be simple to use that anyone can create their own modules easily. The template itself contains minimal scripting for installation; most of the functions are located [here](https://github.com/topjohnwu/Magisk/blob/master/scripts/util_functions.sh), which will be installed along with Magisk, and can be upgraded through a Magisk upgrade instead of a template update. | ||
|
||
The template can cover most modules' needs: you can add files into `system`, which will be cloned into `/system` by Magisk after installing the module. In addition to module files, `system.prop`, `post-fs-data.sh`, `service.sh` are also installable through this template. | ||
|
||
## Template Structure | ||
Here are some files you would want to know: | ||
|
||
- `config.sh`: A simple script used as a configuration file for the actual installation file to correctly install you module. Here is the place you can select which features your module needs/disables. | ||
- `module.prop`: This file contains your module's indentity and properties, including name and versions etc.. This file will be used to identify your module on an actual device and in the [Magisk Modules Repo](https://github.com/Magisk-Modules-Repo) | ||
- `common/post-fs-data.sh`: Module specific script to run in post-fs-data mode | ||
- `common/service.sh`: Module specific script to run in late_start service mode | ||
- `common/system.prop`: This prop file will be loaded into Android's system props | ||
- `META-INF/com/google/android/update-binary`: The actual installation script. Modify this file for advanced custom behavior | ||
|
||
## Create a Magisk Module With The Template | ||
1. Clone / download [this repo](https://github.com/topjohnwu/magisk-module-template) | ||
1. Open `config.sh` and carefully read the fully documented file. Follow the instructions within the script | ||
1. You should at least modified `config.sh` and `module.prop` | ||
1. Directly zip your files, and the result zip file is a flashable zip for both Magisk Manager and custom recoveries | ||
1. Please check **Notes** for precautions | ||
|
||
## Submit Your Module to Magisk Modules Repo | ||
If you want to share your module with others, you can submit your modules to [Magisk Modules Repo](https://github.com/Magisk-Modules-Repo). In order to submit a module, you will need to know how to use some basic `git`. | ||
|
||
1. Create a module as stated above, and test if it works properly | ||
1. Fork [this repo](https://github.com/topjohnwu/magisk-module-template) to your account | ||
1. Commit and push your changes to your forked repo | ||
1. Open an issue in [topjohnwu/Magisk_Repo_Central](https://github.com/topjohnwu/Magisk_Repo_Central/issues/new) with your repo link | ||
1. I will review your module, and once accepted, your repo should be cloned into [Magisk-Modules-Repo](https://github.com/Magisk-Modules-Repo), and you should receive an email to become the collaborator so you can edit the repo in the future. | ||
|
||
#### Once your module is live on the Modules Repo, the description of your repo should be the ID of your module. Please do NOT change the description, repeat, do NOT change the description. | ||
|
||
## Notes | ||
- The Module Template depends on external scripts installed by Magisk, so it each version of template will has its own minimal Magisk version requirement. | ||
- **Windows users please aware!!** The line endings on all text files should be the **Unix format**. Please use advanced text editors like Sublime, Atom, Notepad++ etc., **NEVER** use Windows Notepad. | ||
- In `module.prop`, `version` can be an arbitrary string, so any fancy version name (e.g. ultra-beta-v1.1.1.1) is allowed. However, `versionCode` **MUST** be an integer. The value is used for version comparison. | ||
- Make sure your module ID **doesn't contain any spaces**. | ||
|
||
#### For Repo Developers | ||
|
||
- Magisk Manager monitors all repo's `master` branch. Any changes to the branch `master` will be reflected to all users immediately. If you are working on an update for a module, please work on another branch, make sure it works, then finally merge the changes back to `master`. | ||
- Once you finished upgrading your repo, bump up at least the `versionCode` in `module.prop`, so Magisk Manager will know you module is updated! | ||
- The description of your repo should be the same as your module ID. If you changed your description, Magisk Manager will fail to identify your repo, and cannot relate installed module to the online repo together. |