Increase system partition size of S2

I have had a Samsung Galaxy S2 a long time ago. It was a good phone if you want to tweak it a little and explore new things on Android. Installing the latest operating systems on it can be troublesome as its system partition is small and doesn’t support latest Android Operating systems like Android Lollipop, Android Nougat or Marshmallow. In this guide, you can increase system partition size of S2 to Install Android 7 Nougat or any other operating system using custom ROMs like LineageOS 14.1.

Guide to Increase System Partition Size of S2:

Before you proceed forward. I want to warn you that if anything goes wrong, it can lead to soft bricking your phone. If you don’t have an idea about the terms used in this guide, read about them on the internet or ask me in the comments. This guide will factory reset your phone and delete all the data and apps present in the internal storage of your SD card. It will not erase the data present on your SD card.

If you try to use the modified system partition with stock ROM. your phone will not boot. You must revert to stock system partition sizes first then install stock firmware

IMPORTANT: If you think this guide is too complex for you. Then use the Lachon Repartition Tool to increase system partition size. The link is at the bottom of the article.

Some Benefits of Increasing System Partition of S2:

  • You might have come across an error that states that the app can not be installed as you do not have enough space on your internal storage. You will not get that error and no need to move apps to SD card.
  • You can upgrade to Android Lollipop, Marshmallow or Nougat.
  • You will be able to install gapps without error 70.
  • Can fix partition errors and soft brick. If you somehow screwed your system partition this guide can help you fix it

Prerequisites:

  • Download Samsung Drivers for Windows. (Link to download file is under the main heading)These drivers are to be installed on your PC, they are essential for your PC to recognize your device properly.
  • Download ODIN from the official site of ODIN. Or you can download the ODIN I used from this link.
  • Download Pit-Files.
  • Pre-made kernel tar files if you don’t have one already.
  • Make NANDROID backup of your phone

Steps on how to Increase System Partition Size on S2:

  1. First of all, make a recovery backup (CWM or TWRP) and save it to your PC or external SD card. It will be deleted if you left it in internal storage.
  2. Download the system pit files.
  3. Extract the pit zip file.
  4. Open ODIN on your Windows PC.
  5. Put your phone in download mode.
  6. Connect your phone to your PC via USB (ID:COM on Odin should change color)
  7. Select PIT option and choose your desired pit file.
  8. Click on PDA or AP and select your kernel .tar file.
  9. Check re-partition on ODIN.
  10. Click Start. 
  11. If your phone successfully flashes, move onto the next step. 
  12. If not:
    1. Change USB port of your PC.
    2. Change ODIN version.
    3. Change pit files.
    4. Check if your device has a corrupt NAND (or broken). If your memory chip is broken, you won’t be able to flash the firmware using this guide and you might need a new motherboard on your S2).
  13. Disconnect the USB cable. Take out your phone battery, then re-insert it.
  14. Get into Recovery Menu
    1. Press and hold button combinations (home button + power button + volume up) until your phone vibrates.
  15. If you have CWM recovery,
    1. go to mounts and storage.
    2. select format /sd card0 or /internal sd card.
    3. Select default and your internal sd card should successfully format.
    4. If not, try ext4 format.
  16.  If you have TWRP recovery on your S2:
  17. Go to wipe>advanced
  18. select format emmc or /sd card0, 7
  19. Swipe to Confirm.
Note: DorimanX kernel doesn’t support ext4 formatted sd cards. You will need to format your sd cards to vfat or fat32 for DorimanX kernel to detect.

If you fail to format using ODIN use the guide below:

  1. Connect your phone back to Windows PC using a data cable.
  2. If formatting sd card in recovery fails.
    1. While still in recovery (CWM),
    2. go to mounts and storage and select mount mass storage.
    3. If you have TWRP recovery, go to mount and select mount sd card.
    4. It should prompt you that the storage isn’t ready yet and you need to format. If your PC still doesn’t detect your phone.
    5. Check if the proper drivers are installed (Samsung Drivers for Windows PC in Prerequisites).
  3. Click format.
  4. You can leave all of the settings to default, I personally like to change the allocation size to 4KB (4KB is good if you want to make the most out of your phone’s storage while having enough speed)
  5. Click format.
After successful repartition of system storage:
  1. Go back to your phone.
  2. You can either restore from your backup or install a new ROM.
  3. If you select to restore from a backup, skip all of the remaining steps.
  4. In mounts and storage, choose format /data, /cache and /system.
  5. Now you can flash a ROM as you normally would.

Note: DorimanX kernel recoveries cannot format /data partition of more than 2gb, use an alternative first when restoring a backup then flash back if needed.

If the above guide is too difficult for you and you are unable to perform the above-mentioned steps on your Galaxy S2 Then use can Lachon tool to increase system partition size of S2 to install Gapps and latest operating systems. I hope this guide was helpful and you were able to perform it on your S2.

That’s all on how to increase system partition size of S2 to install the latest versions of Android AOSPs. If you have any questions or queries. Feel free to ask me in the comments.