[Google Pixel 2 XL Guides, News, & Discussion] sharanoth:
SPECIAL THANKS TO

@Lunarixus on XDA

I wouldn't have figured out how to maneuver the pixel 2 XL partition table without him.​

WARNING!

This tutorial only applies to Taimen (2XL). There's already another tutorial for Walleye, click here for link. I need Walleye testers so please join the telegram group if you can! Google Pixel Development Group.​

​

REQUIREMENTS:

Taimen with unlocked bootloader

Updated adb & fastboot binaries

GNU parted for ARM64. Get it here: https://guidedflame.dev/parted

Custom recovery for Taimen with adb support. Get it here: Recovery .img Download

vbmeta image for your device: Download vbmeta.img

STEPS:

1. Enable USB Debugging​

2. Reboot into fastboot mode​

adb reboot bootloader​

3. Boot into the recovery​

fastboot boot path/to/recovery.img​

(optional) you can flash TWRP permanently if you wish. fastboot flash boot_a path/to/recovery.img and fastboot flash boot_b path/to/recovery.img DO NOT FLASH TWRP. JUST BOOT TO IT.​

4. In TWRP...​

If it asks you to decrypt your data, do it.

If it asks you to swipe for RW permissions on system partition, do it.

Unmount all partitions. Click on Mount, then un-tick everything.

5. Back to your PC. Copy parted to /sbin.​

adb push path/to/parted /sbin​

6. Enter shell mode.​

adb shell​

7. Change permissions of parted.​

chmod 777 /sbin/parted​

8. It's time to use parted!​

​

We mainly use 3 commands. Here's how they work.​

In your terminal (still in shell mode), type parted /dev/block/sda

It should greet you with a welcome screen. Type p free, and save what you get in a screenshot or text file (on windows you can copy and paste in notepad, or use Snipping Tool, since it's installed by default). THIS IS VERY IMPORTANT IF YOU GET STUCK!!!!

View attachment 5371337​

We have to delete all partitions starting from the bottom until system_a. Make sure to keep the screenshot or text file you saved earlier from p free, because we are gonna need it to recreate the deleted partitions later. YOUR PARTITION SCHEME MIGHT BE DIFFERENT THAN THIS. Make sure to STOP after system_a is removed.

rm 13

rm 12

rm 11

rm 10

rm 9

rm 8

rm 7

Once you are done, it's time to recreate those partitions. We do it in the proper order now, starting from system_a. Refer to the screenshot or text file you saved earlier. We will increase the partition size to 3GB to be able to boot most GSIs, including Android 12. If it says that the partition isn't aligned, type Ignore.

mkpart system_a ext4 169MB 4269MB

mkpart system_b ext4 4269MB 8369MB

mkpart pstore 8369MB 8379MB

mkpart aes_a 8379MB 8380MB

mkpart aes_b 8380MB 8381MB

mkpart align_parti 8381MB 8391MB

mkpart userdata ext4 8391MB 62400MB (if you have 128GB Taimen, do mkpart userdata ext4 8391MB 126300MB)

Check your partitioning with p free and compare with your screenshot/text file. It should be similar, with some extra free spaces.

Time to name the partitions.

name 7 system_a

name 8 system_b

name 9 pstore

name 10 aes_a

name 11 aes_b

name 12 align_parti

name 13 userdata

Check your partitioning again with p free. It should show the named partitions. If everything looks good to you, leave parted.

quit

9. Exit shell mode.

exit​

10. Reboot into fastboot mode

adb reboot bootloader​

11. Format all the partitions we made

fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img (that you downloaded earlier)​

fastboot erase system_a​

fastboot erase system_b​

fastboot erase pstore​

fastboot erase aes_a​

fastboot erase aes_b​

fastboot erase align_parti​

fastboot erase userdata​

fastboot format:ext4 system_a​

fastboot format:ext4 system_b​

fastboot format:ext4 userdata​

​

And that's all!

You can start immediately flashing GSIs/Android 12. If you're stuck on splash screen, that means the partitions didn't repopulate correctly. Follow the advice above!

If you need Android 12 GSI, here.

If you have any questions, or accidentally brick your device, join the telegram group for direct support.