[Google Pixel XL ROMs, Kernels, Recoveries, & Other] D0CTOR:
Using Both Slots

[MENTION=3544615]beanstown[/MENTION]1006,

Before I received my Pixel I spent some time trying to learn about it so when I finally got it I could be off and running.

I spent a lot of time reading many different posts on different forums, and the common problem from the beginning was the slots, and how they work. The last thing I wanted to do to my new Pixel (need it for work) was to brick it, which several people had done trying to figure it out.

While learning, I just started copying & pasting various posts to a Word doc for my reference for the day it was my turn...

I regret to say that I never saved the OP in this information, but because all of these came from forums of people helping others I feel okay to share without direct reference to them.

Here are three posts that I believe may help clear this up:

#1: I was asked if it's possible to have two roms setup on the two slots and yes it is. Assuming you are on a rom you want to be able to boot to as well already here's how.

Just flash the new rom this one in this case in twrp and it will flash to the other slot automatically for you, you don't need to change anything there, just flash it. Once you're done flashing the rom flash twrp while still in twrp " you can select multiple files to flash at once in twrp mind you so the rom being the first one then twrp being the second one " then boot to the rom from there, then just automatically reboot to twrp again before setting the rom up by using the reboot menu option from within the rom and flash the newest vendor image which is v, so the rom will stop nagging you about the vendor image then simply reboot system and you'll be right back in the rom again and set the new rom up from there.

One you're all done, you should be able to switch between the two roms fine by using twrp to select the slot you want to boot to. To do that, you just simply click on the reboot menu from within twrp and then click the slot that you want to boot to, then simply reboot system.

I use the --skip-secondary switch to make sure a flash does not touch the other slot. This is important because I want to have a true dual-booting phone. Well, we all know that userdata is shared, but I managed to work around that too. Other than that, I have individual boot, vendor, system, and kernel for each slot. Currently running WETA 2.3, rooted, Franco kernel in A, with black boot screen, and DU, unrooted, Elemental kernel in B, with white boot screen. The --skip-secondary switch keeps the slots separate and makes troubleshooting extremely simple.

#2: The Pixel and 7.0, 7.1 changed the game with the 2-slot system. It makes it so much fun to tinker now, instead of simply flashing a ROM in the old days.

I created these flashing .bat files AFTER understanding and individually testing what each fastboot switch does exactly. These are for the Pixel; for the XL, change the image files to its marlin counterparts. When I flash, I want to flash a specific partition on a specific slot. That way, the other slot stays intact. (I turned echo on so I could see line by line what image is getting flashed where.)

FLASHA-NOWIPE.BAT: [MENTION=279333]ECHO[/MENTION] ON

PATH=%PATH%;"%SYSTEMROOT%\System32";c:\adb

Pause

fastboot flash --slot _a bootloader bootloader-sailfish-8996-012001-1610061102.img

fastboot reboot-bootloader

ping -n 5 127.0.0.1 >nul

fastboot flash --slot _a radio radio-sailfish-8996-012511-1611190200.img

fastboot reboot-bootloader

ping -n 5 127.0.0.1 >nul

fastboot update --slot _a --skip-secondary image-sailfish-nmf26q.zip

FLASHB-NOWIPE.BAT: [MENTION=279333]ECHO[/MENTION] ON

PATH=%PATH%;"%SYSTEMROOT%\System32";c:\adb

Pause

fastboot flash --slot _b bootloader bootloader-sailfish-8996-012001-1610061102.img

fastboot reboot-bootloader

ping -n 5 127.0.0.1 >nul

fastboot flash --slot _b radio radio-sailfish-8996-012511-1611190200.img

fastboot reboot-bootloader

ping -n 5 127.0.0.1 >nul

fastboot update --slot _b --skip-secondary image-sailfish-nmf26q.zip

(If you want to wipe userdata, put the -w back in the last command.)

You must have the latest ADB and fastboot to use the --slot and --skip-secondary switches.

#3: As well, I also found this thread that explains a little more.

Again, I will take whatever flak for posting this information from other deserving people and having some of it come from a link to another site, but it just seems too important not to share.

I'f you're the OP, you obviously deserve the credit, so please stand up and let us know who you are!

I hope this helps...

Doc