Can someone help explain the Slot A and Slot B stuff in TWRP?

Search This thread

jova33

Senior Member
Oct 12, 2011
932
174
Oklahoma City
In the AOKP thread someone brought up switching slots and flashing to a different slot, and in my search for answers I found out that you can easily brick this phone by switching to an empty slot.

Did you swap slots before you dirty flashed?

If you are in slot A and want to dirty flash to fix something I would recommend switching to slot B, flashing the ROM because it flashes back over slot A.. Then rebooting.

Can you explain the slot A & B stuff? If I want to dirty flash, I need to flash in slot B, rather than just flashing on top of the current ROM?
Like today, there's a new build out. I don't simply follow the instructions from post #1?

If updating a new AOKP build:
  • Flash ROM (GAPPS are included for now)
  • Flash TWRP Installer ZIP (Every time)
  • Reboot

Or has something changed, and the OP needs to be updated? I know gapps have to be flashed now as well, right?

Edit: Holy cow. I searched "TWRP slot a slot b" and first few results are about bricking the phone:
https://forum.xda-developers.com/pixel-xl/how-to/pixel-xl-bricked-switching-to-slot-b-t3520675

I keep forgetting that this isn't like normal a Nexus device. You had to absolutely be trying to hard brick one of those.
I also found this reddit thread: https://www.reddit.com/r/GooglePixel/comments/647k52/twrp_slot_a_b/
I rebooted to recovery and saw that it was in slot B currently. I don't remember switching slots. I went straight from stock to unlock bootloader, install TWRP, and flashed this ROM. So, should I switch to slot A to dirty flash? What would happen if I switched to slot A right now and rebooted?

I didn't want to clog up that thread with my questions, so I'm asking here.
There's a new build out for that ROM today. I'm currently on slot B. So if I want to flash the new build, I should boot into recovery, go to the Restart menu, select slot A, and then go through with flashing the ROM. Is that correct?
 
  • Like
Reactions: y2kbugleung

admiralspeedy

Senior Member
Dec 22, 2011
308
133
Google Nexus 4
Nexus 7
I spent the entirety of yesterday playing with my new Pixel XL and honestly, it's not nearly as easy to brick as people seem to claim. There are two bootloaders, one for each slot and you can just flip between slots. The only confusing thing is that when you flash a ROM, it flashes to the other slot and then tells your phone to switch to that slot next boot. Also, the recovery is now part of the boot image, so you have to flash TWRP every time you install a ROM or it will be overwritten (which is not a big deal since you can still just boot it through the bootloader and flash it if you forgot).

