• 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 XL!

Search This thread

Dollscythe

Member
Jul 23, 2021
36
55
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!
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:
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.
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-22_22-45-58.jpg
  • 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 3269MB
    • mkpart system_b ext4 3269MB 6369MB
    • mkpart pstore 6369MB 6379MB
    • mkpart aes_a 6379MB 6380MB
    • mkpart aes_b 6380MB 6381MB
    • mkpart align_parti 6381MB 6391MB
    • mkpart userdata ext4 6391MB 62400MB (if you have 128GB Taimen, do mkpart userdata ext4 6391MB 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!

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) OR flash dotOS (it has a better vendor, so FP works).
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 need Android 12 GSI, here.

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

73sydney

Senior Member
Jul 21, 2018
1,843
1,600
Sydney
Google Pixel 2 XL
Had issues with:

Almost all partition steps complaiend about not beign able to inform the kernel and i had to ignore the warnings all the way through....so just be aware, not for the faint of heart

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

Aka:

$ fastboot erase pstore
Erasing 'pstore?' FAILED (remote: 'Check device console.')
fastboot: error: Command failed


Booted TWRP and at least fixed the data and system parts - Ext4 to Ext2 to Ext4 again....properly mounted

Tried flashing A12...nope

Flashed A11 Stock (to hopefully fix partitions)..booted

Now back in fastboot erasing system (a/b) and userdate and trying to flash to A12 again

Nope, that didnt work...boot warning - your device is corrupt...

Flashing back to A11 again (hopefully)

Update, back in A11....
 
Last edited:

Dollscythe

Member
Jul 23, 2021
36
55
Had issues with:

Almost all partition steps complaiend about not beign able to inform the kernel and i had to ignore the warnings all the way through....so just be aware, not for the faint of heart

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

Aka:

$ fastboot erase pstore
Erasing 'pstore?' FAILED (remote: 'Check device console.')
fastboot: error: Command failed


Booted TWRP and at least fixed the data and system parts - Ext4 to Ext2 to Ext4 again....properly mounted

Tried flashing A12...nope

Flashed A11 Stock (to hopefully fix partitions)..booted

Now back in fastboot erasing system (a/b) and userdate and trying to flash to A12 again

Nope, that didnt work...boot warning - your device is corrupt...

Flashing back to A11 again (hopefully)

Update, back in A11....


Are you sure you unlocked properly?

fastboot flashing unlock_critical

Also what's your device and storage config?
 
  • Like
Reactions: 73sydney

73sydney

Senior Member
Jul 21, 2018
1,843
1,600
Sydney
Google Pixel 2 XL
Are you sure you unlocked properly?

fastboot flashing unlock_critical

Also what's your device and storage config?

I have flashed a few ROMs in my time (since early Android days) :)

Im usually on a custom ROM, only flashed back to stock 11 to fix the issues with the aprtitions and then not being able to boot A12 when i got those fixed....and after i got the boot message my device was corrupt :)

So unlocked properly: hells yes :)
device: Pixel 2XL
storage config : (now) 3Gb system partitions :)

but A12 will not flash on it and boto successfully, it doesnt detect /data, and reports corruption.

now back on ABC ROM, from where i started the night, and all is well....just restoring my apps via Migrate
 
  • Like
Reactions: HR-21

Dollscythe

Member
Jul 23, 2021
36
55
I have flashed a few ROMs in my time (since early Android days) :)

Im usually on a custom ROM, only flashed back to stock 11 to fix the issues with the aprtitions and then not being able to boot A12 when i got those fixed....and after i got the boot message my device was corrupt :)

So unlocked properly: hells yes :)
device: Pixel 2XL
storage config : (now) 3Gb system partitions :)

but A12 will not flash on it and boto successfully, it doesnt detect /data, and reports corruption.

now back on ABC ROM, from where i started the night, and all is well....just restoring my apps via Migrate

sometimes it's fastboot version issue.

try using the fastboot i linked.

also, did you flash the vbmeta as instructed in the GSI flash guide?

aside from that, now that your system is 3GB, you can definitely flash android 12. although i advice against it, until beta 4, it's buggy right now.
 

73sydney

Senior Member
Jul 21, 2018
1,843
1,600
Sydney
Google Pixel 2 XL
sometimes it's fastboot version issue.

try using the fastboot i linked.

also, did you flash the vbmeta as instructed in the GSI flash guide?

aside from that, now that your system is 3GB, you can definitely flash android 12. although i advice against it, until beta 4, it's buggy right now.

I was using what i thought were the latest platform tools, but i just checked and it was 30.0.4 (July last year) :)

Next time i try it, ill try with the newer platform tools

I did try vbmeta...no change, device corrupt

ill take the 3Gb system part as a win for now :)
 
  • Like
Reactions: HR-21

jonpjingleheimler

Senior Member
Aug 12, 2016
173
52
47
Nashville
It took a lot of searching to find what i was doing wrong. once parted was up the rest was really straightforward. I do not understand why i could not push using the command listed here however for some reason a post on a different site showed how to create a temp folder in the sdcard, it went first try. thank you for an educational (for me) adventure. i really dug learning some shell commands and putting them to good use.
 
