r1 - Custom ROM starter template - Huawei P9 EVA-L09 B136

paulobrien

Senior Member
Nov 6, 2003
5,279
7,314
0
Norwich
www.MoDaCo.com
Let's get some custom ROM tweaking going on for our P9s! :)

Ahead of my own MoDaCo Custom ROM for the P9, which is coming soon, 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! ;)

Preparation

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

Code:
touch /sdcard/exclude
echo app > /sdcard/exclude
echo priv-app >> /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:

Code:
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
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 P9.. more cool things coming soon! :)

Oh and the all important template file...


NOTE: You should not flash a template ROM onto a different version base ROM. You should always ensure you have a stock dload ROM to restore to if needed. Use at your own risk!

P
 

emilrune

Senior Member
Oct 13, 2009
152
36
0
@paulobrien what would it take to get a "pure" Android ROM running on the P9? Don't know if I'm being clear here - what I'd like is something like a Nexus experience, on the P9, Android cleanly and not this EMUI wackiness.
 

bnwg

Senior Member
Sep 2, 2010
423
62
48
I hope there will be development by some genius here from XDA for a custom ROM with stock camera implanted that the outstanding photo by co-engineering with Lecia with its certified lens can sustain.

If not it seems losing the purpose to own P9 that marketing itself with Lecia.

But it's just my two cents.
 
  • Like
Reactions: r0bb3r

najibs

Member
May 27, 2016
8
0
0
I have a Chinese EVA-D00. All the CHinese stuff on it is driving me nuts. WOuld this ROM work on it, or are they not interchangeable? Mine is a dual sim model. Thanks
 

r0bb3r

Member
May 27, 2016
10
1
0
Lund
I have a Chinese EVA-D00. All the CHinese stuff on it is driving me nuts. WOuld this ROM work on it, or are they not interchangeable? Mine is a dual sim model. Thanks
It didn't flash on my EVA-L10 (without root), but I'm guessing if you root your phone you would be able to flash the ROM, but no guarantees it will work, since it's a different hardware (single sim).
 

dkionline

Senior Member
Oct 15, 2012
2,449
1,810
193
i think theres not to much changes between this models. Only kernel DualSIM and NFC are the clues to run on both models. im a rom dev, but i didnt get my device yet. The actual pricedrop is now a hint to get it soon.
 

umair9001

Senior Member
Mar 21, 2010
276
87
28
Doha
www.facebook.com
EVA-L19

This is the first time i am trying to make a rom..I got a twrp backup of my phone (l-19) and renamed the boot.emmc.win to boot.img, replacing the boot.img in a zip. after following all the steps, i was able to get the final zip ready with the cust.tar.gz, system.apps.tar.gz and system.therest.tar.gz. After flashing it on my phone, it doesn't go past the boot screen..

when i was performing the steps, the mount step showed the usage of the command but i was able to generate the required files. attached screenshot.

any ideas what i am doing wrong.. :)
 
Last edited:

umair9001

Senior Member
Mar 21, 2010
276
87
28
Doha
www.facebook.com
through using the following commands, i got the required files again. this time the phone boots to the huawei logo and then it reboots and goes back to the e-recovery.

Code:
mount -o ro,remount,ro /system
mount -o ro,remount,ro /cust

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
mount /cust
tar -zcvpf /sdcard/cust.tar.gz /cust
 

andre1770

Member
Jun 21, 2016
46
1
0
22
Trento, TN
Guys, from where do I have to start to learn how to compile new custom ROM ? I'm seeing very young guys doing it (as Alberto97), compiling AOSP roms for some devices and I would like to start giving an hand to this community... thx
 
Last edited:

bahua78

Member
Jan 4, 2011
30
8
0
Denver, CO
@paulobrien what would it take to get a "pure" Android ROM running on the P9? Don't know if I'm being clear here - what I'd like is something like a Nexus experience, on the P9, Android cleanly and not this EMUI wackiness.
Yes, yes, yes, a thousand times, yes. The P9 needs an AOSP ROM that is 100% EMUI-free. I would use that in a heartbeat, and even give up some premium features(fingerprint and camera) to get it.

I would also love to learn how to build one myself.