If your phone is bricked or you need to downgrade, you can find stock ROMs on reputable third-party databases.