
Before we begin, make sure you have TWRP recovery installed
If you have a rooted Android device,use Quick Boot app to reboot into recovery.
If you don’t have a rooted phone or maybe you are stuck in bootloop, manually boot into your recovery.
(for Samsung Galaxy devices, power off the phone and hold down Volume Up + Center Home + Power for 5 seconds, for HTC/Nexus devices, power off the phone and hold down Volume Down + Power buttons then select recovery). If you have another device,try googling on how to enter recovery mode.
Step 3. Once in TWRP recovery,choose “Wipe”.
Choose “Advanced Wipe”.
Select Dalvik Cache, System, Data and Cache then swipe to wipe. By wiping the system partition here, we will make sure our file structure is perfectly clean before installing a new ROM.

Step 4. Choose “Install” from main menu.
Choose “Storage”.
Choose the storage you have your ROM zip files in. Here you can choose internal storage, micro SDcard.
Browse your file system and find the ROM zip file. In this example, I am installing CM12 ROM so I will be choosing the ROM zip file below beginning with “cm-12″.
Swipe to install ROM.
If you are installing an AOSP ROM like CM12 like I am doing here,repeat this step and also install the Gapps zip file. Otherwise go to next step.
Step 5. Reboot and you should see your new ROM boot up.
ADS HERE !!!