Usually, we root our Android smartphone just to get out of the existing and old UI. However, rooting phones can void the warranty and can cause harm to your smartphone. But you have to go back to the old Android UI, in case if you are selling the smartphone for a good price.
While the factory reset doesn't bring back the old Stock Android UI, you have to flash the ROM once again to get it back. Flashing the ROM is one of the safest ways to get back into the stock Android environment.
But, before, you have a big pain of backing up everything including your photos, files, and videos. Today, we have compiled a way on how to get back the rooted phone back to Android.
Step 1: Find the ROM you want to flash on your mobile first. You can get by visiting XDA Forum for you mobile. In the case of Stock Android, you will get it at the top itself.
Step 2: Download the ROM into your computer and copy it to your phone in a separate folder, where you can make it out easily during the booting process. It is recommended, not put the ROM in a subfolder.
Step 3: Now boot into recovery mode by pressing Volume Up and Power button for some time.
Step 4: Once entered the mode, select 'Wipe' option to reset your phone.
Step 5: From the recovery mode, navigate to the folder, where you have copied the Android ROM.
Step 6: Now tap on it to install the ROM. Once done, reboot the device and you're done.