• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[GUIDE] System partition too small? Installing Android 12, GApps & large GSIs on Pixel 2!

Search This thread

Dollscythe

Senior Member
Jul 23, 2021
146
351
SPECIAL THANKS TO
@Lunarixus on XDA
https://t.me/lunarixus_work on Telegram Posts
I wouldn't have figured out how to maneuver the pixel 2 XL partition table without him.


!!!WARNING PLEASE READ!!!!
This tutorial only applies to Walleye (regular 2). There's another tutorial for Taimen (2 XL). Please join the telegram group if you can!
ALSO, this only increases system partition on slot B. If you want to flash GSIs, make sure you are on the correct slot with this command:
fastboot --set-active=b
REQUIREMENTS:
STEPS:

1. Enable USB Debugging

2. Reboot into fastboot mode
adb reboot bootloader

3. Boot into the recovery (format data if it is stuck on splash screen)
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.
rm x - Removes partition number x. For example: rm 13
mkpart name fstype startUNIT finishUNIT - Makes a partition where fstype is the type of filesystem (like ext4), start is the beginning of the partition, and finish is the end of the partition. UNIT is the unit for the start and finish arguments (like KB, MB, B, or s) For example: mkpart system_a ext4 32KB 1000KB
name x part_name - Names partition number x and gives it part_name as a label. For example: name 14 userdata
  • 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!!!!
photo_2021-07-27_15-46-56.jpg
  • We have to delete all partitions starting from the bottom until system_b. 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_b is removed.
    • rm 45
    • rm 44
    • rm 43
  • Once you are done, it's time to recreate those partitions. We do it in the proper order now, starting from system_b. 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_b ext2 4073MB 7173MB
    • mkpart padding1 7173MB 7179MB
    • mkpart userdata ext4 7179MB 62400MB (if you have 128GB Walleye, do mkpart userdata ext4 7179MB 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 43 system_b
    • name 44 padding1
    • name 45 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 erase system_b
fastboot erase padding1
fastboot erase userdata
fastboot format:ext2 system_b
fastboot format:ext4 userdata
And that's all!

NOTICE: At this point, the partitions should repopulate themselves on the next boot. If they don't, flash latest Android 11 stock ROM (And flash it using flash-all.bat for windows/flash-all.sh for linux).
Flashing the stock ROM won't undo your partitioning. You will keep your 3GB system partition!

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 have any questions, or accidentally brick your device, join the telegram group for direct support, or ask here in the XDA thread.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    SPECIAL THANKS TO
    @Lunarixus on XDA
    https://t.me/lunarixus_work on Telegram Posts
    I wouldn't have figured out how to maneuver the pixel 2 XL partition table without him.


    !!!WARNING PLEASE READ!!!!
    This tutorial only applies to Walleye (regular 2). There's another tutorial for Taimen (2 XL). Please join the telegram group if you can!
    ALSO, this only increases system partition on slot B. If you want to flash GSIs, make sure you are on the correct slot with this command:
    fastboot --set-active=b
    REQUIREMENTS:
    STEPS:

    1. Enable USB Debugging

    2. Reboot into fastboot mode
    adb reboot bootloader

    3. Boot into the recovery (format data if it is stuck on splash screen)
    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.
    rm x - Removes partition number x. For example: rm 13
    mkpart name fstype startUNIT finishUNIT - Makes a partition where fstype is the type of filesystem (like ext4), start is the beginning of the partition, and finish is the end of the partition. UNIT is the unit for the start and finish arguments (like KB, MB, B, or s) For example: mkpart system_a ext4 32KB 1000KB
    name x part_name - Names partition number x and gives it part_name as a label. For example: name 14 userdata
    • 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!!!!
    photo_2021-07-27_15-46-56.jpg
    • We have to delete all partitions starting from the bottom until system_b. 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_b is removed.
      • rm 45
      • rm 44
      • rm 43
    • Once you are done, it's time to recreate those partitions. We do it in the proper order now, starting from system_b. 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_b ext2 4073MB 7173MB
      • mkpart padding1 7173MB 7179MB
      • mkpart userdata ext4 7179MB 62400MB (if you have 128GB Walleye, do mkpart userdata ext4 7179MB 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 43 system_b
      • name 44 padding1
      • name 45 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 erase system_b
    fastboot erase padding1
    fastboot erase userdata
    fastboot format:ext2 system_b
    fastboot format:ext4 userdata
    And that's all!

    NOTICE: At this point, the partitions should repopulate themselves on the next boot. If they don't, flash latest Android 11 stock ROM (And flash it using flash-all.bat for windows/flash-all.sh for linux).
    Flashing the stock ROM won't undo your partitioning. You will keep your 3GB system partition!

    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 have any questions, or accidentally brick your device, join the telegram group for direct support, or ask here in the XDA thread.