[Tutorial] Build Your Personal Magisk ROM

Search This thread

chas123

Senior Member
Oct 29, 2008
733
1,099
Figured some adventurous soul might have fun with this.....


Anyone who follows our thread in the development section of this forum probably has figured out that I am a huge fan of @topjohnwu and Magisk.
Our team maintains a Magisk ROM there. So I decided that I would try to show anyone interested how to make their own personal Magisk ROM that they can flash over the stock ROM provided by ZTE.


I'm not big on disclaimers. You flashed a custom recovery, Right?
This may or may not work on LOS based ROMs. I am an audiophile from way back, and I'm not gonna flash and test any of it until someone says," sound is fixed 100% " Not, "I can kinda get by w/ this or that".
It's why I bought the phone.



Attached to this post you will find two templates. ROM.zip, and badboyz.zip (I'm feeling lazy, didn't feel like messing w/ the updater script). Download them both, and unzip onto your desktop. Most of the editing will be done in the badboyz.zip. We will deal with that first. Here is what the file structure should look like:


Screenshot_2017_03_06_19_50_26.png




In the first folder, \common, there is a file named post-fs-data.sh. This is where you put your build.prop edits. I have left two examples to demonstrate proper syntax. Note that:
Code:
persist.adb.notify=0
As it would normally appear in build.prop becomes
Code:
persist.adb.notify 0

Feel free delete the demonstrative entries when you are finished with your edits.


You also will find a \system folder. If you have an app you would like to add to your ROM as a system app, or a system app that you have edited, i.e. SystemUI or Settings this is the place. Magisk will overlay the apk included in the stock ROM. You can also add edited files to /etc, /media, etc. just make sure to maintain the proper file stucture

Next we move on to the config file:


Screenshot_2017_03_06_20_07_40.png


1) Call it what you want w/ no spaces (you'll need this later)
2) Call it what you want- This prints out on the twrp screen when flashing the module
3) This is where you debloat. I left two examples in the template (as seen in the ss). Anything you don't want to run, show up in the drawer,or on all applications, list it here keeping the proper folder structure.

Again, these entries can be deleted. They are there for demonstrative purposes.

The module.prop file is pretty self explanatory (tbd= to be determined)

Screenshot_2017_03_06_20_19_12.png


Do notice that the module id matches the one from the config file........(where I said you'll need this later)
You can change both of these. Just make them match.
The rest- you can put your mom's facebook page, donation link for the red cross- whatever you want

So all that is left is to zip all those files up, and your ROM module is done.

Now let's make a flashable. That Rom.zip that you decompressed-

Inside there is a data folder. Leave the Magisk.apk and the PHH su apk there. You will need those. Anything else you have that you want to add throw it in there. Teeter.apk, Netflix whatever.
Then put your rom module (should be named badboyz.zip) into the magisk folder w/ the magisk.zip.

Now zip the whole shabang up and flash it over a bone stock ROM w/ a stock kernel.

Please follow THIS guy and donate what you can. Android will be a better place w/ him
 

Attachments

  • ROM.zip
    10.7 MB · Views: 469
  • badboyz.zip
    7.3 KB · Views: 339
Last edited:

H0lmEd

Senior Member
Jan 30, 2015
64
52
Is there a working nougat kernel for a2017G knocking around which patches for Safety net? The ones i found only worked with A2017U, so WiFi and a few other things don't work
 

piet8stevens

Senior Member
Jun 15, 2009
791
270
Lanaken

Top Liked Posts

  • There are no posts matching your filters.
  • 13
    Figured some adventurous soul might have fun with this.....


    Anyone who follows our thread in the development section of this forum probably has figured out that I am a huge fan of @topjohnwu and Magisk.
    Our team maintains a Magisk ROM there. So I decided that I would try to show anyone interested how to make their own personal Magisk ROM that they can flash over the stock ROM provided by ZTE.


    I'm not big on disclaimers. You flashed a custom recovery, Right?
    This may or may not work on LOS based ROMs. I am an audiophile from way back, and I'm not gonna flash and test any of it until someone says," sound is fixed 100% " Not, "I can kinda get by w/ this or that".
    It's why I bought the phone.



    Attached to this post you will find two templates. ROM.zip, and badboyz.zip (I'm feeling lazy, didn't feel like messing w/ the updater script). Download them both, and unzip onto your desktop. Most of the editing will be done in the badboyz.zip. We will deal with that first. Here is what the file structure should look like:


    Screenshot_2017_03_06_19_50_26.png




    In the first folder, \common, there is a file named post-fs-data.sh. This is where you put your build.prop edits. I have left two examples to demonstrate proper syntax. Note that:
    Code:
    persist.adb.notify=0
    As it would normally appear in build.prop becomes
    Code:
    persist.adb.notify 0

    Feel free delete the demonstrative entries when you are finished with your edits.


    You also will find a \system folder. If you have an app you would like to add to your ROM as a system app, or a system app that you have edited, i.e. SystemUI or Settings this is the place. Magisk will overlay the apk included in the stock ROM. You can also add edited files to /etc, /media, etc. just make sure to maintain the proper file stucture

    Next we move on to the config file:


    Screenshot_2017_03_06_20_07_40.png


    1) Call it what you want w/ no spaces (you'll need this later)
    2) Call it what you want- This prints out on the twrp screen when flashing the module
    3) This is where you debloat. I left two examples in the template (as seen in the ss). Anything you don't want to run, show up in the drawer,or on all applications, list it here keeping the proper folder structure.

    Again, these entries can be deleted. They are there for demonstrative purposes.

    The module.prop file is pretty self explanatory (tbd= to be determined)

    Screenshot_2017_03_06_20_19_12.png


    Do notice that the module id matches the one from the config file........(where I said you'll need this later)
    You can change both of these. Just make them match.
    The rest- you can put your mom's facebook page, donation link for the red cross- whatever you want

    So all that is left is to zip all those files up, and your ROM module is done.

    Now let's make a flashable. That Rom.zip that you decompressed-

    Inside there is a data folder. Leave the Magisk.apk and the PHH su apk there. You will need those. Anything else you have that you want to add throw it in there. Teeter.apk, Netflix whatever.
    Then put your rom module (should be named badboyz.zip) into the magisk folder w/ the magisk.zip.

    Now zip the whole shabang up and flash it over a bone stock ROM w/ a stock kernel.

    Please follow THIS guy and donate what you can. Android will be a better place w/ him