Jump to content

r4 - Custom ROM starter template - Honor 5X KIW-L21 B330

Guest PaulOBrien

Recommended Posts

Guest PaulOBrien

As well as my own MoDaCo Custom ROM for the 5X, I've created a custom ROM starter template for anyone who wants to have a go. It's a bit different.

Basically, this ROM template will let you create your own custom ROM VERY easily. Easier than ever before. All you have to do is...

  • download my ROM template zip
  • make the changes to the system of your phone just as you'd like them for your custom ROM
  • run some commands on your device via ADB
  • add the resulting files to the template zip

That's it! No messaging around with install scripts, no rebuilding anything complex, just mod - and go! ;-)


ONLY if you are completing the process for the first time, you need to set up a file on your microSD card - so launch an ADB shell and type the following commands...

touch /sdcard/exclude
echo app > /sdcard/exclude
echo priv-app >> /sdcard/exclude
echo delapp >> /sdcard/exclude

ROM build

Once you have your system up and running how you want it, and you're ready to distribute it (just the system and cust dirs mind, it won't pull the data dir, so your personal data is safe), reboot to recovery, launch an ADB shell and type the following commands:

mount /system
tar -X /sdcard/exclude -zcvpf /sdcard/system.therest.tar.gz /system/
tar -zcvpf /sdcard/system.apps.tar.gz /system/app /system/priv-app /system/delapp
mount /cust
tar -zcvpf /sdcard/cust.tar.gz /cust

You'll then end up with 3 new files on your SD card - system.apps.tar.gz (which is apps and priv-apps from system), system.therest.tar.gz (which, as the name suggests, is the rest of the system partition!) and cust.tar.gz with is the cust partition contents.

Update the template zip with these 3 files and that's it. It's ready to distribute for people to flash via TWRP! If you have updated the boot image, you'll need to replace that too, the easiest way is to do a TWRP backup then pull that file from the SD card and drop it into the template zip as boot.img. That's really it!

I hope this inspires a few people to start playing around with custom ROMs for the 5X... more cool things coming soon! :)

Oh and the all important template file...


Link to comment
Share on other sites

Guest PaulOBrien



  • Updated to B370


  • Updated to format partitions rather than delete


  • Updated to include /cust partition support


  • Initial release
Link to comment
Share on other sites

Guest PaulOBrien

I think it's going to be worth integrating /cust into this too, as they are a lot of things pulled from there (such as the build.prop changes). It'll be simple enough though. :)

re: non KIW-L21 devices, creating a template for other models shouldn't be any issue at all. I'm getting a US spec Honor 5X, so that'll be helpful.


Link to comment
Share on other sites

  • 3 months later...
Guest wolfsstolz

Hello, realy thanks for that but i have make it with Huawei Mate S and it dont work. Please can you make or tell me how i can make a META-INF Folder for my Mate S ?! I never found a custom rom for this phone and it will help many peoples when i can make a flash rom for that. Many peoples have a Hard Brick or other problems. Thanks for help.


Error message is:

e:error executing updater binary in zip `/external_sd/rom.zip

Edited by wolfsstolz
Link to comment
Share on other sites

Guest mamalooblue


Im a persian member.i have a problem.i formating anythings from recovery and wipe all option.now idnt no my bild number.please help me.

sorry cant speaking english goodly.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.