[Guide] Pixel XL Android 7(Nougat) Unlock/Install Stock Images + Kernels/Recovery +

pcriz

Senior Member
Aug 23, 2008
5,038
2,936
253
Intro
The purpose of this thread is twofold:
First, it is for Pixel XL owners that want to Root their phone, and enjoy the benefits of rooting it without installing a custom ROM...

If you follow the instructions above you should not have to worry about slot a/b.

If you are installing Custom ROM this thread is not for you. You, should follow the installation instructions of the Custom ROM you want to install.
A few things that may make this a bit confusing for users.

Your steps work fine for users that want to use custom roms. This is because unlocking, flashing, twrp, flashing SU and flashing a rom are independent.

So basically someone can follow your steps to get their device to a state that flashing roms is possible. The other thing is why do you have them flash radio and boot loader separately? When they download the factory image it has a flash all bat that flashes everything for them.

Also if any of these users are coming from the O beta your steps will not work because they will have factory flash in both A and B slots.. Or at least flash bootloader and boot.img in both slots.

Lastly you dont need the huge android sdk for the latest ADB and fastboot..

Google provides ADB and Fastboot in a 4mb package here: https://developer.android.com/studio/releases/platform-tools.html
 
Last edited:

Homeboy76

Senior Member
Aug 24, 2012
2,365
1,114
188
A few things that may make this a bit confusing for users.

Your steps work fine for users that want to use custom roms. This is because unlocking, flashing, twrp, flashing SU and flashing a rom are independent.

So basically someone can follow your steps to get their device to a state that flashing roms is possible. The other thing is why do you have them flash radio and boot loader separately? When they download the factory image it has a flash all bat that flashes everything for them.
First, it is true that once your phone is rooted you can install a Custom ROM. My point is, this guide doesn't require flashing slot a then slot b. Second, I have them flash the bootloader and radio separately so they can learn how to. Sometimes an older radio works better than the new one.
 

pcriz

Senior Member
Aug 23, 2008
5,038
2,936
253
First, it is true that once your phone is rooted you can install a Custom ROM. My point is, this guide doesn't require flashing slot a then slot b. Second, I have them flash the bootloader and radio separately so they can learn how to. Sometimes an older radio works better than the new one.
The update to my last post, also the custom rom can be loaded once you have twrp, root is still optional.

Also if any of these users are coming from the O beta your steps will not work because they will have factory flash in both A and B slots.. Or at least flash bootloader and boot.img in both slots.

Lastly you dont need the huge android sdk for the latest ADB and fastboot..

Google provides ADB and Fastboot in a 4mb package here: https://developer.android.com/studio/releases/platform-tools.html
 

Homeboy76

Senior Member
Aug 24, 2012
2,365
1,114
188
Also if any of these users are coming from the O beta your steps will not work because they will have factory flash in both A and B slots.. Or at least flash bootloader and boot.img in both slots.

Lastly you dont need the huge android sdk for the latest ADB and fastboot..

Google provides ADB and Fastboot in a 4mb package here: https://developer.android.com/studio/releases/platform-tools.html
Good point, I will update my instructions warn O beta users. Thanks for sharing the Google 4mb package.
 
  • Like
Reactions: pcriz

Ozark_8125

Senior Member
Sep 19, 2007
1,155
346
0
Springfield, MO
Google provides ADB and Fastboot in a 4mb package here: https://developer.android.com/studio/releases/platform-tools.html
FWIW - a fellow XDA'er has a great little fastboot/adb package that works great here also.

Also, I found out in win10 (at least) when you have the cmd window open when flashing your partitions with fastboot, rather than renaming all the little img files, you can just directly drag / drop the file from the folder onto the cmd window you're typing your commands in, and it will insert the filename & path for you! Suuuuper easy-peasy, ie, you type:

Code:
fastboot flash recovery X
X is where you would leave the cursor and then drag and drop the TWRP file from your Download window (for instance) onto your cmd window, and path & filename will be inserted at the X.
 
Last edited:

pcriz

Senior Member
Aug 23, 2008
5,038
2,936
253
FWIW - a fellow XDA'er has a great little fastboot/adb package that works great here also.

Also, I found out in win10 (at least) when you have the cmd window open when flashing your partitions with fastboot, rather than renaming all the little img files, you can just directly drag / drop the file from the folder onto the cmd window you're typing your commands in, and it will insert the filename & path for you! Suuuuper easy-peasy, ie, you type:



X is where you would leave the cursor and then drag and drop the TWRP file from your Download window (for instance) onto your cmd window, and path & filename will be inserted at the X.
Or you could type the first few letters of the file and hit tab and it will populate the rest so long as there isn't nothing similarly named up to the last letters typed. So when I fastboot twrp.. I type "fastboot boot tw" and hit tab and it fills the full path.
 

Ozark_8125

Senior Member
Sep 19, 2007
1,155
346
0
Springfield, MO
Or you could type the first few letters of the file and hit tab and it will populate the rest so long as there isn't nothing similarly named up to the last letters typed. So when I fastboot twrp.. I type "fastboot boot tw" and hit tab and it fills the full path.
If it's in the fastboot folder - but that's another cool tip.
 

Homeboy76

Senior Member
Aug 24, 2012
2,365
1,114
188
When you flash a factory image, flash it in both slots.

Flash all once
Boot into the bootloader again
Swap slots in bootloader
Flash all again
After, reading several of your post on several Custom ROM theads and all of your post from Pg. 377 to Pg. 432 on the PureNexus Pixel XL thread. I have concluded, you are one of if not the most knowledgeable individual on Installing/flashing Custom ROMS on the Pixel XL. That being said, Correct me if I'm wrong. When you use the 'flash all.bat' file without the -w it loads the (factory firmware) to both slots.

