Custom ROMs aren't booting at all - Redmi K20 / Xiaomi Mi 9T Questions & Answers

I unlocked my bootloader and managed to install TWRP and Magisk to get root on stock. But I don't like running MIUI, so I tried PA, which didn't boot, just stuck on the Mi logo without an animation on the bottom. So I tried Lineage and that one won't boot either.
Between each failed flash and boot I have to reflash MIUI using fastboot or otherwise I can't get into recovery. Next I tried to flash some GSI systems using fastboot flash system <image> and formatting user data, but that didn't work either, it loops on the kernel boot screen. Am I missing something? Are there more steps that I should take before being able to boot custom ROMs?
PS. I'm running the latest MIUI Global 10.3.11.0 (PFJMIXM)

paxy97 said:
I unlocked my bootloader and managed to install TWRP and Magisk to get root on stock. But I don't like running MIUI, so I tried PA, which didn't boot, just stuck on the Mi logo without an animation on the bottom. So I tried Lineage and that one won't boot either.
Between each failed flash and boot I have to reflash MIUI using fastboot or otherwise I can't get into recovery. Next I tried to flash some GSI systems using fastboot flash system <image> and formatting user data, but that didn't work either, it loops on the kernel boot screen. Am I missing something? Are there more steps that I should take before being able to boot custom ROMs?
PS. I'm running the latest MIUI Global 10.3.11.0 (PFJMIXM)
Click to expand...
Click to collapse
Are you sure you're following the ROM developer's installation instructions correctly?
Are you:
performing the correct TWRP pre-install routines? (e.g. wiping cache, system, vendor, etc.)
flashing a specified MIUI ROM prior to flashing custom ROM?
flashing some specified post-install scripts?
flashing a non-recommended GApps package? (for ROMs that don't include GApps)
others
Check each ROM's install instructions and make sure you follow them right to the dot.

haakufurou said:
Are you sure you're following the ROM developer's installation instructions correctly?
Are you:
performing the correct TWRP pre-install routines? (e.g. wiping cache, system, vendor, etc.)
flashing a specified MIUI ROM prior to flashing custom ROM?
flashing some specified post-install scripts?
flashing a non-recommended GApps package? (for ROMs that don't include GApps)
others
Check each ROM's install instructions and make sure you follow them right to the dot.
Click to expand...
Click to collapse
Yeah, apparently wiping system is necessary. I'm used to only having to flash a ROM and it would rewrite system completely on other phones.
Thank you for the help

Are you using the correct twrp? Wipe, advanced, wipe system,vendor, data, cache/dalvic. Install rom, then format data afterwards. Also recommend to have rom on a PC/otg since you're gonna be wiping internal storage

Related

Flashing CM 13, Resurrection remix or AOSP ROM results in bootloop or boot stuck

I have HM2014818 model (variant of HM2014811) and had the latest MIUI ROM 7.2 (developer). I decided to flash CM 13 first which resulted in bootloop then I flashed Resurrection remix which also ended in error. Now the procedure which i followed is.
1. Enter recovery mode TWRP 3.0.2-0-wt88047
2. Wipe data, system, cache , dalvik cache (formatted user data as well for last resort)
3.Flashed The ROM
4. FLashed GAPPS (Tried without flashing as well)
5. Wipe cache/dalvik cache (tried without it also)
6. Reboot System results in boot loop or boot stuck (with MI logo)
Here what I have done so far to correct it.
Downloaded stock ROM for Redmi 2 (latest developer version 6.4.14) unzipped it extracted boot.img file, replaced the resurrection remix boot.img file with stock boot.img file. The system booted, the only problem is the resurrection remix logo takes 15 minutes to change its animation sequence, it is not at all smooth. It is laggy. How to fix this can anyone give the appropriate boot.img image for faster boot keeping in mind my phone only boots from stock Boot.img file.
Restore to kitkat partitions (instructions from here).
Then wipe all data, reboot to recovery, and then flash again.
zeomal said:
Restore to kitkat partitions (instructions from here).
Then wipe all data, reboot to recovery, and then flash again.
Click to expand...
Click to collapse
What is the error ? And how is this method gonna correct it ?
nrdnandan said:
What is the error ? And how is this method gonna correct it ?
Click to expand...
Click to collapse
I have no idea of what the error per se is, but I remember having faced a similar problem and this is how I corrected it. I'm no developer.
nrdnandan said:
What is the error ? And how is this method gonna correct it ?
Click to expand...
Click to collapse
U can't flash cm13 or other mm ROMs if u r on miui lollipop bootloader.. Just downgrade to KitKat.
U can use this guide http://forum.xda-developers.com/redmi-2/how-to/rom-stock-kitkat-miui-6-fastboot-rom-t3375693
Sent from my 2014818 using XDA-Developers mobile app

flashing custom rom on A/B device

Why,in custom ROMs section on 6t forum,every one of custom rom developer in his OP states DIFFERENT "Flashing instructions"?
Not a single rom dev,in his OP have same flashing instructions as some other dev! As I read more,it looks like half of them are wrong instructions,or that they don't have this device,or they don't know.
- flashing on both slots a&b?
flash OOS rom,them twrp.zip,reboot to TWRP (to any of slots),and internal will be encrypted and unreadable.Theres no way to flash on both slots in one take in TWRP or in two takes in row(with in TWRP,reboot to TWRP different slot).There's need for at least one full boot to Operating System,then back to TWRP,and internal will be visible and decrypt ed.
Many custom ROMs need OOS on both slots to be able to make them run,but this looks like nonsense to me.
- changing slots in TWRP?
let's say you flash magisk while in slot A,go to "reboot" and change slot to B, but dont reboot to TWRP.Now flash magisk.it will flash on same slot as first time,there was no slot changing.
- delete wipe "system" in TWRP,or worse "factory reset"?
it's mistake that costs me a lot of time,Ill never do it again.As all custom ROMs now have script that wipes all unnecessary files,there's no need to wipe system and screw your phone for few hours until you fix it.For me,a big No No.
best way of flashing custom os over OOS?
for me,I go into TWRP,flash custom rom,flash TWRP zip,then I reboot into TWRP and flash gapps and magisk.if internal is crypted and I can't flash gapps and magisk,I do a boot into rom,and back to TWRP to finish my flashing.wiola,it boots and works,clean rom and all is fine.
Flash back to OOS?I just go into TWRP,flash OOS ,flash twrp.zip,reboot to twrp and flash magisk.if internal is crypted,I boot into OOS,them back to TWRP,and flash everything else what I need(like magisk and kernel)
a/b devices are nothing new,but it looks to me Like on 6t is all overcomplicated.
So,tell me how you guys do it and what are yours ways of doing it right?
shawek said:
Why,in custom ROMs section on 6t forum,every one of custom rom developer in his OP states DIFFERENT "Flashing instructions"?
Not a single rom dev,in his OP have same flashing instructions as some other dev! As I read more,it looks like half of them are wrong instructions,or that they don't have this device,or they don't know.
- flashing on both slots a&b?
flash OOS rom,them twrp.zip,reboot to TWRP (to any of slots),and internal will be encrypted and unreadable.Theres no way to flash on both slots in one take in TWRP or in two takes in row(with in TWRP,reboot to TWRP different slot).There's need for at least one full boot to Operating System,then back to TWRP,and internal will be visible and decrypt ed.
Many custom ROMs need OOS on both slots to be able to make them run,but this looks like nonsense to me.
- changing slots in TWRP?
let's say you flash magisk while in slot A,go to "reboot" and change slot to B, but dont reboot to TWRP.Now flash magisk.it will flash on same slot as first time,there was no slot changing.
- delete wipe "system" in TWRP,or worse "factory reset"?
it's mistake that costs me a lot of time,Ill never do it again.As all custom ROMs now have script that wipes all unnecessary files,there's no need to wipe system and screw your phone for few hours until you fix it.For me,a big No No.
best way of flashing custom os over OOS?
for me,I go into TWRP,flash custom rom,flash TWRP zip,then I reboot into TWRP and flash gapps and magisk.if internal is crypted and I can't flash gapps and magisk,I do a boot into rom,and back to TWRP to finish my flashing.wiola,it boots and works,clean rom and all is fine.
Flash back to OOS?I just go into TWRP,flash OOS ,flash twrp.zip,reboot to twrp and flash magisk.if internal is crypted,I boot into OOS,them back to TWRP,and flash everything else what I need(like magisk and kernel)
a/b devices are nothing new,but it looks to me Like on 6t is all overcomplicated.
So,tell me how you guys do it and what are yours ways of doing it right?
Click to expand...
Click to collapse
I agree with you!!! This is a mess
even though I have flashed thousands of roms over the years, since I got rid of my Nexus 6, I havent had a phone that I could flash roms on, so, after dumping my Note 8 for this great phone, I was very hesitant to flash a custom rom, for all the reasons you have mentioned..
So, my question is, can you flash ANY of these custom roms by using the clear method that you mentioned in the OP?
If on one of the beta releases, is the procedure the same as I am showing below, or, do you always have to first return to stock OOS?
In my years of flashing dozens of phones, you never had to go back to "stock" if you wiped everything before flashing, but, it seems like on several of these roms, you are instructed to first return to "stock", THEN flash the new custom rom...
Plus, some roms say to wipe everything before you flash, and others say not to wipe system, or not to wipe data...
Unless I am nuts, I always thought that you wipe everything before converting to a totally new rom, but, maybe I am wrong here too..
"for me,I go into TWRP,flash custom rom,flash TWRP zip,then I reboot into TWRP and flash gapps and magisk.if internal is crypted and I can't flash gapps and magisk,I do a boot into rom,and back to TWRP to finish my flashing.wiola,it boots and works,clean rom and all is fine."
These instructions seem pretty clear and concise, hopefully, they are correct, and we can just use this exact method and be done with it!
No mention of wiping in your directions...what do YOU wipe before flashing a new custom rom?
Hopefully, this gets cleared up once and for all, and we can ask the MODS to make a sticky of the ACTUAL CORRECT INSTRUCTIONS>>
thanks
wase4711 said:
"for me,I go into TWRP,flash custom rom,flash TWRP zip,then I reboot into TWRP and flash gapps and magisk.if internal is crypted and I can't flash gapps and magisk,I do a boot into rom,and back to TWRP to finish my flashing.wiola,it boots and works,clean rom and all is fine."
These instructions seem pretty clear and concise, hopefully, they are correct, and we can just use this exact method and be done with it!
No mention of wiping in your directions...what do YOU wipe before flashing a new custom rom?
Hopefully, this gets cleared up once and for all, and we can ask the MODS to make a sticky of the ACTUAL CORRECT INSTRUCTIONS>>
thanks
Click to expand...
Click to collapse
-if on custom rom,probably it's good to first go to stock OOS and then to another custom rom.but this is also strange to me,as I don't understand what are benefits of this.i also read this,Google heh.i tried going from AOSCP to PixelEcpirince without flashing OOS in-between process,all was fine.
-I haven't been on Beta OOS yet,only stable.But that thing bout "before flashing custom rom,flash stable OOS even if your on Beta OOS" is also a big question to me.they are practically the same,both are latest OOS,one maybe more stable them other,but this also can be discussed hehe
-i don't wipe anything!! when my custom rom boots,I go into it's settings, without setting my Google account and other stuff, and I do "factory reset"( not in TWRP,in custom rom's settings!).Phone reboots,and all is fine,clean beginning,TWRP works,root works.About unwantedFolders in internal storage,I delete them manualy.
Only thing in my experience to wipe in TWRP is DATA,but this is also questionable,as I run into problems also doing data wipe I TWRP.
Now ROMs(maybe only for a/b devices) have scripts that wipe previous System during flashing new rom,so we don't have to do a Clean Flash anymore.
I'm also confused,more I read,less I understand ?
I like the idea of wiping via factory reset, once the rom boots, but, if it does NOT boot, then you wouldnt be able to do it that way..
I guess flashing an OOS based rom over an OOS based rom would always allow you to boot, if done right..
But, roms like RR, Carbon, AICP, and a couple others that have shown up here recently were never really OOS based roms, but AOSP based, at least I thought so..
the more I think about this, the more confusing it seems to get..
wase4711 said:
I like the idea of wiping via factory reset, once the rom boots, but, if it does NOT boot, then you wouldnt be able to do it that way..
I guess flashing an OOS based rom over an OOS based rom would always allow you to boot, if done right..
But, roms like RR, Carbon, AICP, and a couple others that have shown up here recently were never really OOS based roms, but AOSP based, at least I thought so..
the more I think about this, the more confusing it seems to get..
Click to expand...
Click to collapse
This is from the pixel 2 xl forum another a/b device
First time installing Pixel Dust ROM, or coming from another ROM:
As mentioned above, you are required to flash stock ROM before installing this custom ROM.
1. Flashing Stock ROM:
Follow these instructions: https://developers.google.com/android/images#taimen
2. Flashing PixelDust ROM:
Reboot to twrp
Wipe Dalvik cache and Data partitions
Flash ROM
Flash twrp zip
Reboot to System and enjoy the Pixel Dust Goodness!
Flashing Magisk:
You cannot flash Magisk during the initial install. You must boot into PixelDust ROM at least once!
Reboot to Recovery
Flash Magisk-v17.x.zip
Reboot to System
shawek said:
Why,in custom ROMs section on 6t forum,every one of custom rom developer in his OP states DIFFERENT "Flashing instructions"?
Not a single rom dev,in his OP have same flashing instructions as some other dev! As I read more,it looks like half of them are wrong instructions,or that they don't have this device,or they don't know.
- flashing on both slots a&b?
flash OOS rom,them twrp.zip,reboot to TWRP (to any of slots),and internal will be encrypted and unreadable.Theres no way to flash on both slots in one take in TWRP or in two takes in row(with in TWRP,reboot to TWRP different slot).There's need for at least one full boot to Operating System,then back to TWRP,and internal will be visible and decrypt ed.
Many custom ROMs need OOS on both slots to be able to make them run,but this looks like nonsense to me.
- changing slots in TWRP?
let's say you flash magisk while in slot A,go to "reboot" and change slot to B, but dont reboot to TWRP.Now flash magisk.it will flash on same slot as first time,there was no slot changing.
- delete wipe "system" in TWRP,or worse "factory reset"?
it's mistake that costs me a lot of time,Ill never do it again.As all custom ROMs now have script that wipes all unnecessary files,there's no need to wipe system and screw your phone for few hours until you fix it.For me,a big No No.
best way of flashing custom os over OOS?
for me,I go into TWRP,flash custom rom,flash TWRP zip,then I reboot into TWRP and flash gapps and magisk.if internal is crypted and I can't flash gapps and magisk,I do a boot into rom,and back to TWRP to finish my flashing.wiola,it boots and works,clean rom and all is fine.
Flash back to OOS?I just go into TWRP,flash OOS ,flash twrp.zip,reboot to twrp and flash magisk.if internal is crypted,I boot into OOS,them back to TWRP,and flash everything else what I need(like magisk and kernel)
a/b devices are nothing new,but it looks to me Like on 6t is all overcomplicated.
So,tell me how you guys do it and what are yours ways of doing it right?
Click to expand...
Click to collapse
You make it overcomplicated.
To flash both slots you only need to do a complete reboot to make sure the OS is not hosed.
You do that so if it is you can use the other slot. This is not necessary.
You flash in TWRP, change the slot and reboot into TWRP and flash the other slot.
It could be easier if TWRP allowed flashing on the inactive slot.
But, even if you are rooted and want to upgrade it is suggested to upgrade both slots.
I think it's just a minor pain. There are bigger problems.
tech_head said:
You make it overcomplicated.
To flash both slots you only need to do a complete reboot to make sure the OS is not hosed.
You do that so if it is you can use the other slot. This is not necessary.
You flash in TWRP, change the slot and reboot into TWRP and flash the other slot.
It could be easier if TWRP allowed flashing on the inactive slot.
But, even if you are rooted and want to upgrade it is suggested to upgrade both slots.
I think it's just a minor pain. There are bigger problems.
Click to expand...
Click to collapse
it's not a minor pain if most of time that I go to flash custom rom,I lost all my 60-80gigs of internal data, cuz of failed decryption,or failed rom flash,or failed TWRP flash.There were times when I did Factory reset in TWRP,flashed OOS,flashed TWRP.zip,did reboot to recovery,and I lost recovery.I was left with bootloader (fastboot) and had to fastbooting OOS few times(which led to full wipe of internal storage).OOS wasn't even flashed,or TWRP wanst even flashed.And I just followed instructions.
this are the things that I'm talking about.Even if I follow instructions, instructions are not detailed.
now I probably know how to do it right,,but still...I learned it hard way,and still learning
thanks for your opinion and answer:good:
shawek said:
it's not a minor pain if most of time that I go to flash custom rom,I lost all my 60-80gigs of internal data, cuz of failed decryption,or failed rom flash,or failed TWRP flash.There were times when I did Factory reset in TWRP,flashed OOS,flashed TWRP.zip,did reboot to recovery,and I lost recovery.I was left with bootloader (fastboot) and had to fastbooting OOS few times(which led to full wipe of internal storage).OOS wasn't even flashed,or TWRP wanst even flashed.And I just followed instructions.
this are the things that I'm talking about.Even if I follow instructions, instructions are not detailed.
now I probably know how to do it right,,but still...I learned it hard way,and still learning
thanks for your opinion and answer:good:
Click to expand...
Click to collapse
I understand now.
The instructions are not clear for most of this stuff and you can screw up.
If something fails to flash, there are very few reasons to ever completely wipe. Even a factory reset does not require a complete wipe of data.
I would suggest at all times keeping a boot image of the current OS you are using.
I would also suggest keeping a TWRP.img on your computer. You can always boot from a TWRP image even if it's not the one you want to install.
That will at least get decryption and the ability to flash.
I don't flash custom ROMs, because the stock one with root does what I need. Also the fingerprint sensor is not guaranteed under custom ROMs and I need that to work.
no verify opt on most after data wipe or that brands version of it, then reboot to twrp verify is still not there because twrp will say no os installed the avb changed things every phone is different depending on their security Samsung for one
Try this guide. Read the first paragraph if you have problems with decryption.
Boot twrp
Wipe dalvik and data
Flash rom+twrp
Reboot SYSTEM!
Boot back to recovery
Factory reset
Flash gapps+magisk
Reboot and done
No data loss or PC needed...
So here's some food for thought. I read somewhere that when you install a ROM zip via TWRP it actually Installs to the Inactive Slot. And when you reboot to TWRP after reflashing the Installer it Switches Slots and then you can Flash GAPPS etc. But what if someone were to flash the ROM twice ; once to each slot? Would be noice if We can use this to Multi-Boot Two ROMs at once....
Mannan Qamar said:
So here's some food for thought. I read somewhere that when you install a ROM zip via TWRP it actually Installs to the Inactive Slot. And when you reboot to TWRP after reflashing the Installer it Switches Slots and then you can Flash GAPPS etc. But what if someone were to flash the ROM twice ; once to each slot? Would be noice if We can use this to Multi-Boot Two ROMs at once....
Click to expand...
Click to collapse
I think that question was asked in one of the threads in here "can use this to Multi-Boot Two ROMs at once" and I don't think it's possible. I'm sorry I don't remember the thread it was in. You might try Google.
It's wise to do the oos in both slots which you can switch slots without rebooting fyi because when you flash a custom ROM no matter if you switch back to a it'll flash magisk and probably gapps in the inactive slot. If you try to return the custom ROM to slot a after it flashes it will say insufficient room for gapps and such. So to me it seems this makes it a clean slate so it can flash to inactive slot. Hope that clears up why they encourage the double oos flash
Everyone, I think you have almost helped me figure out how I screwed up my 6T. I made a post needing help but this thread I believe is the answer. I wanted to install lineage16 but opted for Resurrection Remix since that dev claimed the fingerprint reader worked. To make a long story short, I flashed the latest .15 OxyOS update first, switched partitions via TWRP and flashed it again, them flashed TWRP and rebooted to recovery. Flashed Remix then TWRP again and rebooted to Remix. Now I have no room for anything in storage although it's only 25% full and my file explorer cannot access any storage not can I update apps through play store or anything. I have the latest OxyOS on my OTG flash drive as well as TWRP and magisk, but every time I find a thread on hope to do an installation, it varies and I keep coming back to this storage issue. Can someone PLEASE link me out tell me where to find the correct process to now start from the beginning and get my phone back working on the OxyOS .15 stock rom? Thank you very much and I'm glad I found this thread because it finally makes sense as to how misinformation is causing many people to have issues.
SuperUnkn0wn0ne said:
Everyone, I think you have almost helped me figure out how I screwed up my 6T. I made a post needing help but this thread I believe is the answer. I wanted to install lineage16 but opted for Resurrection Remix since that dev claimed the fingerprint reader worked. To make a long story short, I flashed the latest .15 OxyOS update first, switched partitions via TWRP and flashed it again, them flashed TWRP and rebooted to recovery. Flashed Remix then TWRP again and rebooted to Remix. Now I have no room for anything in storage although it's only 25% full and my file explorer cannot access any storage not can I update apps through play store or anything. I have the latest OxyOS on my OTG flash drive as well as TWRP and magisk, but every time I find a thread on hope to do an installation, it varies and I keep coming back to this storage issue. Can someone PLEASE link me out tell me where to find the correct process to now start from the beginning and get my phone back working on the OxyOS .15 stock rom? Thank you very much and I'm glad I found this thread because it finally makes sense as to how misinformation is causing many people to have issues.
Click to expand...
Click to collapse
You may have solved this by now, but I found that using the MSM Download Tool has enabled me to return to stock OxygenOS even after getting stuck in a boot loop. I've not been able to successfully flash RR or LineageOS however, still getting stuck in said boot loop...

can somebody explain flashing roms on a/b devices?

I'm no stranger to rooting and ROM'ing I've been doing it for years now. However I've never had an a/b device and it's confusing me I have a T-Mobile variant switched to international the bootloader is unlocked I'm rooted with magisk 18.1, and TWRP 3.3.0-2 and I have OOS 9.0.12 installed. I don't understand having OOS as a base ROM for other custom ROMs, some people say to flash OOS twice because apparently it goes into both slot a and b but then twrp encrypts data forcing you to msmtool. I know to take any password and finger print off the phone before switching ROMs and to change the lock screen to none.
My understanding of the steps to follow are
Reboot into TWRP
Wipe like you normally would
Flash custom ROM if your choosing
Flash TWRP (so you don't lose TWRP)
Reboot into the ROM
Reboot into recovery and flash magisk and gapps if needed
Reboot and everything should be good
If that's correct please let me know and I appreciate the help
Joe199799 said:
I'm no stranger to rooting and ROM'ing I've been doing it for years now. However I've never had an a/b device and it's confusing me I have a T-Mobile variant switched to international the bootloader is unlocked I'm rooted with magisk 18.1, and TWRP 3.3.0-2 and I have OOS 9.0.12 installed. I don't understand having OOS as a base ROM for other custom ROMs, some people say to flash OOS twice because apparently it goes into both slot a and b but then twrp encrypts data forcing you to msmtool. I know to take any password and finger print off the phone before switching ROMs and to change the lock screen to none.
My understanding of the steps to follow are
Reboot into TWRP
Wipe like you normally would
Flash custom ROM if your choosing
Flash TWRP (so you don't lose TWRP)
Reboot into the ROM
Reboot into recovery and flash magisk and gapps if needed
Reboot and everything should be good
If that's correct please let me know and I appreciate the help
Click to expand...
Click to collapse
First you need to flash OOS stable because of vendor and second to avoid the bugs. If you flash open beta u will face alot of face issues that why stable is always recommend to flash before flashing ROM and it's also must to flash before flashing ROM again same thing to avoid bugs but it's personal choice if u flash Rom and face any Issue flash OOS stable and then flash Rom. If u don't flash OOS and u didn't face any Issue you are fine that's my experience so far if I flash issue I repeat but stable first then custom and 99% bugs fixed that I "Only" face ..
And method yes that is correct for flashing ROM at least for me I followed always and nothing happens!
farhan20 said:
First you need to flash OOS stable because of vendor and second to avoid the bugs. If you flash open beta u will face alot of face issues that why stable is always recommend to flash before flashing ROM and it's also must to flash before flashing ROM again same thing to avoid bugs but it's personal choice if u flash Rom and face any Issue flash OOS stable and then flash Rom. If u don't flash OOS and u didn't face any Issue you are fine that's my experience so far if I flash issue I repeat but stable first then custom and 99% bugs fixed that I "Only" face ..
And method yes that is correct for flashing ROM at least for me I followed always and nothing happens!
Click to expand...
Click to collapse
I flashed OOS 9.0.12 yesterday because I switched ROMS with 9.0.11 and it resulted in a msm flash, turns out switching roms from 9.0.11 is a bad idea. But after updating I flashed havoc OS and everything is all good. We appreciate the answer I understand it a little better now
A/B slotting implies having a pair of partitions for most partition types (eg., Boot, System, etc...). This does not include the Data partition, however. The purpose was never to allow the coexistence of multiple ROMs but to install an OTA stock update into the unused slot while you're already using the ROM. That way if there's an error during the update process, the OS can choose not to switch over to the updated partition on reboot and continue using the current one. This redundancy is why they were able and willing to scrap the Recovery partition, too.
When flashing a ROM for an A/B device, it actually flashes to the slot you are currently not using. Then upon reboot, it switches to that slot. This is why to maintain TWRP, you need to run TWRP installer after flashing the ROM but before the reboot. Otherwise, restarting into recovery would restart into the ROMs recovery or stock recovery. The TWRP installer unconditionally patches tho Boot partition of both slots. Note that other installers like Magisk and GApps do not. If you were to install Magisk before rebooting, it would install to the currently active slot, not the one the ROM was installed to.
After flashing the ROM and TWRP and rebooting into recovery, the slot would then be set to the newly installed ROM's slot and you can finish installing Magisk and/or GApps. You would wipe data unless you're dirty flashing an updated ROM. If you've removed security password/pin/pattern before flashing it's safe to flash before rebooting in recovery. In situations where I still had such security on, I had to wipe data after rebooting into recovery to maintain working decryption. Taking off the password/pin/pattern before flashing effectively disables the encryption of files on the data partition making it easier to transition to another ROM without any decryption problems.
Whether you need to flash OOS before flashing a ROM, I presume, would depend on whether the ROM, itself, is OOS based. It's not necessary for a non-OOS ROMs. There is a nasty problem that creeps up with OOS based ROMs in which it might boot-loop into recovery. I assume the double flashing might prevent that, though my experience with that problem is after a TWRP restore of OOS stock. You could use msmtool in such a situation as stated, but I always get rid of it by flashing stock Boot partition in fastboot, booting into stock recovery, and factory reset + erase sdcard.
Reboot into TWRP
Wipe like you normally would
Flash custom ROM if your choosing
Flash TWRP (so you don't lose TWRP)
Reboot into the ROM
Reboot into recovery and flash magisk and gapps if needed
Reboot and everything should be good.
Click to expand...
Click to collapse
Don't reboot into ROM before reboot into recovery and make sure to take off Pin/Password/Pattern/Fingerprints before booting into TWRP. Otherwise, this should be fine. For the wipe stage, you don't even need to wipe System or Boot (never Boot), in my experience. Just Data and Dalvik, if not dirty flashing the same ROM type.
Nsane457 said:
A/B slotting implies having a pair of partitions for most partition types (eg., Boot, System, etc...). This does not include the Data partition, however. The purpose was never to allow the coexistence of multiple ROMs but to install an OTA stock update into the unused slot while you're already using the ROM. That way if there's an error during the update process, the OS can choose not to switch over to the updated partition on reboot and continue using the current one. This redundancy is why they were able and willing to scrap the Recovery partition, too.
When flashing a ROM for an A/B device, it actually flashes to the slot you are currently not using. Then upon reboot, it switches to that slot. This is why to maintain TWRP, you need to run TWRP installer after flashing the ROM but before the reboot. Otherwise, restarting into recovery would restart into the ROMs recovery or stock recovery. The TWRP installer unconditionally patches tho Boot partition of both slots. Note that other installers like Magisk and GApps do not. If you were to install Magisk before rebooting, it would install to the currently active slot, not the one the ROM was installed to.
After flashing the ROM and TWRP and rebooting into recovery, the slot would then be set to the newly installed ROM's slot and you can finish installing Magisk and/or GApps. You would wipe data unless you're dirty flashing an updated ROM. If you've removed security password/pin/pattern before flashing it's safe to flash before rebooting in recovery. In situations where I still had such security on, I had to wipe data after rebooting into recovery to maintain working decryption. Taking off the password/pin/pattern before flashing effectively disables the encryption of files on the data partition making it easier to transition to another ROM without any decryption problems.
Whether you need to flash OOS before flashing a ROM, I presume, would depend on whether the ROM, itself, is OOS based. It's not necessary for a non-OOS ROMs. There is a nasty problem that creeps up with OOS based ROMs in which it might boot-loop into recovery. I assume the double flashing might prevent that, though my experience with that problem is after a TWRP restore of OOS stock. You could use msmtool in such a situation as stated, but I always get rid of it by flashing stock Boot partition in fastboot, booting into stock recovery, and factory reset + erase sdcard.
Don't reboot into ROM before reboot into recovery and make sure to take off Pin/Password/Pattern/Fingerprints before booting into TWRP. Otherwise, this should be fine. For the wipe stage, you don't even need to wipe System or Boot (never Boot), in my experience. Just Data and Dalvik, if not dirty flashing the same ROM type.
Click to expand...
Click to collapse
That was a very well written and insightful answer thank you. The way you wrote makes everything much easier to understand
I think with the new TWRP recovery flashing is about to be less of a d**k. TWRP 3.3.0-0

OnePlus 6t Wifi Issue on custom roms

Okay so I've tried Pixel experience, lineage os , omni rom treskmod and couple of other custom android 10 roms, all stable and official and also updated ones, the wifi just simply doesn't work, wifi hotspot won't turn on either. I've tried every solution on the internet. I've even factory reset my phone using msm download tool and no luck(did this countless times).
I'm back in OOS 10.3.2 and there's no issue apparently.
At one point , i flashed a custom rom and the wifi didn't work, so I flashed OOS in the two slots and checked , the wifi works in OOS apparently, and never in custom roms.
Has anyone got this issue before and knows a solution?
How is your installation procedure?
onliner said:
How is your installation procedure?
Click to expand...
Click to collapse
I flash OOS and twrp on both slots, reboot recovery,
And then flash the rom and twrp, reboot recovery,then format data and factory reset, reboot recovery, if needed for some gapps, then reboot system
ivanthomas said:
I flash OOS and twrp on both slots, reboot recovery,
And then flash the rom and twrp, reboot recovery,then format data and factory reset, reboot recovery, if needed for some gapps, then reboot system
Click to expand...
Click to collapse
That's a lot of unnecessary steps. OOS on both slots, reboot to bootloader, boot twrp, format data and flash the custom rom, reboot bootloader, boot twrp and flash gapps, don't install twrp permanently if you are not going to install Magisk.
onliner said:
That's a lot of unnecessary steps. OOS on both slots, reboot to bootloader, boot twrp, format data and flash the custom rom, reboot bootloader, boot twrp and flash gapps, don't install twrp permanently if you are not going to install Magisk.
Click to expand...
Click to collapse
I need magisk too, I usually permanently install twrp
Also you think it's the way I'm installing at fault here? Or the rom? Or is it something wrong with my device?
ivanthomas said:
it's the way I'm installing at fault here?
Click to expand...
Click to collapse
This.
I always install roms with the procedure i said above and have never had any problems.
onliner said:
This.
I always install roms with the procedure i said above and have never had any problems.
Click to expand...
Click to collapse
Alright so got one doubt, I used OOS 10.3.2 to flash, should it be oos 10.0 only?
Thought that didn't make a difference.
I am also facing the same issue. Were you able to find any solution ?
So I found out treskmod omni rom and Paranoid android quartz 2 work perfectly , try those out, it still doesn't solve the problem in the other roms though. So not exactly a solution.

Flash a Custom Rom in 2020?

For the past 24+ hours I've been trying to flash a few custom roms on my UNLOCKED BOOTLOADER OP6T, but the phone TURNS OFF a few seconds after the boot sequence/animation.
I've read about the A/B slots and tried the Roms' flashing instructions, along with a few suggestions from others, but I cannot get any Custom Rom on my phone...
Here are the steps I've taken to flash (a few times I tried different things that I'll put in parenthesis). Is there anything ya'll see that I'm doing wrong?:
Starting from OOS 10.3.2 Fastboot Recovery and all required files on an OTG USB Drive
fastboot to TWRP....img
Confirmed I'm on Slot A
Wipe Data/Dalvik
Install OOS...zip (10.3.2)
Install TWRP...zip (3.3.1.32)
Reboot Recovery
(Format Data)
Confirmed I'm on Slot B
Install OOS...zip (10.3.2)
Install TWRP...zip (3.3.1.32)
Reboot Recovery
Confirmed I'm on Slot A
Install Xtended (v8 4/13)
(Wipe Data/Cache)
Install TWRP...zip (3.3.1.32)
Reboot Recovery
Confirmed I'm on Slot B
Install Xtended (v8 4/13)
(Wipe Data/Cache)
Install TWRP...zip (3.3.1.32)
Reboot Recovery
Confirmed I'm on Slot A
Install GAPPS (Arm64 10.0 Nano)
(Format Data)
Reboot System
My Guide for Lineage, however it will work for most AOSP based ROMs.
I assume you arent manually switching slots. Don't, there is no need, in fact dont worry about it. Slots will switch automatically after flashing a ROM when you reboot recovery. There is no cache partition, stop wiping this, its not doing anything. There are two slots, but only one data partition that is shared, there isnt a reason to keep wiping it.
On most instructions adding or removing steps will make things not work. Unfortunately for this device there is a lot of out dated information and information that just doesnt work. My guide has been tested with 10.3.3, and the latest version of LOS, however if you have a T-Mobile 6T you are on your own. (I have a regular 6T)
OhioYJ said:
My Guide for Lineage, however it will work for most AOSP based ROMs.
I assume you arent manually switching slots. Don't, there is no need, in fact dont worry about it. Slots will switch automatically after flashing a ROM when you reboot recovery. There is no cache partition, stop wiping this, its not doing anything. There are two slots, but only one data partition that is shared, there isnt a reason to keep wiping it.
On most instructions adding or removing steps will make things not work. Unfortunately for this device there is a lot of out dated information and information that just doesnt work. My guide has been tested with 10.3.3, and the latest version of LOS, however if you have a T-Mobile 6T you are on your own. (I have a regular 6T)
Click to expand...
Click to collapse
Thanks for the comment! I just followed your guide, but still seeing the boot animation for a few seconds, then the phone vibrates and turns off.
For kicks, I decided to Format Data and I see the boot animation longer, all the way to the end when it's about to start Android, but then it vibrates and shuts off. Strange.
I'm thinking there is something different about my phone... It's a global, unlocked version and I've rooted/flashed hundreds of roms over the years on various devices, so all of this should be a piece of cake................. Thanks!
oooscasianooo said:
Thanks for the comment! I just followed your guide, but still seeing the boot animation for a few seconds, then the phone vibrates and turns off.
For kicks, I decided to Format Data and I see the boot animation longer, all the way to the end when it's about to start Android, but then it vibrates and shuts off. Strange.
I'm thinking there is something different about my phone... It's a global, unlocked version and I've rooted/flashed hundreds of roms over the years on various devices, so all of this should be a piece of cake................. Thanks!
Click to expand...
Click to collapse
Have you tried without Gapps?
After the shutdown go back to twrp and extract the content of /sys/fs/pstore/* and upload the files here.
onliner said:
After the shutdown go back to twrp and extract the content of /sys/fs/pstore/* and upload the files here.
Click to expand...
Click to collapse
Thanks. I actually gave up and setup stock OOS again, so it took a while to get a TWRP backup, etc. etc.
So after the backup, I installed Xtended + TWRP, reboot to recovery, installed Xtended + TWRP, wiped dalvik, and reboot to system.
Boot animation shut down issue as usual.
Afterwards, I copied the pstore folder (attached zip).
Thanks!
onliner said:
After the shutdown go back to twrp and extract the content of /sys/fs/pstore/* and upload the files here.
Click to expand...
Click to collapse
Anything in the logs I can look for?
This is driving me crazy. I flashed MIUI just fine (because it had the .bat file that does everything for you). Essentially it's doing the same thing as flashing OOS & Rom on A/B, right?
Just tried flashing the newest Xtended Rom (May 11th), same issue. Phone vibrates and completely turns off while the boot animation is running.
OhioYJ said:
My Guide for Lineage, however it will work for most AOSP based ROMs.
I assume you arent manually switching slots. Don't, there is no need, in fact dont worry about it. Slots will switch automatically after flashing a ROM when you reboot recovery. There is no cache partition, stop wiping this, its not doing anything. There are two slots, but only one data partition that is shared, there isnt a reason to keep wiping it.
On most instructions adding or removing steps will make things not work. Unfortunately for this device there is a lot of out dated information and information that just doesnt work. My guide has been tested with 10.3.3, and the latest version of LOS, however if you have a T-Mobile 6T you are on your own. (I have a regular 6T)
Click to expand...
Click to collapse
If you have a TMobile 6t I can confirm I have had to manually change the slots during the flashing process to get custom ROMs installed.
mrmcshagbag said:
If you have a TMobile 6t I can confirm I have had to manually change the slots during the flashing process to get custom ROMs installed.
Click to expand...
Click to collapse
I found out that I do have the T-Mobile version that the seller flashed to International Software haha
When I reboot to recovery, I do see that the slots are being changed though.
Would you mind post the exact steps you took to successfully flash a ROM/GAPPS?
oooscasianooo said:
I found out that I do have the T-Mobile version that the seller flashed to International Software haha
When I reboot to recovery, I do see that the slots are being changed though.
Would you mind post the exact steps you took to successfully flash a ROM/GAPPS?
Click to expand...
Click to collapse
Fastboot boot TWRP Marion version
Flash oos
Flash Marion TWRP zip
Check my slot
Reboot recovery
Changed slot since it didn't change
Reboot recovery
Flash oos
Flash Marion TWRP zip
Changed slot
Reboot recovery
Flash custom rom
Flash Marion TWRP zip
Change slot
Reboot recovery
Flash gapps
Flash magisk 20.4
Reboot to system
Those are the steps I had to take before I finally got a custom rom to work. I tried doing the methods posted which would have probably worked if the slots were changing on there own but they weren't for me.
mrmcshagbag said:
Fastboot boot TWRP Marion version
Flash oos
Flash Marion TWRP zip
Check my slot
Reboot recovery
Changed slot since it didn't change
Reboot recovery
Flash oos
Flash Marion TWRP zip
Changed slot
Reboot recovery
Flash custom rom
Flash Marion TWRP zip
Change slot
Reboot recovery
Flash gapps
Flash magisk 20.4
Reboot to system
Those are the steps I had to take before I finally got a custom rom to work. I tried doing the methods posted which would have probably worked if the slots were changing on there own but they weren't for me.
Click to expand...
Click to collapse
Thanks! Do you mean the "mauronofrio" version?
oooscasianooo said:
Thanks! Do you mean the "mauronofrio" version?
Click to expand...
Click to collapse
Yes couldn't remember the exact name but I knew you would be able to find it haha
mrmcshagbag said:
Yes couldn't remember the exact name but I knew you would be able to find it haha
Click to expand...
Click to collapse
hahaha thanks! I was thinking, "is there a T-Mobile version of TWRP?!" haha!

Categories

Resources