How to resize /system partition of Galaxy S2
Autor: Bruno Finger | Publicado: 2016-05-01T09:04:00-03:00

Hi, welcome to my blog! Usually I don't write in english but rather in portuguese, but I decided to share here as well a tutorial I written in Android Enthusiasts SE about how to resize the /system partition of a Samsung Galaxy S2.

This is specially interesting to be able to upgrade your ROM and still be able to flash the most up-to-date version of Google Apps, as with the stock allocated size, it wouldn't be possible anymore.

Before the tutorial, I'd like to note that if I receive good feedbck here, and can create a secondary blog and post there in english as well! I'm a Web developer, and usually I write about technology-related stuff, Linux, Windows and sometimes games.

Alright, now to the tutorial!






Firstly and most important, the credits:

I made this following this great tutorial at XDA-Developers by user&nbsp;metalgearhathaway:http://forum.xda-developers.com/galaxy-s2/development-derivatives/mod-partition-internal-memory-app-t2538947

I used&nbsp;PIT&nbsp;files (I'll explain what they are, don't worry) made from user&nbsp;ElGamal&nbsp;from XDA also, located&nbsp;here (comment number 509).

And a little bit of help from user&nbsp;CrackDaddy, also from XDA.

Second, what you'll need:

A machine running Windows. I used Windows 7 Ultimate 64-bits;
Odin 3.07. Careful when installing, it is full of optional AdWares. There's also a Linux and Mac version available called JOdin3, but I didn't try it;
Flashable ClockWorkMod 6 for Galaxy S II (it is a&nbsp;.tar&nbsp;file with a file named&nbsp;zImage&nbsp;inside);
PIT&nbsp;file with desired partition table configuration;
Samsung drivers for Galaxy S2. Usually you can install Samsung Kies but there's also a installer just with drivers available;
Your original stock unrooted Samsung Jellybean firmware. You can find it at&nbsp;sammobile.com;
Any ROM of your choice. I highly recommend the last nightly build of Cyanogenmod 11;
Optionally: GApps 20140606 or newer.


I made most of those available in the following bundle file:&nbsp;https://drive.google.com/open?id=0BxccpydIocBpd21FOE5MaGJiMkU&amp;authuser=0

What is missing is GApps, CyanogenMod, and a stock Samsung JellyBean ROM (as it depends of country and carrier, and might not be legal to provide it here).

Third, the default warning:

I am not responsible for anything that might go wrong with your device, neither any of the mentioned users nor anyone here at Stack Overflow or XDA-Developers. This procedure will root your phone if it isn't already and also void your warranty if it isn't already. If anything goes wrong, don't panic, it is most likely fixable by reflashing the stock ROM and starting over again.

Finally, how to:

This will only work with the 16GB International version (GT-I9100) of Samsung Galaxy S II

Firstly, copy CyanogenMod 11&nbsp;.zip&nbsp;file (or your desired ROM) and optionally GApps&nbsp;.zip&nbsp;file to your external SD card;

Make a backup of everything inside your internal storage, copy it to your computer or somewhere else. It will be completelly erased. Don't worry about your external SD Card, it won't be touched.

Make a NAnd backup of your current ROM, you'll be able to restore it after the repartition. To do it, you must have ClockWorkMod recovery installed, then boot your phone into recovery mode (Volume UP + Home + Power), select&nbsp;backups and restore, then&nbsp;backup to /storage/sdcard1;

When backup finishes, reboot your phone into Download mode (Volume DOWN + Home + Power) and connect your phone to the computer. Let Windows install the drivers. If it fails, try to install Samsung Kies or just the drivers provided in the bundle I made available, and try again.

Open Odin3 as Administrator and connect the phone. It should detect your phone and show it under the label&nbsp;ID:COM, and also in the&nbsp;Message. If it didn't, try to restart your computer, phone, reinstall drivers, check your USB cable, etc., and try again.

Now you'll need to choose a&nbsp;PIT&nbsp;file.&nbsp;PIT&nbsp;means&nbsp;Partition Information Table&nbsp;and it is a Samsung-only thing. In the bundle file, I made available&nbsp;ElGamal's&nbsp;PIT&nbsp;file (I91001GB_6GB.pit) which also resizes&nbsp;/system&nbsp;partition to 1GB,&nbsp;/data&nbsp;to 6GB and the rest goes to internal storage. If you wish different sizes, check the thread at XDA-Developers as he made many different versions available. I also included a PIT file for the default configuration (I9100_2GB-STOCK.pit) if you wish to go back to as it was later.

When you have chosen your&nbsp;PIT&nbsp;file, go to Odin and tick the following checkboxes:&nbsp;Re-Partition,&nbsp;Auto Reboot&nbsp;and&nbsp;F. Reset Time. In the&nbsp;Re-Partition section, click on the&nbsp;PITbutton and select your chosen&nbsp;PIT&nbsp;file. In the&nbsp;Files (Download)&nbsp;section, click on the&nbsp;AP&nbsp;button and select Samsung's stock JellyBean ROM. Double check everything and click&nbsp;Start. This can take a while, go grab a coffee.

After everything finishes, your phone will reboot into the stock Samsung JellyBean ROM. Two things can happen now, or it will work normally and if so you can use it and check if everything is as you want. Or it can ask you for a password to access the "encrypted volume", which is nothing but your internal storage that is not formatted. In both ways, unplug your phone (it it's still plugged) and reboot it into Download mode again.

It is interesting to close and reopen Odin3 to reset the settings. Plug your phone again and wait until Odin3 detects it. This time, leave checked just&nbsp;Auto Reboot&nbsp;and&nbsp;F. Reset Time&nbsp;and make sure&nbsp;Re-Partition&nbsp;is&nbsp;NOT&nbsp;checked. Click on&nbsp;AP&nbsp;button and select the ClockWorkMod Recovery&nbsp;.tar&nbsp;file, then click&nbsp;Start. This one is faster, but if you feel sleepy, go for another coffee ;)

When it finishes, you should have ClockWorkMod Recovery 6 installed in your phone, so go ahead and reboot into Recovery mode. Go to&nbsp;mounts and storage, select&nbsp;format /storage/sdcard0and format it as&nbsp;exfat&nbsp;(if for some reason you have write problems in your internal storage later, come back here and select another format until it works, but&nbsp;exfat&nbsp;should do the trick).

When it finishes, still in Recovery mode,&nbsp;Wipe data/factory reset,&nbsp;Wipe cache&nbsp;and&nbsp;Wipe Dalvik cache. Let's be sure nothing remains from the previous ROMs.

Now,&nbsp;install zip&nbsp;-&gt;&nbsp;choose zip from /storage/sdcard1&nbsp;and select the CyanogenMod 11&nbsp;.zip&nbsp;file (or of your desired ROM) and flash it. Optionally also flash GApps afterwards. Reboot your phone and check if everything is right.

If everything is right, reboot your phone into Recovery mode again, do a new&nbsp;wipe data/factory reset,&nbsp;wipe cache&nbsp;and&nbsp;wipe Dalvik cache, and then recover your backed up ROM from the beginning. Reboot your phone.

Check again if everything works right. A few apps might need to be reinstalled (Spotify and Waze are examples) to work correctly again, but that's be only major issue.

Hope everything goes well.