So, if I were to install a Custom ROM ex., PureNexus:
a) What slot would I flash it to?
b) The 'active/boot slot' where the updated vendor.img is?
c) How would I install it?
 
Last edited:

pcriz

Senior Member
Aug 23, 2008
5,038
2,936
253
After, reading several of your post on several Custom ROM theads and all of your post from Pg. 377 to Pg. 432 on the PureNexus Pixel XL thread. I have concluded, you are one of if not the most knowledgeable individual on Installing/flashing Custom ROMS on the Pixel XL. That being said, Correct me if I'm wrong. When you use the 'flash all.bat' file without the -w it loads it (factory firmware) to both slots. But it puts the vendor.img in the active/boot slot.

So, if I were to install a Custom ROM ex., PureNexus:
a) What slot would I flash it to?
b) The 'active/boot slot' where the updated vendor.img is?
c) How would I install it?

Using the factory image in both slots means you have the vendor in both slots so you should be good. If you had only one slot with the vendor and wanted to flash to that slot, you would make the slot with the vendor the inactive one an flash the ROM because the ROM is always flashed to the inactive slot.

So if the vendor you want is in A. Put the device on B and flash away. On the next reboot the device will switch.

---------- Post added at 02:19 AM ---------- Previous post was at 02:10 AM ----------

Also if you are flashing the vendor. Make sure you flash the ROM and reboot once before you flash it
 

Homeboy76

Senior Member
Aug 24, 2012
2,365
1,114
188
Using the factory image in both slots means you have the vendor in both slots so you should be good. If you had only one slot with the vendor and wanted to flash to that slot, you would make the slot with the vendor the inactive one an flash the ROM because the ROM is always flashed to the inactive slot.

So if the vendor you want is in A. Put the device on B and flash away. On the next reboot the device will switch.

---------- Post added at 02:19 AM ---------- Previous post was at 02:10 AM ----------

Also if you are flashing the vendor. Make sure you flash the ROM and reboot once before you flash it
I think I asked the wrong question(s) so let's start again.
My phone has the current factory firmware (July) and is rooted.
The boot slot is a.

I want to install a Custom ROM ex., PureNexus:
What are the steps to install the ROM, vendor.img, gapps, root (SuperSu/Magisk), kernel, trwp.zip.
Also, please include instructions on how to set a slot active via adb/twrp. There are a lot of novices when it comes to flashing a Custom ROM, including me. All the thanks, credit, and recognition will go to you. :)
 
Last edited:

pcriz

Senior Member
Aug 23, 2008
5,038
2,936
253
I think I asked the wrong question so let's start again.
My phone has the current factory firmware (July) and is rooted.
The boot slot is a.

I want to install a Custom ROM ex., PureNexus:
What are the steps to install the ROM, vendor.img, gapps, root (SuperSu/Magisk), kernel, trwp.zip.
Also, please include instructions on how to set a slot active via adb/twrp. There are a lot of novices when it comes to flashing a Custom ROM, including me. All the thanks, credit, and recognition will go to you. :)
I'm gonna assume your other slot is at least bootable
Boot into recovery
Factory reset
Flash ROM
Flash twrp
Reboot recovery
Flash vendor
Flash super user (if you flash magisk you need to flash twrp after it before you reboot)
Boot ROM

There are no gapps for pure nexus but if you needed to flash them do it after you flash the ROM and have rebooted once.

If want to use your current slot because you know its good. Boot into recovery. Go into reboot and select the opposite slot. Then choose to reboot into recovery and perform the steps I listed above.
 
Last edited:

sakumaxp

Senior Member
Aug 7, 2009
447
66
0
31
I'm gonna assume your other slot is at least bootable
Boot into recovery
Factory reset
Flash ROM
Flash twrp
Reboot recovery
Flash vendor
Flash super user (if you flash magisk you need to flash twrp after it before you reboot)
Boot ROM

There are no gapps for pure nexus but if you needed to flash them do it after you flash the ROM and have rebooted once.

If want to use your current slot because you know its good. Boot into recovery. Go into reboot and select the opposite slot. Then choose to reboot into recovery and perform the steps I listed above.
What if I can't even reach the bootloader on slot A, is there anyway to get into the bootloader so I can at least flash the factory img through adb
 

pcriz

Senior Member
Aug 23, 2008
5,038
2,936
253
What if I can't even reach the bootloader on slot A, is there anyway to get into the bootloader so I can at least flash the factory img through adb
Have you tried holding down the power button and volume down until the bootloader appears.
 

pcriz

Senior Member
Aug 23, 2008
5,038
2,936
253
Can I just go into boot loader from slot B, then in adb change to slot A and not have to reboot just flash the stock img? Would that work?
You have to use fastboot --set-active=a or b

Then fastboot reboot bootloader

Then flash
 

sakumaxp

Senior Member
Aug 7, 2009
447
66
0
31
You have to use fastboot --set-active=a or b

Then fastboot reboot bootloader

Then flash
I can't have my phone try and boot with slot A I have a weird twrp issue where I have a twrp boot loop, the screen will flash the twrp load screen really fast and keep doing that, so I can't even get into boot loader from adb
 

Homeboy76

Senior Member
Aug 24, 2012
2,365
1,114
188
I'm gonna assume your other slot is at least bootable
Boot into recovery
Factory reset
Flash ROM
Flash twrp
Reboot recovery
Flash vendor
Flash super user (if you flash magisk you need to flash twrp after it before you reboot)
Boot ROM

There are no gapps for pure nexus but if you needed to flash them do it after you flash the ROM and have rebooted once.

If want to use your current slot because you know its good. Boot into recovery. Go into reboot and select the opposite slot. Then choose to reboot into recovery and perform the steps I listed above.
Thank you, yes I pressed the thank you button. :)