As a side note, because nobody I talked to seem to understand it yesterday, I figured it out myself: Every guide suggests wiping system before flashing the ROM, however this is wrong in the sense that it wipes the currently active slot, not the one the ROM will be flashed to, so what you need to do is using fastboot or TWRP, set the active slot to the one you plan on flashing the ROM to, do your wipe system (data is shared so it doesn't matter when you wipe it), then switch back to the other slot, reboot TWRP and then flash your ROM.
 

jova33

Senior Member
Oct 12, 2011
932
174
Oklahoma City
So, just so I'm straight, it should be:

If updating a new AOKP build:
  • Boot into recovery
  • Wipe system - which will wipe System on the current slot
  • Boot into other slot
  • Flash ROM & GAPPS - which will install ROM on the slot you are not currently in
  • Flash TWRP Installer ZIP (Every time)
  • Reboot
 

Golf c

Senior Member
Jan 4, 2015
1,696
885
Google Pixel 6 Pro
I spent the entirety of yesterday playing with my new Pixel XL and honestly, it's not nearly as easy to brick as people seem to claim. There are two bootloaders, one for each slot and you can just flip between slots. The only confusing thing is that when you flash a ROM, it flashes to the other slot and then tells your phone to switch to that slot next boot. Also, the recovery is now part of the boot image, so you have to flash TWRP every time you install a ROM or it will be overwritten (which is not a big deal since you can still just boot it through the bootloader and flash it if you forgot).

As a side note, because nobody I talked to seem to understand it yesterday, I figured it out myself: Every guide suggests wiping system before flashing the ROM, however this is wrong in the sense that it wipes the currently active slot, not the one the ROM will be flashed to, so what you need to do is using fastboot or TWRP, set the active slot to the one you plan on flashing the ROM to, do your wipe system (data is shared so it doesn't matter when you wipe it), then switch back to the other slot, reboot TWRP and then flash your ROM.
Custom roms wipe the system in the slot that it switches too. So you really don't need to wipe system. That being said, the new inactive slot will have your previous image left in it if you don't wipe system.

---------- Post added at 11:54 PM ---------- Previous post was at 11:52 PM ----------

So, just so I'm straight, it should be:

If updating a new AOKP build:
Boot into recovery
Wipe system - which will wipe System on the current slot
Boot into other slot
Flash ROM & GAPPS - which will install ROM on the slot you are not currently in
Flash TWRP Installer ZIP (Every time)
Reboot
You never flash gapps and rom in the same TWRP session. Roms switch slots gapps don't. You flash rom and TWRP. Reboot into recovery, which puts you into the new slot, then flash gapps and boot system
 

mac796

Senior Member
Aug 20, 2014
1,358
472
Long Beach
I spent the entirety of yesterday playing with my new Pixel XL and honestly, it's not nearly as easy to brick as people seem to claim. There are two bootloaders, one for each slot and you can just flip between slots. The only confusing thing is that when you flash a ROM, it flashes to the other slot and then tells your phone to switch to that slot next boot. Also, the recovery is now part of the boot image, so you have to flash TWRP every time you install a ROM or it will be overwritten (which is not a big deal since you can still just boot it through the bootloader and flash it if you forgot).

As a side note, because nobody I talked to seem to understand it yesterday, I figured it out myself: Every guide suggests wiping system before flashing the ROM, however this is wrong in the sense that it wipes the currently active slot, not the one the ROM will be flashed to, so what you need to do is using fastboot or TWRP, set the active slot to the one you plan on flashing the ROM to, do your wipe system (data is shared so it doesn't matter when you wipe it), then switch back to the other slot, reboot TWRP and then flash your ROM.

We told you yesterday , you don't need to wipe system. And you can change slots with TWRP, don't have to use fastboot , just have to reboot to recovery or bootloader to make it official
 

jova33

Senior Member
Oct 12, 2011
932
174
Oklahoma City
You never flash gapps and rom in the same TWRP session. Roms switch slots gapps don't. You flash rom and TWRP. Reboot into recovery, which puts you into the new slot, then flash gapps and boot system

Ok, thanks. Yeah, I was drunk last night and couldn't figure out why when I attempted to dirty flash it would boot, but none of the Google services would work.

And someone gave me a pretty good rundown in the AOKP thread:
You don't have to wipe system unless you want to., not a requirement since most rom scripts (if not all for the pixel) wipe system anyway.

Boot in TWRP
Reboot TWRP to Inactive Slot
Flash ROM (for a clean flash simply factory reset before flashing rom)
Flash TWRP
Reboot to Recovery (makes inactive slot active)
Flash Gapps (They flash to active slot slot)
So if I rebooted TWRP to slot A right now, currently on slot B, it won't brick the phone?

Also, can you use slot A & slot B for dualboot? That's what I initially thought it was for, so I wasn't messing around with switching slots. Thought I could just dive right in and it'd be the same as my Nexus 6P.
 

Golf c

Senior Member
Jan 4, 2015
1,696
885
Google Pixel 6 Pro
Ok, thanks. Yeah, I was drunk last night and couldn't figure out why when I attempted to dirty flash it would boot, but none of the Google services would work.

And someone gave me a pretty good rundown in the AOKP thread:

So if I rebooted TWRP to slot A right now, currently on slot B, it won't brick the phone?

Also, can you use slot A & slot B for dualboot? That's what I initially thought it was for, so I wasn't messing around with switching slots. Thought I could just dive right in and it'd be the same as my Nexus 6P.
Dual slots are for seamless updates. Nothing like previous devices. Once you understand the slots, it's easy. You can dual boot the same rom. But with one shared data partition it won't work very good with two different roms. As far as bricking, who knows. You always take a risk. As long as you pay attention to what your flashing I don't see a problem.
 

admiralspeedy

Senior Member
Dec 22, 2011
308
133
Google Nexus 4
Nexus 7
We told you yesterday , you don't need to wipe system. And you can change slots with TWRP, don't have to use fastboot , just have to reboot to recovery or bootloader to make it official

Except I want to wipe system before I flash a ROM... Also, if you actually read my post that you quoted, I quite clearly said that you can change the slot with fastboot or TWRP.

---------- Post added at 08:20 PM ---------- Previous post was at 08:18 PM ----------

Custom roms wipe the system in the slot that it switches too. So you really don't need to wipe system. That being said, the new inactive slot will have your previous image left in it if you don't

I was unaware of that. Is there any way to actually confirm that a ROM wipes systems first (it makes sense obviously, but I'm just curious)?
 

Golf c

Senior Member
Jan 4, 2015
1,696
885
Google Pixel 6 Pro
Except I want to wipe system before I flash a ROM... Also, if you actually read my post that you quoted, I quite clearly said that you can change the slot with fastboot or TWRP.

---------- Post added at 08:20 PM ---------- Previous post was at 08:18 PM ----------



I was unaware of that. Is there any way to actually confirm that a ROM wipes systems first (it makes sense obviously, but I'm just curious)?
Not really, if it didn't wipe the old image, I doubt if it would work very well.

Edit: I believe the TWRP log will tell you it wiped the system.
 

Glsoto

Senior Member
Apr 18, 2011
171
17
What happen if I want to flash the stock image (return to stock) If I am in a custom ROM..?? . DO I need to take any precautions (Slot A or B) before running flashall.bat ???.
 

5.1

Senior Member
Mar 18, 2012
1,334
559
42
haguenau
Google Pixel XL
Google Pixel 3 XL
What happen if I want to flash the stock image (return to stock) If I am in a custom ROM..?? . DO I need to take any precautions (Slot A or B) before running flashall.bat ???.


I do a factory reset on TWRP then go back to stock

Hello,

I think you don't necessarily need to factory reset. Since system will be overwritten and userdata partition will be wiped anyway.

Also, just as a precaution... If you installed custom ROMs on both slots (intentionally or by mistake), i would flash stock firmware on slots a and b. :)

Cheers...
 

mac796

Senior Member
Aug 20, 2014
1,358
472
Long Beach
Hello,

I think you don't necessarily need to factory reset. Since system will be overwritten and userdata partition will be wiped anyway.

Also, just as a precaution... If you installed custom ROMs on both slots (intentionally or by mistake), i would flash stock firmware on slots a and b. :)

Cheers...

Yes you do you will get system FC errors if you don't. That's been my experience so far. That's with the - w removed. If your doing it with the-w you probably don't have to factory reset
 

Glsoto

Senior Member
Apr 18, 2011
171
17
Hello,

I think you don't necessarily need to factory reset. Since system will be overwritten and userdata partition will be wiped anyway.

Also, just as a precaution... If you installed custom ROMs on both slots (intentionally or by mistake), i would flash stock firmware on slots a and b. :)

Cheers...

Ok, thank you... I have a custom ROM only in one of my slots (SLOT B), so do you recommend me to install the stock firmaware in both slots. or just install the stock firmaware only in SLOT A.

If I have to installed in both slots, I order to do so , do I need to use the fastboot command to swtich slots after I installed in slot A, to installed in slot B.. ???

Thank you for your help
 
Last edited:

5.1

Senior Member
Mar 18, 2012
1,334
559
42
haguenau
Google Pixel XL
Google Pixel 3 XL
Ok, thank you... I have a custom ROM only in one of my slots (SLOT B), so do you recommend me to install the stock firmaware in both slots. or just install the stock firmaware only in SLOT A.

If I have to installed in both slots, I order to do so , do I need to use the fastboot command to swtich slots after I installed in slot A, to installed in slot B.. ???

Thank you for your help

Hello,

If you are sure only the slot b is modified, then flash on slot b. This way, both will be stock afterward.

Good luck...
 

Glsoto

Senior Member
Apr 18, 2011
171
17
Hello,

If you are sure only the slot b is modified, then flash on slot b. This way, both will be stock afterward.

Good luck...

Is there any way to know what files do I have in each slot..??? or do i need to switch slots and boot from each one to see ..
 

5.1

Senior Member
Mar 18, 2012
1,334
559
42
haguenau
Google Pixel XL
Google Pixel 3 XL
Is there any way to know what files do I have in each slot..??? or do i need to switch slots and boot from each one to see ..

Hey,

I don't know a safe way to know what is on a or b except booting to system. I have stock NHG47K on a and PN on b (or the inverse). I use PN. Just for testing i booted on a. After this I had permissions issues on PN. So be careful...

Good luck...
 

nay_

Member
Jun 6, 2020
22
10
California
From within TWRP _without_ rebooting of any kind can I flash the ROM first to A, and then switch some setting to flash ROM to B? so all my bases are covered?
 

erica butson

Member
Jan 17, 2018
40
18
New Slot a and slot b are confusing

Hi, I have nearly spent 10 hours of my time trying to figure out the slot a and slot b stuff.

I haven't flashed a custom ROM for past few years, I tried to flash custom rom but figured it out there's this new thing slot a and slot b which is really hard to understand. I have read the whole thread and understood a bit. can someone please educate me on this.. Thank you so much in advance..

  1. Can i install TWRP recovery on both A and B slot permanently??
  2. Is there a way to use only Slot A and ditch slot B?
  3. Slot A and Slot B can have to different custom recoveries?
  4. If i mess up slot A rom how can i switch back to slot B?
 

beeewell

Senior Member
Apr 25, 2012
259
89
Nexus 6
Google Pixel 3a
Hi, I have nearly spent 10 hours of my time trying to figure out the slot a and slot b stuff.

I haven't flashed a custom ROM for past few years, I tried to flash custom rom but figured it out there's this new thing slot a and slot b which is really hard to understand. I have read the whole thread and understood a bit. can someone please educate me on this.. Thank you so much in advance..

  1. Can i install TWRP recovery on both A and B slot permanently??
  2. Is there a way to use only Slot A and ditch slot B?
  3. Slot A and Slot B can have to different custom recoveries?
  4. If i mess up slot A rom how can i switch back to slot B?

Here are several more guides and explanations on the A/B slots that might help you understand :

https://www.xda-developers.com/how-a-b-partitions-and-seamless-updates-affect-custom-development-on-xda/

https://www.droidwin.com/flash-roms-magisk-twrp-kernels-a-b-partition-devices/

https://www.droidwin.com/flash-files-a-b-partition-devices/
 
  • Like
Reactions: RootedLee

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    I spent the entirety of yesterday playing with my new Pixel XL and honestly, it's not nearly as easy to brick as people seem to claim. There are two bootloaders, one for each slot and you can just flip between slots. The only confusing thing is that when you flash a ROM, it flashes to the other slot and then tells your phone to switch to that slot next boot. Also, the recovery is now part of the boot image, so you have to flash TWRP every time you install a ROM or it will be overwritten (which is not a big deal since you can still just boot it through the bootloader and flash it if you forgot).

    As a side note, because nobody I talked to seem to understand it yesterday, I figured it out myself: Every guide suggests wiping system before flashing the ROM, however this is wrong in the sense that it wipes the currently active slot, not the one the ROM will be flashed to, so what you need to do is using fastboot or TWRP, set the active slot to the one you plan on flashing the ROM to, do your wipe system (data is shared so it doesn't matter when you wipe it), then switch back to the other slot, reboot TWRP and then flash your ROM.
    2
    I spent the entirety of yesterday playing with my new Pixel XL and honestly, it's not nearly as easy to brick as people seem to claim. There are two bootloaders, one for each slot and you can just flip between slots. The only confusing thing is that when you flash a ROM, it flashes to the other slot and then tells your phone to switch to that slot next boot. Also, the recovery is now part of the boot image, so you have to flash TWRP every time you install a ROM or it will be overwritten (which is not a big deal since you can still just boot it through the bootloader and flash it if you forgot).

    As a side note, because nobody I talked to seem to understand it yesterday, I figured it out myself: Every guide suggests wiping system before flashing the ROM, however this is wrong in the sense that it wipes the currently active slot, not the one the ROM will be flashed to, so what you need to do is using fastboot or TWRP, set the active slot to the one you plan on flashing the ROM to, do your wipe system (data is shared so it doesn't matter when you wipe it), then switch back to the other slot, reboot TWRP and then flash your ROM.
    Custom roms wipe the system in the slot that it switches too. So you really don't need to wipe system. That being said, the new inactive slot will have your previous image left in it if you don't wipe system.

    ---------- Post added at 11:54 PM ---------- Previous post was at 11:52 PM ----------

    So, just so I'm straight, it should be:

    If updating a new AOKP build:
    Boot into recovery
    Wipe system - which will wipe System on the current slot
    Boot into other slot
    Flash ROM & GAPPS - which will install ROM on the slot you are not currently in
    Flash TWRP Installer ZIP (Every time)
    Reboot
    You never flash gapps and rom in the same TWRP session. Roms switch slots gapps don't. You flash rom and TWRP. Reboot into recovery, which puts you into the new slot, then flash gapps and boot system
    1
    In the AOKP thread someone brought up switching slots and flashing to a different slot, and in my search for answers I found out that you can easily brick this phone by switching to an empty slot.

    Did you swap slots before you dirty flashed?

    If you are in slot A and want to dirty flash to fix something I would recommend switching to slot B, flashing the ROM because it flashes back over slot A.. Then rebooting.

    Can you explain the slot A & B stuff? If I want to dirty flash, I need to flash in slot B, rather than just flashing on top of the current ROM?
    Like today, there's a new build out. I don't simply follow the instructions from post #1?

    If updating a new AOKP build:
    • Flash ROM (GAPPS are included for now)
    • Flash TWRP Installer ZIP (Every time)
    • Reboot

    Or has something changed, and the OP needs to be updated? I know gapps have to be flashed now as well, right?

    Edit: Holy cow. I searched "TWRP slot a slot b" and first few results are about bricking the phone:
    https://forum.xda-developers.com/pixel-xl/how-to/pixel-xl-bricked-switching-to-slot-b-t3520675

    I keep forgetting that this isn't like normal a Nexus device. You had to absolutely be trying to hard brick one of those.
    I also found this reddit thread: https://www.reddit.com/r/GooglePixel/comments/647k52/twrp_slot_a_b/
    I rebooted to recovery and saw that it was in slot B currently. I don't remember switching slots. I went straight from stock to unlock bootloader, install TWRP, and flashed this ROM. So, should I switch to slot A to dirty flash? What would happen if I switched to slot A right now and rebooted?

    I didn't want to clog up that thread with my questions, so I'm asking here.
    There's a new build out for that ROM today. I'm currently on slot B. So if I want to flash the new build, I should boot into recovery, go to the Restart menu, select slot A, and then go through with flashing the ROM. Is that correct?
    1
    Hi, I have nearly spent 10 hours of my time trying to figure out the slot a and slot b stuff.

    I haven't flashed a custom ROM for past few years, I tried to flash custom rom but figured it out there's this new thing slot a and slot b which is really hard to understand. I have read the whole thread and understood a bit. can someone please educate me on this.. Thank you so much in advance..

    1. Can i install TWRP recovery on both A and B slot permanently??
    2. Is there a way to use only Slot A and ditch slot B?
    3. Slot A and Slot B can have to different custom recoveries?
    4. If i mess up slot A rom how can i switch back to slot B?

    Here are several more guides and explanations on the A/B slots that might help you understand :

    https://www.xda-developers.com/how-a-b-partitions-and-seamless-updates-affect-custom-development-on-xda/

    https://www.droidwin.com/flash-roms-magisk-twrp-kernels-a-b-partition-devices/

    https://www.droidwin.com/flash-files-a-b-partition-devices/
    1

    Thank you so much. I understand now,
    People who are facing problems or don't know about the seamless update partitions can go through the above links. It's simple and very easy to understand. I feel dumb asking easy questions in this thread before searching this kind of threads and blogs on XDA. :p