Last edited:

73sydney

Senior Member
Jul 21, 2018
1,843
1,600
Sydney
Google Pixel 2 XL
C:\Users\timot\Desktop\Minimal ADB and Fastboot>adb push "C:\Users\timot\Desktop\Minimal ADB and Fastboot\parted"\sbin
adb: usage: push requires an argument
tried the command with the latest platform tools and get the same crap. googling how to use adb push was absolutely pointless. im past being embarrassed now im just getting, frustrated

If you have parted in the same path youre running adb from (and you seem to be) then:

adb push parted /sbin

theres no need to quote the entire file path when in same directory, and watch those slashes...
 
  • Like
Reactions: jonpjingleheimler

jonpjingleheimler

Senior Member
Aug 12, 2016
173
52
47
Nashville
If you have parted in the same path youre running adb from (and you seem to be) then:

adb push parted /sbin

theres no need to quote the entire file path when in same directory, and watch those sla

A lot of us managed to flash android 12 by the way. At this point 90% of bugs are fixed.

you can try it already, if you can live with a non-working sound in calls.
I really need phone for this device. The Dot OS listed in op is a really nice ROM. I tried installing the GSI with gapps but I got the not enough space message. I'm rather certain I followed the repartition steps listed but even after flashing a vanilla ROM then flashing gapps I still get not enough space message. Pico is 106mb my free space shows 64mb. I tried resize and repair but got error message. I'm sure if I mess around enough I can get what I'm after. I'm grateful for all your work.
 

Dollscythe

Member
Jul 23, 2021
36
55
I really need phone for this device. The Dot OS listed in op is a really nice ROM. I tried installing the GSI with gapps but I got the not enough space message. I'm rather certain I followed the repartition steps listed but even after flashing a vanilla ROM then flashing gapps I still get not enough space message. Pico is 106mb my free space shows 64mb. I tried resize and repair but got error message. I'm sure if I mess around enough I can get what I'm after. I'm grateful for all your work.
show me your current partition scheme.

do the steps until step 8, then type in 'p free' in the shell.

then show me.
 
  • Like
Reactions: jonpjingleheimler

Dollscythe

Member
Jul 23, 2021
36
55
Thank you, that looks fine to me.

you have exactly 3.1 GB sized partition. Is there an issue with TWRP not detecting all that size?

Also, dotOS contains gapps already and as such it takes a lot of space. So maybe that's why you arent able to fit in more GAPPS.

What you could try is flashing a GSI and installing gapps. Try lineageOS as well.


By the way, if you still suspect it's a size limitation...you can redo the tutorial, but when recreating system_a and system_b, just make the size bigger.

3.5GB or 4GB should be plenty. There's nothingg stopping you from picking any size for any of these partitions as long as they are bigger than what they were originally.

If you require guidance when creatingg the partition do let me know. I am also available in private messaging or through my telegram group for assistance. I wish you luck!
 
  • Like
Reactions: jonpjingleheimler

jonpjingleheimler

Senior Member
Aug 12, 2016
173
52
47
Nashville
Thank you, that looks fine to me.

you have exactly 3.1 GB sized partition. Is there an issue with TWRP not detecting all that size?

Also, dotOS contains gapps already and as such it takes a lot of space. So maybe that's why you arent able to fit in more GAPPS.

What you could try is flashing a GSI and installing gapps. Try lineageOS as well.


By the way, if you still suspect it's a size limitation...you can redo the tutorial, but when recreating system_a and system_b, just make the size bigger.

3.5GB or 4GB should be plenty. There's nothingg stopping you from picking any size for any of these partitions as long as they are bigger than what they were originally.

If you require guidance when creatingg the partition do let me know. I am also available in private messaging or through my telegram group for assistance. I wish you luck!
Im relieved the partitions look as they should. thank you for all of your knowledge and advice. I can go forward with a lot of useful info:)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    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!
    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:
    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.
    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-22_22-45-58.jpg
    • 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 3269MB
      • mkpart system_b ext4 3269MB 6369MB
      • mkpart pstore 6369MB 6379MB
      • mkpart aes_a 6379MB 6380MB
      • mkpart aes_b 6380MB 6381MB
      • mkpart align_parti 6381MB 6391MB
      • mkpart userdata ext4 6391MB 62400MB (if you have 128GB Taimen, do mkpart userdata ext4 6391MB 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!

    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) OR flash dotOS (it has a better vendor, so FP works).
    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 need Android 12 GSI, here.

    If you have any questions, or accidentally brick your device, join the telegram group for direct support.
    2
    True, and i sure do (thats where i pulled it from), but for this users sake i was trying to be generous, maybe just once :)
    I agree with you, thank you for helping!
    2
    Or find one from the last taimen (Pixel 2XL) factory image attached to this post...saves downloading 1.6gb
    It's always better to have the full stock image in hand especially when dealing with repartitioning. You never know :)
    2
    Or find one from the last taimen (Pixel 2XL) factory image attached to this post...saves downloading 1.6gb
    2
    A lot of us managed to flash android 12 by the way. At this point 90% of bugs are fixed.

    you can try it already, if you can live with a non-working sound in calls.