What's up? I hope you are well by the grace of Allah. Alhamdulillah, I'm also fine.
I've been thinking for a long time to post a thread about Recovery flashing. So want to post a thread about, "How to flash MIUI or others ROM from custom recovery".
So, before flashing you should know about the risk of recovery flashing.
✒ Warning: This thread is only for A partition. I haven't any experience with A and B partition. Before downloading custom or official rom check rom code name and the device code name is the same or not. Don't flash another device rom. Now many devices have an anti-rollback so be careful. Do anything at your own risk and before flashing backup you all data. After flashing custom recovery your data will be encrypted then you need to wipe your internal storage or data. Also, your device warranty can be void.
● Unlock Bootloader
● Custom Recovery
● Recovery ROM
● Migisk (If you need root)
● GApps (without MIUI and pre include custom ROM)
❒ First, unlock your device bootloader. For unlocking follow this tutorial. Must backup your all data before unlocking. Your device warranty can be void. If you are trying to unlock your device first time then you must wait 3-15 days.
❒ Now install custom recovery on your device. Tutorial: Here
❒ Download official or custom ROM for your device.
✓ MIUI ROM
✓ XTRV Aroma
✓ Masik ROM
✓ Mi ROOM
✓ MIUI Premium
✓ MIUI Pro
✓ Mi Globe
✓ MIUI EU
✓ Arrow OS
✓ Superior OS
✓ Syberia OS
✓ Havoc OS
✓ Revenge OS
✓ Resurrection Remix OS
✓ Crdroid OS
✓ Viper OS
✓ Bootleggers OS
✓ Candy ROM
✓ POSP OS
✓ Bliss ROM
✓ Lineage OS
❒ Now download Magisk 20.0/or more update stable version zip.
❒ The last item is the GApps. If you want to flash official MIUI ROM or MIUI based custom rom, then you don't need GApps. Some custom rom also have pre-installed GApps (Ex: Pixel Experience). "GApps" is an unofficial package distributed in several forms and places containing Google applications and frameworks. You don't have to install GAPPS, but many users may wish to do so to access the Google Play store and some applications that depend on Google Play services. Smartphone functions such as calling, SMS messages, internet, Wi-Fi and Bluetooth work without GApps.
Q.1) From where I can download GApps?
A.1) You can download GApps from here.
Q.2) Which platform I can choose?
A.2) Most of the devices released from 2016 to now are support ARM64. So this is a popular platform. Choose Platform - ARM64.
Q.3) Which android version I can choose?
A.3) Just check which android version is on your downloaded rom. Example: Pie - 9.0.
Q.4) Which variant I can choose?
A.4) You can choose any variant. But the opinion is Nano or Pico is the best.
● Flashing Tutorial ●
❒ Put all the files on your device internal storage (Ex: ROM, Magisk, GApps, etc). If you want to switch MIUI to stock android rom, like Pixel Experience, Lineage OS, Viper OS, etc. Then sometimes you need to wipe your device internal storage. Because after rebooting your device it wants a password. So, for MIUI to Stock rom use Pen Drive or SD Card and backup your all data on PC/G Drive/Mega/SD Card/ Pen Drive.
❒ Now turn off your device power. Then press the power and volume up (+) button at the same time. Now you can see your device booted into the recovery mode.
❒ Go to Wipe→Advanced Wipe. Now you can see many options like Dalvik, Cache, Data, System, Vendor, Cust, Internal Storage, USB OTG, MicroSD, etc. Now select all items from here without MicroSD, USB OTG and Internal Storage (optional). Now swipe the pointer to Wipe.
❒ Now press the home button and go to install. You can select MicroSD/USB OTG/Internal Storage from here. For this click on select storage option. Also, you can image files from here for this just enable image mode.
❒ You can flash all files at the same time or one by one. But my opinion is one by one. Because sometimes it is not working. It skipped some files. So first select your device rom and swipe to install. After installing successfully then click on the home button then go to the install. Now install GApps (for stock rom without Pixel Experience). After installing GApps then install Magisk.
❒ After installing everything successfully reboot your device. When your device rebooted successfully then set up your device. Then check everything. If you don't find Magisk manager then download from here and install.
In order to fulfill the basic functions of our service, the user hereby agrees to allow Xiaomi to collect, process and use personal information which shall include but not be limited to written threads, pictures, comments, replies in the Mi Community, and relevant data types listed in Xiaomi's Private Policy. By selecting "Agree", you agree to Xiaomi's Private Policy and Content Policy .