Are these steps correct to flash custom rom in 2020? - Xiaomi Redmi Note 5 Pro Questions & Answers

-use miunlock to unlock bootloader
-put phone on fastboot mode
-type 'fastboot flash antirbpass dummy.img'
-type 'fastboot flash recovery twrp-3.3.1-0-whyred.img'
-type 'fastboot reboot'
-reboot to recovery using phone
-copy gapps & custom rom to phone
-wipe system, data, dalvik, cache
-flash rom
-flash gapps
-reboot
I am currently on MIUI Global 9.5.19.0 with locked bootloader.
Is this method correct? I dont know which guide is outdated right now and which is not. Sorry if this is asked too many times.

Yes this is correct but i want to make some changes in your guide
1. Use orange fox recovery as it is better than twrp and it won't give u any error which u may encounter using twrp.
2. U can use fastboot boot *recovery* to push recovery file and flash its zip after entering recovery (it doesn't need any kind of dummy file flash)
3. Wiping vendor is also there
Thank you

oh ok so basically these are the edited steps to follow now:
-use miunlock to unlock bootloader
-put phone on fastboot mode
-boot twrp using 'fastboot boot XYZ.img'
-flash orange fox zip from twrp
-reboot to orange fox recovery from twrp
-wipe system, data, dalvik, cache, vendor
-flash latest firmware
-flash custom rom
-flash gapps
-flash magisk
-reboot
correct?
thanks a lot btw!

? correct and u can use 9.4.25 firmware as it is best (atleast for me)

Should I follow the same procedure if my phone is on 11.0.3.0?

scarednewbie said:
Should I follow the same procedure if my phone is on 11.0.3.0?
Click to expand...
Click to collapse
Now most of the customs support the new pie firmware.
1. Unlock bootloader.
2. Reboot to bootloader
3. Boot to orangefox recovery using
fastboot boot recoveryname.img
4. Copy the orangefoxrecovery.img(extract the orangefox zip) to device storage using the booted orangefox in step 3.
5. Flash orangefox permanently from the copied img file using the booted recovery.
4. If you are planning to use miui don't reboot without flashing magisk. It may reset the recovery to default miui recovery.
6. Enjoy flashing custom roms after wiping(not formating) system, data, cache, vendor etc. No need to format data if you need file ssystem encryption. Formating data from recovery will remove encryption.

niyas90 said:
Now most of the customs support the new pie firmware.
1. Unlock bootloader.
2. Reboot to bootloader
3. Boot to orangefox recovery using
fastboot boot recoveryname.img
4. Copy the orangefoxrecovery.img(extract the orangefox zip) to device storage using the booted orangefox in step 3.
5. Flash orangefox permanently from the copied img file using the booted recovery.
4. If you are planning to use miui don't reboot without flashing magisk. It may reset the recovery to default miui recovery.
6. Enjoy flashing custom roms after wiping(not formating) system, data, cache, vendor etc. No need to format data if you need file ssystem encryption. Formating data from recovery will remove encryption.
Click to expand...
Click to collapse
Orange fox recovery has aggressive stock recovery deactivation so magisk is not necessary

Related

[Guide] Flashing Treble images and going back to EMUI

Index
Booting fastboot
-- Software way via Android Debug Bridge
Connect your phone to your computer and issue command:
Code:
adb reboot bootloader
-- Hardware way via bootloader function
Hold volume down button. Connect the USB-C cable.
Flashing images
Issue commands while on fastboot:
For recovery images (ex. eRecovery, TWRP):
Code:
fastboot flash recovery_ramdisk [I]recoveryimage.img[/I]
For system images (ex. EMUI 8, Pixel Experience):
Code:
fastboot flash system [I]systemimage.img[/I]
Booting recovery
-- Software way via Android Debug Bridge
Connect your phone to your computer and issue command:
Code:
adb reboot recovery_ramdisk
-- Hardware way via bootloader function
Hold volume up button while the phone is booting. Make sure cable isn't plugged in.
Backup EMUI data partition
This is important as without this, you won't be able to go back to EMUI.
Flash kilroystyx's TWRP via fastboot
Boot to recovery
Backup data partition (Backup > Tick Data, Swipe to backup)
Copy the backup to your computer after the backup finishes
(from the TWRP folder on the root of internal storage)
Installing a Treble based ROM
Flash stock recovery via fastboot
Wipe data and cache via eRecovery
Flash the ROM image to system via fastboot
Reboot to system
Going back to EMUI
• Via the backup you have done
Flash EMUI system
Flash stock recovery
Boot to recovery
Touch Wipe data/factory reset
Touch Wipe cache partition
Touch Reboot to system
Without letting it boot to system, boot to fastboot
Flash kilroystyx's TWRP
Reboot to system, let it boot completely
Reboot to recovery
Copy backed up EMUI data to internal storage
Start restoring
Reboot to system
• Via full stock firmware files
Copy FOTA and UDF to the root of your external SD card
FOTA: Full OTA (update.zip) / UDF: Data Update (update_data_full.zip)
Flash KingOfMezi's TWRP
Reboot to recovery
Wipe Dalvik, cache, system, data, internal storage
Flash FOTA and UDP respectively
Flash stock recovery via fastboot
Touch Wipe data/factory reset
Touch Wipe cache partition
Touch Reboot to system
If you have modified ramdisk or kernel flash the stock images of them as well.
You can download kilroystyx's TWRP, here.
You can find more information about going back to stock via firmware files and download KingOfMezi's TWRP, here.
After you boot up a custom system, you will not be able to boot kilroystyx's or KingOfMezi' TWRP.
If you need TWRP at that moment, use dil3mm4's Treble TWRP.
This TWRP cannot manage your data and files. You can use ADB, or use your external SD card to flash files.
Stock firmware files are here. All you need are system, recovery_ramdisk and ramdisk images.
Extract the UPDATE.APP from the ZIP file. You can extract the partition images by Huawei Update Extractor.
If you have any other questions, feel free to join our group. You can ask anything without hesitation.
If i follow your guideline, when i revert back to EMUI, TWRP cannot mount system.
It's weird cause i did flash a lot of treble roms and went back to stock several times before but not with your method.
Every time i go back to stock i got a different problem to troubleshoot due to encryption i think.
The best way i found:
Going back to EMUI
Wipe data and cache via stock recovery
Flash stock system image via fast boot
Let the system boot to the setup wizard
Flash Pretoriano80's TWRP via fastboot
Restore the backup
Wipe Dalvik and Cache
Letzen said:
You can download Pretoriano80's TWRP image here.
After you boot up a custom system, you will not be able to boot Pretoriano80's propertiary TWRP.
If you need TWRP at that moment, use dil3mm4's Treble TWRP.
This TWRP cannot manage your data and files. Use your external SD card to flash files.
Stock firmware files are here. All you need are system, recovery_ramdisk and ramdisk images.
Extract the UPDATE.APP from the ZIP file. You can extract the partition images by Huawei Update Extractor.
If you have any other questions, feel free to join our group. You can ask anything without hesitation.
Click to expand...
Click to collapse
which firmware is for ane-lx3?
i can't go back to stock recovery.
I'm using aosp treble images, i've an ANE-LX1
Someone can help me?
---------- Post added at 11:42 AM ---------- Previous post was at 11:40 AM ----------
i can't go back to stock recovery.
I'm using aosp treble images, i've an ANE-LX1
Someone can help me?
---------- Post added at 11:43 AM ---------- Previous post was at 11:42 AM ----------
I've an ANE-LX1 and i'm using aosp treble image.
I can't go back to stock emui, can someone help me?
U need to flash a stock system.img
Then flash the stock recovery
mchtt said:
U need to flash a stock system.img
Then flash the stock recovery
Click to expand...
Click to collapse
from where can we get stock system image.img and the stock recovery?
fbh59 said:
from where can we get stock system image.img and the stock recovery?
Click to expand...
Click to collapse
Find the complete firmware of your device and download the update.zip.
both are extracted from UPDATE.APP that is inside the update.zip
Unzip UPDATE.APP from the .zip file, then with the "Huawei Update Extractor" open the UPDATE.APP file and the files you need should appear and you're done, you can extract them
Is there a reason, why this guide only mentions
fastboot flash system systemimage.img
Click to expand...
Click to collapse
while the "official" one (https://www.xda-developers.com/flash-generic-system-image-project-treble-device/) mentions
fastboot -u flash system name_of_system.img
Click to expand...
Click to collapse
and
fastboot erase system
Click to expand...
Click to collapse
(before)
?
Cause you need to full wipe after a different system flash ?
I suggest:
- flashing system.img
- flash stock recovery
- full wipe
must unlock bootloader or no please reply thankx
i flash download Huawei P20 Lite-ANE-LX1 8.0.0.144(C432).zip
extracting and flash fastboot mode YES
Yes you have to unlock your bootloader.
mchtt said:
Yes you have to unlock your bootloader.
Click to expand...
Click to collapse
I cant unlock bootloader dc unlocker is error 375
How unlocking bootloader please reply bro
Hi, I have a couple of questions.
Firstly, why can't you flash images from TWRP? On the OpenKirin website it says they don't support it at all. Is it TWRP's fault or Huawei's? On my P9 lite I had a while back it worked perfectly.
Secondly, I would like to know what the difference is between the TWRP versions. Is there no support for backups on KingofMezi's one?
Thanks!

Can't install MIUI custom ROM on Mi A2 Lite

I'm trying to instal MIUI 11 from this link: https://forum.xda-developers.com/mi-a2-lite/development/rom-daisy-miui-11-hybridos-stable-t4003651
However after flashing the ROM the recovery says there's no OS at all. If I reboot it bootloops.
The only way I can go back to recovery is by using adb commands and flashing a IMG. Then TWRP says it can't open destination log file.
What can I do? Thanks!
I'm not sure what you've done with your device and I'm not sure if you know how to read (because there are a LOT of guides throughout the forum), but here we go :
1 - Flash stock ROM (check the forum again on how to do it or Google it.). Do this before you're trying to flash any ROM, really.
2 - Unlock the bootloader and boot TWRP from your PC.
3 - On TWRP go to Wipe and choose Wipe Data, type 'yes' and confirm it to wipe data.
4 - Now you're gonna need to boot into TWRP again, because TWRP sometimes breaks after wiping data, simply go to Reboot section and choose 'Bootloader' in TWRP. This will get you to Fastboot mode, you will need to boot TWRP from your PC again.
5 - Once you get into TWRP, flash the ROM, flash the TWRP.zip if you want.
6 - Go into Reboot section in TWRP and check your boot slot and change it. (If A make it B, if B make it A) and reboot into system.
7 - If you want to install Magisk or any other mod through TWRP, :
7a - if you've installed TWRP.zip previously, reboot into recovery and install your mods/Magisk and then boot into system
7b - if you didn't install TWRP.zip, reboot to Bootloader/Fastboot and boot TWRP, then flash your mods/Magisk. Finaly boot into system.
marstonpear said:
I'm not sure what you've done with your device and I'm not sure if you know how to read (because there are a LOT of guides throughout the forum), but here we go :
1 - Flash stock ROM (check the forum again on how to do it or Google it.). Do this before you're trying to flash any ROM, really.
2 - Unlock the bootloader and boot TWRP from your PC.
3 - On TWRP go to Wipe and choose Wipe Data, type 'yes' and confirm it to wipe data.
4 - Now you're gonna need to boot into TWRP again, because TWRP sometimes breaks after wiping data, simply go to Reboot section and choose 'Bootloader' in TWRP. This will get you to Fastboot mode, you will need to boot TWRP from your PC again.
5 - Once you get into TWRP, flash the ROM, flash the TWRP.zip if you want.
6 - Go into Reboot section in TWRP and check your boot slot and change it. (If A make it B, if B make it A) and reboot into system.
7 - If you want to install Magisk or any other mod through TWRP, :
7a - if you've installed TWRP.zip previously, reboot into recovery and install your mods/Magisk and then boot into system
7b - if you didn't install TWRP.zip, reboot to Bootloader/Fastboot and boot TWRP, then flash your mods/Magisk. Finaly boot into system.
Click to expand...
Click to collapse
Step 1 is wrong, miui ports have base stock in built, no need to make a clean flash
Step 5 is wrong, miui ports have twrp in built, you don't need flash twrp zip
Step 6 is wrong, miui ports need to be installed in the current active slot, no needed change slot
If your device have unlock bootloader and enable usb debugging, only boot twrp.img, only boot no flash, like the OP did it (fastboot boot twrpname.img)
Wipe> format data> yes
Install> install miui.zip
Install> install magisk (optional)
Reboot>system

I can't flash TWRP

I want to flash twrp but after I boot twrp.img from bootloader, my phone stucks at nokia logo
I use pixel experience
I recommend you following the steps on https://forum.xda-developers.com/t/nokia-8-nb1-full-rom-installation-guide.4349525/
There's probably another way but this is the way I would do it.
Backup the data inside your phone.
Flash the T-Virus 2.0 (steps above).
After flashing, the phone will boot to the stock rom, turn it off.
Follow the steps to go to recovery: Flash the Pixel Experience first and TWRP recovery afterwards.
Format data or wipe dalvik / cache.
Reboot to ROM.
Have fun!
Do fastboot flash boot twrp.img

Question [HELP] What did I wrong? Flashing TWRP + ROM + GApps + Magisk

I would be very thankfull, if you could help me with my problem.
After unlocking my bootloader successfully, I re-enabled USB Debugging in MIUI and booted into fastboot mode.
From there I booted the latest "twrp-3.7.0_12-0-munch.img"
1. Which is the correct way to install TWRP permanently (or after an TWRP update)?
https://twrp.me/xiaomi/xiaomipocof4.html
"Flash Current TWRP" or "Install Recovery Ramdisk"?
[Edit] Flash Current TWRP
To remove encryption it is necesarry to "Format Data" before? or after? ROM flash. When I do that, all TWRP settings are gone (language, vibration off, 24h clock). Are these settings not stored permanent?
[Edit] after flashing rom.zip
2. When I want to flash ROM + GApps, do I need to reboot the recovery for switching partitions?
I flashed "Spark-13.1-Official-munch-20221025.zip" and "NikGapps-core-arm64-13-20220908-signed.zip". I can boot SparkOS, but there are no Gapps installed. The flashing process was skipped.
Thank's for your help!
11insomnium said:
I would be very thankfull, if you could help me with my problem.
After unlocking my bootloader successfully, I re-enabled USB Debugging in MIUI and booted into fastboot mode.
From there I booted the latest "twrp-3.7.0_12-0-munch.img"
1. Which is the correct way to install TWRP permanently (or after an TWRP update)?
POCO F4 / Redmi k40s
Disclaimer:Team Win strives to provide a quality product. However, it is your decision to install our software on your device. Team Win takes no ...
twrp.me
"Flash Current TWRP" or "Install Recovery Ramdisk"?
To remove encryption it is necesarry to "Format Data" before? or after? ROM flash. When I do that, all TWRP settings are gone (language, vibration off, 24h clock). Are these settings not stored permanent?
2. When I want to flash ROM + GApps, do I need to reboot the recovery for switching partitions?
I flashed "Spark-13.1-Official-munch-20221025.zip" and "NikGapps-core-arm64-13-20220908-signed.zip". I can boot SparkOS, but there are no Gapps installed. The flashing process was skipped - you can see that in the photos added.
3. In TWRP "Backup" there is no system partition (>photo). I'm not sure, if I accidentally wiped it. And in "Mount" the system isn't checked. Is that normal?
I can boot to fastboot, recovery and system. Please tell me right steps to flash/wipe/format without errors.
I added some TWRP logs.
Thank's for your help!
Click to expand...
Click to collapse
1. after fastbooting TWRP use Flash Current TWRP. No format data.
2. SparkOS needs global firmware to be flashed first, then reboot to recovery, then flash ROM, then format data.
There is a version with Gapps already included, working fine.
@UniNick
1. Flash Current TWRP is the prefered Installation Method from official site. Do I need to reflash TWRP after each ROM flash to survive? When formating data after ROM flash, the TWRP setting are also deleted (no more TWRP folder in internal storage).
2. My Poco F4 was shipped with MIUI Global 13.0.3.0 (SLMEUXM). So I downloaded and flashed Europe V13.0.7.0.SLMEUXM from https://xiaomifirmwareupdater.com/firmware/munch/
Baseband version is now higher.
I know there is a Gapps Version of SparkOS, but I don't know which Google apps are included and I just need a minimum of the package. Therefore I asked how to flash Gapps after ROM.zip, that both are on the same A/B partition.
I already had to reset/flash the "V13.0.5.0.SLMMIXM_20220815.0000.00_12.0_global" with MI Flash tool, because I had no access to Internal Storage with my PC to copy files on Poco F4.
11insomnium said:
@UniNick
1. Flash Current TWRP is the prefered Installation Method from official site. Do I need to reflash TWRP after each ROM flash to survive? When formating data after ROM flash, the TWRP setting are also deleted (no more TWRP folder in internal storage).
2. My Poco F4 was shipped with MIUI Global 13.0.3.0 (SLMEUXM). So I downloaded and flashed Europe V13.0.7.0.SLMEUXM from https://xiaomifirmwareupdater.com/firmware/munch/
Baseband version is now higher.
I know there is a Gapps Version of SparkOS, but I don't know which Google apps are included and I just need a minimum of the package. Therefore I asked how to flash Gapps after ROM.zip, that both are on the same A/B partition.
I already had to reset/flash the "V13.0.5.0.SLMMIXM_20220815.0000.00_12.0_global" with MI Flash tool, because I had no access to Internal Storage with my PC to copy files on Poco F4.
Click to expand...
Click to collapse
1. yes because most ROMs now bring their own recovery
2. Spark includes like a basic Gapps package
UniNick said:
1. yes because most ROMs now bring their own recovery
2. Spark includes like a basic Gapps package
Click to expand...
Click to collapse
I will try it again tomorrow. Thanks!
After a lot of research I still have some questions. Many users have trouble understanding it when the installation instructions do not list all the steps.
I have read these flashing instruction on the XDA NikGApps page:
Flashing Instructions for A/B devices (Clean Flash is recommended)
Flash Rom in Slot A, Flash twrp, reboot to recovery
Flash Rom in Slot B, Flash twrp, reboot to recovery
Flash NikGapps
Flash Debloater (Optional)
Reboot
So I thought, that this would be the steps:
### First Install / Clean Flash ###
- fastboot boot TWRP image
- in TWRP select "Flash Current TWRP" under "Advanced"
- flash firmware
- reboot recovery (is this reboot necessary before flashing ROM ??)
- wipe > factory reset (recommended or not ??)
- flash ROM (current Slot A > flashing to inactive slot B)
- flash twrp.img in boot partition + (check the box "Flash to both slots" ??)
- go to "Reboot" and change slot
- flash ROM (current Slot B > flashing to inactive slot A)
- flash twrp.img in boot partition + (check the box "Flash to both slots" ??)
???
(optional for GApps)
- flash GApps
Error: Could not mount /system
- format data
- flash twrp.img (again necessary ??) + (check the box "Flash to both slots" ??)
- boot to system + install Magisk.apk
- in Magisk: patch boot.img
- reboot recovery
- flash magisk_patched.img in boot partition + (check the box "Flash to both slots" ??)
- reboot to system
11insomnium said:
After a lot of research I still have some questions. Many users have trouble understanding it when the installation instructions do not list all the steps.
I have read these flashing instruction on the XDA NikGApps page:
Flashing Instructions for A/B devices (Clean Flash is recommended)
Flash Rom in Slot A, Flash twrp, reboot to recovery
Flash Rom in Slot B, Flash twrp, reboot to recovery
Flash NikGapps
Flash Debloater (Optional)
Reboot
So I thought, that this would be the steps:
### First Install / Clean Flash ###
- fastboot boot TWRP image
- in TWRP select "Flash Current TWRP" under "Advanced"
- flash firmware
- reboot recovery (is this reboot necessary before flashing ROM ??)
- wipe > factory reset (recommended or not ??)
- flash ROM (current Slot A > flashing to inactive slot B)
- flash twrp.img in boot partition + (check the box "Flash to both slots" ??)
- go to "Reboot" and change slot
- flash ROM (current Slot B > flashing to inactive slot A)
- flash twrp.img in boot partition + (check the box "Flash to both slots" ??)
???
(optional for GApps)
- flash GApps
Error: Could not mount /system
- format data
- flash twrp.img (again necessary ??) + (check the box "Flash to both slots" ??)
- boot to system + install Magisk.apk
- in Magisk: patch boot.img
- reboot recovery
- flash magisk_patched.img in boot partition + (check the box "Flash to both slots" ??)
- reboot to system
Click to expand...
Click to collapse
Little bit complex.
Try this guide:
Reboot to recovery (twrp or ofox), I prefer boot recovery by fastboot, command is `fastboot boot rec.img` (You can download from orangefox official website)
Flash firmware (Optional)
Flash rom
Flash gapps (if flashed vanilla build)
Format data
Reboot to system
psklf said:
Little bit complex.
Try this guide:
Reboot to recovery (twrp or ofox), I prefer boot recovery by fastboot, command is `fastboot boot rec.img` (You can download from orangefox official website)
Flash firmware (Optional)
Flash rom
Flash gapps (if flashed vanilla build)
Format data
Reboot to system
Click to expand...
Click to collapse
I'm not sure if GApps will be installed in the same slot if I flash it directly after the ROM.zip.
I have to reflash TWRP/OrangeFox before formating data and booting to system or it will be lost when I boot back to recovery.
When updating the ROM, the recovery is flashing it to inactive slot. Do I need to click through the (google) setup again, or is this data stored in another partition? When do I need to reflash GApps?
flash ROM.zip
wipe cache + dalvik
reflash recovery
reflash magisk_patched
reboot system
11insomnium said:
I'm not sure if GApps will be installed in the same slot if I flash it directly after the ROM.zip.
I have to reflash TWRP/OrangeFox before formating data and booting to system or it will be lost when I boot back to recovery.
When updating the ROM, the recovery is flashing to inactive slot. Do I need to do the (google) setup again, or is this data stored in another partition? When do I need to reflash GApps?
flash ROM.zip
wipe cache + dalvik
reflash recovery
reflash magisk_patched
reboot system
Click to expand...
Click to collapse
About GApps maybe this is the right way ...
flash ROM
flash recovery itself( w/ orangefox there is a checkbox)
reboot to recovery
flash gapps
Please bear with me, as this is my first A/B device and I'm quite confused about the flashing procedure.
I successfully unlocked bootloader and flashed TWRP.
I tried to install A13 SparkOS vanilla + Basic NikGapps. Like @11insomnium said in the 1st post, ROM was installed fine, but Gapps package was not. I tried what @psklf says, no good... Each time I try to flash the Gapps package I get a message that /system size is 0KB, and of course the setup process is skipped due to lack of space...
On a side note, when flashing the ROM, step 1/2 completes fine, but on step 2/2 I get some errors about failing to access /system, /system_product, /vendor etc... However, as I said, ROM boots fine afterwards...
Am I missing something? Or is flashing the integrated Gapps ROM version the way to go?
@11insomnium did you manage to sort this out?
@hammerheadache I'm still using the GApps version 20221113, but recently I updated my device to latest OFox recovery (R11.1_2_A12) and A13 firmware (V14.0.2.0.TLMEUXM). The result was that my fingerprints were deleted and I could't save new ones, so I reflashed the old version (V13.0.7.0.SLMEUXM).
I think you missed the reboot to recovery. This should work for you:
- flash ROM
- flash recovery
- reboot to recovery
- flash NikGapps
- reboot to system
Edit: Maybe this will also help you:
https://wiki.orangefox.tech/en/guides/flashing
I haven't completely understood it yet either
hammerheadache said:
Please bear with me, as this is my first A/B device and I'm quite confused about the flashing procedure.
I successfully unlocked bootloader and flashed TWRP.
I tried to install A13 SparkOS vanilla + Basic NikGapps. Like @11insomnium said in the 1st post, ROM was installed fine, but Gapps package was not. I tried what @psklf says, no good... Each time I try to flash the Gapps package I get a message that /system size is 0KB, and of course the setup process is skipped due to lack of space...
On a side note, when flashing the ROM, step 1/2 completes fine, but on step 2/2 I get some errors about failing to access /system, /system_product, /vendor etc... However, as I said, ROM boots fine afterwards...
Am I missing something? Or is flashing the integrated Gapps ROM version the way to go?
@11insomnium did you manage to sort this out?
Click to expand...
Click to collapse
I have read in EROFS ROMs like Spark or PE it's problematic to flash GApps or microG as the system is read-only. Also applies to some Magisk modules as well.
amn1987 said:
I have read in EROFS ROMs like Spark or PE it's problematic to flash GApps or microG as the system is read-only. Also applies to some Magisk modules as well.
Click to expand...
Click to collapse
Thanks for the info. That explains why there are ROM versions with GApps included.

How To Guide How to dirtyflash in MIUI rom

I'm using Orangefox Recovery latest stable
Steps:
1. Download recovery rom
2. Boot into recovery mode
3. Flash the recovery rom
4. Reboot recovery(Don't reboot system after flashing the rom because it causes bootloop for some reasons)
5. After rebooting recovery, reboot system.
Note: I think this method also working in other devices with an A/B partition and Clear dalvik-cache is optional.

Categories

Resources