Many people are having problems with this when you do a Factory Wipe or flash a new rom, after you flash or wipe it will come up with "fail" or "cust fail".
It all comes down to a partition called "/cust"
this dictates what software to install and what theme to use for the "ZONE" of your phone.
I.E my phone is/was a Vodafone AU phone (sim unlocked now).
Now, when you do a recovery/wipe data it looks for information in the /cust partition regarding your phone.
If it's not there then "Cust fail" will appear when you do a wipe.
This has been happening to me for quite some time now, I've tried all types of roms...... but failed every time until now.
This is what I did. (This may only work with my phone but it will give many many many people that information to rectify this problem)
1, unlock your bootloader (you should know how to do this already)
2, flash custom recovery in fastboot mode (again, know how to do this)
3, reboot into recovery and install SuperSU
4, Reboot, and install RootExplorer
5, in RootExplorer mount as R/W then head over to /cust using RootExplorer
6, make a directory in /cust as /cust/vha <----- This was important as vha is Vodafone Hutchinson Australia on my phone
7, copy /cust/hw/au to /cust/vha this will give me /cust/vha/au
8, reboot back into fastboot mode and flash original recovery
9, reboot into recovery and do a wipe...... NO MORE CUST FAIL!!!!!!
10, reboot!!!!! all done..... my god it's taken me weeks to figure this out.
Hope this help.
:laugh::good: