Absolute Beginners guide on flashing Custom ROMs (Generalised for all devices)
@MR_ROBOT12Pre-Requisites :
1.Unlocked Bootloader
2.Minimal ADB and Fastboot drivers
3.Device Drivers
4.Custom Recovery (TWRP/OrangeFox/PBRP/Batik)
5. Any Custom Rom
6. Gapps (if those are not included in the ROM)
NOTES:
--> Before Starting anything, make sure to backup your personal data (It’ll all be deleted)
--> At any point of time while you are in recovery mode, if your phone isn’t showing in your pc, just reboot back to recovery, not system.
--> In this process you need to backup Efs and Persist. Make sure to store those backups safely in pc / cloud as it’ll be more helpful than your files.
How to flash Custom Rom:
-> Install the USB Drivers.
-> Install Minimal ADB and Fastboot
-> First connect phone to pc and enable usb debugging(Settings>developer options>usb debugging).
-> Copy your custom recovery to minimal adb and fastboot folder (C:\Program Files (x86)\Minimal ADB and Fastboot).
-> Now, Run minimal adb and fastboot as administrator and type "adb reboot bootloader" command, then it should make your phone to boot into bootloader
-> Now type "fastboot flash recovery *enter the name of your recovery here*" and after it shows success, type "fastboot reboot recovery"
-> This should reboot to recovery.
-> Now, in twrp, allow modifications, then go to backup section, Select Efs and Persist and swipe to backup.
-> After backing up, copy those to your pc (you can see your files in pc at recovery mode too)
-> Hit back twice, go to wipe section, click on format (not advance wipe), then type “yes” and swipe to format.
-> If it shows any error, hit back twice and in reboot section select recovery, it should reboot your phone back to recovery.
-> Now try again to format, if it still shows error, repeat the same once again ( rebooting to recovery and format)
-> Now, it should format your phone.
-> Now go back and in wipe/Advance wipe, select System,Data,Cache,Dalvik and Vendor (May or may not exist, depends on your device) and swipe to wipe.
-> Now copy the Custom Rom to phone via pc.
-> Go to install section, select Your Custom Rom (flash gapps if nessasary) and swipe to install.
-> After installing click on reboot, It takes time to reboot so wait till reboot,
-> After booting, skip setting up Google account and check whether everything is working or not (check IMEI, Baseband)
(Baseband should be same as your stock ROM, if it isn't, try restoring EFS and Persist Backup)
-> Enjoy the custom Rom
Here are some extra tips:
When and how to clean flash:
Clean flash is mandatory when you change to next iteration of android (from stock to pie or pie or 10) or when your Rom maintainer/developer says so or when changing to different rom. To clean flash go to recovery and wipe System,data,cache,dalvik, then install rom
When and how to dirty flash:
Dirty flash can be done when you are changing to next version (not iteration) of the same Rom. It is done by wiping system,cache,dalvik (excluding data) in recovery and install Rom.
For example - You can dirty flash when your coming from let's say version 1.1 - 1.2 and so on
If you encounter any issues in dirty flash, make a clean flash.
Hope this guide helped you while flashing! Happy Flashing!